Page 1 of 1

1-Up Polling

Posted: Wed Apr 01, 2015 3:50 am
by Roth
I was just wondering what are some ways that you guys have polled to see if the player should be rewarded with a 1-up? The way I came up with is limited to how many extra men can be obtained:

http://pastebin.com/53QjaXMy

It gives a free man at 20,000, then at 50,000 and every 50,000 more thereafter until 1 million. After that, the player would receive no more extra men. In the game we're finishing up right now, it's highly doubtful that the player will get to 1 million points, even with successive playthroughs after beating the game the first time (each time you loop the game the enemies become more difficult).

I was just wondering what ways some others have come up with to check when the player needs a 1-up when going by score?

Re: 1-Up Polling

Posted: Wed Apr 01, 2015 6:26 am
by tepples
Roth wrote:In the game we're finishing up right now, it's highly doubtful that the player will get to 1 million points
So I guess you wouldn't want to implement the "Congratulations, you are fags" screen from that one episode of South Park.
I was just wondering what ways some others have come up with to check when the player needs a 1-up when going by score?
The trope page is Every Ten Thousand Points.

Re: 1-Up Polling

Posted: Wed Apr 01, 2015 10:15 am
by zzo38
Roth wrote:I was just wondering what ways some others have come up with to check when the player needs a 1-up when going by score?
What I have done once is to double how many points you need each time.

Re: 1-Up Polling

Posted: Wed Apr 01, 2015 10:47 am
by lidnariq
Roth wrote:I was just wondering what ways some others have come up with to check when the player needs a 1-up when going by score?
Galaxian stores the current score in unpacked BCD, and handles 1ups in the BCD addition routine. So if you do that, whenever the 1000s digit carries and the 10000s digit becomes 5 or 0.

Re: 1-Up Polling

Posted: Thu Apr 02, 2015 2:02 am
by Roth
tepples wrote:So I guess you wouldn't want to implement the "Congratulations, you are fags" screen from that one episode of South Park.
Probably not! haha
lidnariq wrote:Galaxian stores the current score in unpacked BCD, and handles 1ups in the BCD addition routine. So if you do that, whenever the 1000s digit carries and the 10000s digit becomes 5 or 0.
I was trying to think of a way of doing something like checking when the ten-thousand slot became a 5 or 0, but couldn't think of anything really elegant. I will have to keep that in mind for the future.

Re: 1-Up Polling

Posted: Sat Apr 04, 2015 7:13 pm
by RT-55J
The simplest and most general solution I can think of would be to store a variable in RAM containing the next score threshold to cross, and as often as necessary check if the current score is greater than it. If so, give the player the corresponding bonus and update the threshold however you please. In pseudocode, that would be something like this:

Code: Select all

if(score >= nextLevel)
   Give a bonus
   Update nextLevel
else
   Do Nothing