Jump to content
IGNORED

Score Flipping


RetroFiends

Recommended Posts

I expect it just rolls over

 

Not sure what you want for a comparison

if it should have rolled but didn't how would you know?

if you want to find if it rolled over, presumably the

new score will be less than the old score

 

to compare

start with the most significant byte(s)

if it's greater than then return greater than

if it's less than then return less than

if it's equal do the next most significant byte(s)

if you run out of bytes it's equal

for i = 2 to 0 step -1
 if score1[i] > score2[i] then greater
 if score1[i] < score2[i] then less
next
equal
Edited by bogax
Link to comment
Share on other sites

 

It does flip the score back to zero, yes. This sample demonstrates it, hold the joystick button down to roll the score.

Thanks!

 

Are you pining for a 7th digit?

Not particularly, I just want to make sure when I release my game, that there's not any score bugs. Although I somehow doubt people will get to roll over the score, should they somehow be good enough to do so I don't want to slap them in the face for doing so :P

Link to comment
Share on other sites

My advice is to stick with just adding to the score. Trying to do any logic based on the score or other math will only lead to disappointment and sadness.

 

UPDATE: I just remembered bogax made debugging by using the score a MUCH more useful thing:

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#testvariables

 

If you just try score = foo then it'll usually display gobbldeegook.

Link to comment
Share on other sites

 

UPDATE: I just remembered bogax made debugging by using the score a MUCH more useful thing:

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#testvariables

 

If you just try score = foo then it'll usually display gobbldeegook.

I love that routine.

Except if you're getting near filling the bank up or near going over-cycle. It takes up a lot of cycles.

Always wondered if it could be rewritten using the new "dec" command?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...