[Week 2] Sample Game Programming Interview Question

  • (2 Pages)
  • +
  • 1
  • 2

23 Replies - 23545 Views - Last Post: 14 April 2011 - 06:26 AM

#16 anonymous26  Icon User is offline

  • D.I.C Lover

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

Re: [Week 2] Sample Game Programming Interview Question

Posted 13 February 2011 - 09:15 AM

View Poststayscrisp, on 13 February 2011 - 04:11 PM, said:

I'm surprised no-one has done this yet

Spoiler

I was waiting for something like that as well. amazing what people miss. :)
Was This Post Helpful? 0
  • +
  • -

#17 chinchang  Icon User is offline

  • Indie Game Developer
  • member icon

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

Re: [Week 2] Sample Game Programming Interview Question

Posted 13 February 2011 - 11:54 AM

Just a quick one...but i'll think on optimizing it more.

Spoiler

This post has been edited by chinchang: 13 February 2011 - 11:55 AM

Was This Post Helpful? 0
  • +
  • -

#18 shintetsu_80  Icon User is offline

  • D.I.C Head

Reputation: 31
  • View blog
  • Posts: 105
  • Joined: 01-July 08

Re: [Week 2] Sample Game Programming Interview Question

Posted 21 February 2011 - 09:11 AM

This was a great exercise. I saw it a bit late but I ran through it for fun. It's been a while since I've looked at bit operators. Good stuff. Nice question.
Was This Post Helpful? 1
  • +
  • -

#19 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 1000
  • View blog
  • Posts: 4,181
  • Joined: 14-February 08

Re: [Week 2] Sample Game Programming Interview Question

Posted 13 April 2011 - 03:25 PM

I thought I'd revive this thread a little as I have been doing a lot of DS homebrew development and being proficient in this type of thing has helped me enormously. Why you ask?

The Nintendo DS does not have an FPU which means floating point operations have to be emulated in software, this is extremely slow and not a good idea. So now imagine having to create a 3D game without floating point maths.

So variables on the DS are much better suited to being 32bit integers which do not have the accuracy of floats or doubles, this creates a need for fixed point numbers and fixed point maths, it also requires a lot of bit shifting to do operations that would otherwise be computationally expensive.
Was This Post Helpful? 0
  • +
  • -

#20 anonymous26  Icon User is offline

  • D.I.C Lover

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

Re: [Week 2] Sample Game Programming Interview Question

Posted 14 April 2011 - 05:53 AM

FPUs will become commonplace though, as mobile devices become more powerful. I recall the iPhone for instance has a rudimentary floating point unit and even the PSP has floating point math (which is not really a surpirze I guess). :)

This post has been edited by ButchDean: 14 April 2011 - 05:53 AM

Was This Post Helpful? 0
  • +
  • -

#21 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 1000
  • View blog
  • Posts: 4,181
  • Joined: 14-February 08

Re: [Week 2] Sample Game Programming Interview Question

Posted 14 April 2011 - 06:11 AM

Yeah it's inevitable really. In fact I just read that the new Nintendo 3DS is using an ARM11 processor which says on the ARM website that it can include an optional FPU, I guess it depends on whether it was deemed necessary.
Was This Post Helpful? 0
  • +
  • -

#22 anonymous26  Icon User is offline

  • D.I.C Lover

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

Re: [Week 2] Sample Game Programming Interview Question

Posted 14 April 2011 - 06:16 AM

One of the problems we had at an old job (that wasn't my problem to solve), was getting the little wheels on a car in a racing game to rotate smoothly using fixed point math. It turned out to be quite challenging for the guys working on that, but as games become higher def on mobile platforms, workarounds will be easy to spot and floating point will become ever more necessary. :)
Was This Post Helpful? 0
  • +
  • -

#23 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 1000
  • View blog
  • Posts: 4,181
  • Joined: 14-February 08

Re: [Week 2] Sample Game Programming Interview Question

Posted 14 April 2011 - 06:23 AM

Using fixed point maths you can get an accuracy of four to five decimal places, that's pretty good. I think it's more about how natural using floating point numbers is. Nevertheless I think it's valuable skill to have :)
Was This Post Helpful? 0
  • +
  • -

#24 anonymous26  Icon User is offline

  • D.I.C Lover

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

Re: [Week 2] Sample Game Programming Interview Question

Posted 14 April 2011 - 06:26 AM

It certainly is, but keep it as something for background study and remain current by keeping current trends to the fore of your attention.

Studios will expect you to have the latest info locked away in your head. :)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2