RetroFiends Posted February 4, 2014 Share Posted February 4, 2014 Hello everyone. I know this is easily testable, but for the sake of archival and not creating a new project to test, does batari Basic automatically flip the score back to zero upon going over 999999? If not, since you can't compare score values directly, how would you suggest to implement this? Quote Link to comment Share on other sites More sharing options...
+Atarius Maximus Posted February 4, 2014 Share Posted February 4, 2014 It does flip the score back to zero, yes. This sample demonstrates it, hold the joystick button down to roll the score. score=999950 main scorecolor=$28 if joy0fire then score=score+1 drawscreen goto main scoretest.txt.bin 1 Quote Link to comment Share on other sites More sharing options...
bogax Posted February 4, 2014 Share Posted February 4, 2014 (edited) 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 February 4, 2014 by bogax Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted February 4, 2014 Share Posted February 4, 2014 Are you pining for a 7th digit? Quote Link to comment Share on other sites More sharing options...
RetroFiends Posted February 4, 2014 Author Share Posted February 4, 2014 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 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted February 4, 2014 Share Posted February 4, 2014 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. Quote Link to comment Share on other sites More sharing options...
iesposta Posted February 6, 2014 Share Posted February 6, 2014 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.