[Week 3] Game Programming Sample Interview Question

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 22376 Views - Last Post: 19 February 2011 - 08:34 AM

#1 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 998
  • View blog
  • Posts: 4,173
  • Joined: 14-February 08

[Week 3] Game Programming Sample Interview Question

Post icon  Posted 16 February 2011 - 11:26 AM

Time for the 3rd week of questions, I thought I would make this one a question that would take a bit longer to answer than previous weeks. As for question 2, I came across this one on another site and thought it was a really tricky question.

Good luck :)

Question 1:
Design an OO system for a game containing a world, a player and obstacles. The player will be able to move around the world and avoid obstacles. Only the declarations are needed for all classes but the definition of the World Update function is required.

Math classes such as vectors do not need to be declared and can be used inside the classes. C++ is expected as the language of choice but psuedo-code examples or even XNA are permitted.

Question 2:
What's your biggest weakness? Or, if I hired you, what would I regret about it in six months?

Is This A Good Question/Topic? 0
  • +

Replies To: [Week 3] Game Programming Sample Interview Question

#2 bonyjoe  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 175
  • View blog
  • Posts: 548
  • Joined: 08-September 10

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 11:36 AM

Surely telling the employer something that would make them regret hiring you is not a very good idea?
Was This Post Helpful? 1
  • +
  • -

#3 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 998
  • View blog
  • Posts: 4,173
  • Joined: 14-February 08

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 11:57 AM

I think you will find a question very similar to this in all interviews, not just for programming. Employers are expecting an honest answer possibly with a follow up of how you have tried to improve upon said weakness(s) :)

This post has been edited by stayscrisp: 16 February 2011 - 12:04 PM

Was This Post Helpful? 0
  • +
  • -

#4 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 12:39 PM

View Poststayscrisp, on 16 February 2011 - 06:26 PM, said:

Time for the 3rd week of questions, I thought I would make this one a question that would take a bit longer to answer than previous weeks. As for question 2, I came across this one on another site and thought it was a really tricky question.

Good luck :)

Question 1:
Design an OO system for a game containing a world, a player and obstacles. The player will be able to move around the world and avoid obstacles. Only the declarations are needed for all classes but the definition of the World Update function is required.

Math classes such as vectors do not need to be declared and can be used inside the classes. C++ is expected as the language of choice but psuedo-code examples or even XNA are permitted.

Question 2:
What's your biggest weakness? Or, if I hired you, what would I regret about it in six months?

These questions are diverging from what I've seen in real life and have been tested on myself. Employers would never ask if they would regret employing you, but they would commonly ask you about your weaknesses. Question 1 would normally be accompanied by some source or pseudo code to be improved on. During an interview a question like that might be considered to take too much time. The reason why code would also be included would be to test the candidate's ability to read code also. :)

This post has been edited by ButchDean: 16 February 2011 - 12:40 PM

Was This Post Helpful? 2
  • +
  • -

#5 chinchang  Icon User is offline

  • Indie Game Developer
  • member icon

Reputation: 192
  • View blog
  • Posts: 725
  • Joined: 22-December 08

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 12:40 PM

2.

He would regret and think - "I should have given him double salary" ;)
Was This Post Helpful? 1
  • +
  • -

#6 diego_pmc  Icon User is offline

  • D.I.C Addict

Reputation: 81
  • View blog
  • Posts: 565
  • Joined: 13-May 09

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 12:52 PM

Regarding question 1, did you mean something like this?
void World::update()
{
    // The Controller determines what the next position of the
    // Player would be. It is up to the World to decide if the Player
    // can move in the direction or not.
    
    // I'm going to assume that the Player and the obstacles are
    // represented by points.

    Point p = player.getNextPosition();

    for (int i = 0, s = obstacles.size(); i < s; ++i) {
        Point o = obstacles[i].getCurrentPosition();
        if (p.collidesWith(o))
            return;
    }

    // If there are no collisions we're okay to move the player
    // to the next position.
    player.moveTo(p);
}


Obviously, you would need something a lot more robust in a Real WorldTM application, but the basic idea would be the same, I guess.

This post has been edited by diego_pmc: 16 February 2011 - 12:57 PM

Was This Post Helpful? 1
  • +
  • -

#7 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:10 PM

Yeah, no employer would ever ask "Why would I regret hiring you", I have to admit, that's horrifically bad wording dude.

So, what is my biggest weakness? Here's the perfect answer:

Quote

I sometimes worry that people will overlook my unbelievable greatness due to my overwhelming modesty. Looking at that picture on your desk, you have a beautiful family. I notice that your daughter is not wearing a wedding ring. She is over 18, isn't she?

This post has been edited by atraub: 16 February 2011 - 01:12 PM

Was This Post Helpful? 3
  • +
  • -

#8 diego_pmc  Icon User is offline

  • D.I.C Addict

Reputation: 81
  • View blog
  • Posts: 565
  • Joined: 13-May 09

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:14 PM

View Postatraub, on 16 February 2011 - 01:10 PM, said:

I sometimes worry that people will overlook my unbelievable greatness due to my overwhelming modesty. Looking at that picture on your desk, you have a beautiful family. I notice that your daughter is not wearing a wedding ring. She is over 18, isn't she?


Ironically, I would probably seriously consider hiring you if you said that, more so if you perform well on the programming questions. :D
Was This Post Helpful? 1
  • +
  • -

#9 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:15 PM

My skills pay the bills, sir.

This post has been edited by atraub: 16 February 2011 - 01:15 PM

Was This Post Helpful? 1
  • +
  • -

#10 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 894
  • View blog
  • Posts: 3,153
  • Joined: 12-May 09

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:20 PM

I find that when I'm being asked for my biggest weakness, it's because the interviewer is reading from a "Manager How-to" printout. It's a wasteful question - you can't be too honest for fear of hurting your chances, and you don't want to make something up or sound patronizing.
Was This Post Helpful? 2
  • +
  • -

#11 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1252
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:24 PM

"My weakness is that I work too hard!" Hah! You're hired Mr. John Doe, you're hired. I hate those types of questions. I hate them so much, I can't even remember what I answered when I was asked this during some interviews.
Was This Post Helpful? 1
  • +
  • -

#12 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 894
  • View blog
  • Posts: 3,153
  • Joined: 12-May 09

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:28 PM

Nooo! You... You've beaten the system!
Was This Post Helpful? 0
  • +
  • -

#13 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:33 PM

I like to answer that question with some techno babble that you know the interviewer can't make any sense of. Throws them off, and lets you have a little fun in what can be a stressful situation.
Was This Post Helpful? 2
  • +
  • -

#14 Fib  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 161
  • View blog
  • Posts: 554
  • Joined: 12-March 09

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 01:42 PM

View Postatraub, on 16 February 2011 - 02:10 PM, said:

So, what is my biggest weakness? Here's the perfect answer:

Quote

I sometimes worry that people will overlook my unbelievable greatness due to my overwhelming modesty. Looking at that picture on your desk, you have a beautiful family. I notice that your daughter is not wearing a wedding ring. She is over 18, isn't she?


That answer deserves an infinite amount of lols.
Was This Post Helpful? 0
  • +
  • -

#15 Fib  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 161
  • View blog
  • Posts: 554
  • Joined: 12-March 09

Re: [Week 3] Game Programming Sample Interview Question

Posted 16 February 2011 - 02:06 PM

Here's my OOP class design:

Spoiler


Something like that. I was just thinking of stuff off the top of my head so it's probably not very good.
Was This Post Helpful? 2
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2