It is currently Tue Dec 12, 2017 6:44 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: 1-Up Polling
PostPosted: Wed Apr 01, 2015 3:50 am 
Offline
User avatar

Joined: Wed Aug 03, 2005 3:15 pm
Posts: 394
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?


Top
 Profile  
 
 Post subject: Re: 1-Up Polling
PostPosted: Wed Apr 01, 2015 6:26 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19335
Location: NE Indiana, USA (NTSC)
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.

Quote:
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.


Top
 Profile  
 
 Post subject: Re: 1-Up Polling
PostPosted: Wed Apr 01, 2015 10:15 am 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 941
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.

_________________
.


Top
 Profile  
 
 Post subject: Re: 1-Up Polling
PostPosted: Wed Apr 01, 2015 10:47 am 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6511
Location: Seattle
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.


Top
 Profile  
 
 Post subject: Re: 1-Up Polling
PostPosted: Thu Apr 02, 2015 2:02 am 
Offline
User avatar

Joined: Wed Aug 03, 2005 3:15 pm
Posts: 394
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.


Top
 Profile  
 
 Post subject: Re: 1-Up Polling
PostPosted: Sat Apr 04, 2015 7:13 pm 
Offline

Joined: Fri Aug 21, 2009 3:16 pm
Posts: 37
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:
if(score >= nextLevel)
   Give a bonus
   Update nextLevel
else
   Do Nothing


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group