Go Down

Topic: Arduino Asteroids on Hackvision (Read 2 times) previous topic - next topic


Feb 08, 2011, 10:58 pm Last Edit: Feb 08, 2011, 10:59 pm by stimmer Reason: 1
Dammit! I was just getting my highest score ever, on my third extra life, when...

MY SCORE WRAPPED AROUND!   :smiley-eek: :smiley-eek: :smiley-eek:

I think you should make the score an unsigned long  XD


Feb 08, 2011, 11:02 pm Last Edit: Feb 09, 2011, 12:36 am by nootropic Reason: 1
Stimmer, holy moly, you are GOOD.  You are absolutely correct -- I will change score to be an unsigned long!!!
I chose unsigned int before I added the free life every 10000 points feature, so I didn't think anyone would roll it over -- thanks for the stress test.

UPDATE: the unsigned int won't roll over to 0 until 65535.  My bug is that I'm displaying the unsigned int as an int.  I used %d instead of %u in the call to sprintf.

Go Up