Game Programmer Test

I've recently been given a test from a game company in the area.

Before I go on, I consider myself somewhat a new c++ programmer even though I have coded in c++ before. I used it a little bit at my last job and this is probably my first c++ position I applied for, it's almost a test to see where my c++ skills are. I have studied c++ from some of Bjarne Stroustrup's books but beyond that my professional experience is limited.

I am not asking anyone to give me answers for this test. My goal of this post is to see if a more experienced c++ programmer can take a look at this test and tell me if its completely whack or not. I really dont feel my c++ skills are THAT bad but I am banging my head against the desk asking myself "Is this part of the test?! Why would you do it like that?!"

I have worked professionally as a game programmer before but in C# so I feel like I should have somewhat of an idea of how things work in games, but TBH, this is blowing my mind.

A zip of the visual studio project can be downloaded here:
http://shawnfreeman.us/test/programmer_test.zip

Instructions for the assignment can be found in the ReadMe.txt

Again, I'm not asking anyone to simply solve the test for me, just someone to look it over and tell me if I'm crazy or not for thinking this is weird.

1. I find it odd that in the FindTargets method, potentialTargets is only ever the first 30 elements of all the objects created. (Part of the test?)

2. Why bother with a 3rd array called "potentialTargets". This program is simple and the only criteria to be a target is distance. Why not just setup 1 other array(array = all objects that are close enough), and stuff it with the objects whose' distance is less then lethal distance.

These are just a few examples of what I'm confused above.
Last edited on
The link 404s for me.

I might try to contact the test-givers and ask them a few of these things and see what their response is; perhaps it will be, "just do what is being asked", but it might also be useful correspondence that helps not just you, but also them to understand how you are approaching the problem.
The link to your site does not work.
sorry, updated the link in original post.

I changed a few things from their initial project so it would run.

The only things changed were hard coding the values in main() that are from the .txt as command line arguments, and 2nd, in FindTargets where potentialTargets pointer is being created, the for loop should loop until 30, not 20 like it was before or an error would have occured about stepping on other memory locations that wasnt allocated.

If you'd like, the unmodified version straight from the test giver is here:
http://shawnfreeman.us/test/programming_test_giver.zip
Last edited on
One other example I've come across is the SetCombatObjectActive method. It doesnt make much sense to me to do the following steps as it is in the program:

1. Make a new CombatObject as a temp container for the object at index (Ok this makes sense depending on what we plan to do)
2. Copy over all properties from object at index.
3. 'delete' object at index
4. Set index to temp container

Smh...

Maybe I'm over thinking this but I would think you would just modify the properties directly, either through the array[i]->property or using a temporary reference to the properties...
*bump*
Topic archived. No new replies allowed.