It is currently Sun Sep 23, 2018 12:37 pm

 All times are UTC - 7 hours

 Page 1 of 1 [ 6 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: 1-Up PollingPosted: Wed Apr 01, 2015 3:50 am

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

 Post subject: Re: 1-Up PollingPosted: Wed Apr 01, 2015 6:26 am

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20567
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

 Post subject: Re: 1-Up PollingPosted: Wed Apr 01, 2015 10:15 am

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

 Post subject: Re: 1-Up PollingPosted: Wed Apr 01, 2015 10:47 am

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7543
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

 Post subject: Re: 1-Up PollingPosted: Thu Apr 02, 2015 2:02 am

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

 Post subject: Re: 1-Up PollingPosted: Sat Apr 04, 2015 7:13 pm

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 6 posts ]

 All times are UTC - 7 hours

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ NES / Famicom    NESdev    NESemdev    NES Graphics    NES Music    Homebrew Projects       2018 NESdev Competition       2017 NESdev Competition       2016 NESdev Competition       2014 NESdev Competition       2011 NESdev Competition    Newbie Help Center    NES Hardware and Flash Equipment       Reproduction    NESdev International       FCdev       NESdev China       NESdev Middle East Other    General Stuff    Membler Industries    Other Retro Dev       SNESdev       GBDev    Test Forum Site Issues    phpBB Issues    Web Issues    nesdevWiki