smilehero65
Active member
Score didn't always used to be a filler number on the screen.
Arcade games like Pac-Man used to grant an extra live after reaching 10,000 points.
We can easily achieve that on NESMaker!
FOR TILE/STANDARD HUD USERS onlyArcade games like Pac-Man used to grant an extra live after reaching 10,000 points.
We can easily achieve that on NESMaker!
* Before starting, you may need to implement Dale Coop's fix on updating multiple elements on the HUD.
Update multiple HUD elements simultaneously [4.5.9]
One of the somewhat frustrating limitations of NESmaker is that you can only update one HUD element at a time (if you're using the normal tile based HUD) Indeed, if you have multiple UpdateHudElement calls in succession in the code, only the last one is taken into account >_< For example, when...
www.nesmakers.com
1) Let's make a variable called myBenchmark, and assign a value of 1.
2) Then, add this piece of code:
- every instance you get points,
OR
- once in your Handle Game Timer script (this is more efficient and optimal)
Code:
LDA myScore_10000 ;;;;Load the 10,000 place
CMP myBenchmark ;;;;Check if the 10,000 place = benchmark
BNE +giveExtraLive ;;;;If so...
;;We Will Increase the Benchmark with INC
;;INC adds variables just by *ones*
INC myBenchmark ;;;;Increase the benchmark
INC myLives ;;;;Add an extra Live, by ones
;;;Update HUD Element -- only if you use a tile HUD
;;;If you have a Sprite HUD, you can skip this
UpdateHudElement myLives, #$02 ;<------ or whatever number your lives variable is in the HUD
+giveExtraLive
When the number in myScore_10000 is equal to 1 (the Benchmark), then the score is 10,000 or a bit more.
The variable Benchmark is increased by 1, so the next check will be done when the score is 20, 000.
In that way, when your score increases in intervals of 10,000, you will be granted with an extra live!
The variable Benchmark is increased by 1, so the next check will be done when the score is 20, 000.
In that way, when your score increases in intervals of 10,000, you will be granted with an extra live!
~ EXTRA ~
BUT, what if 10,000 makes your game too easy?
Let's try to raise the bar! (or the benchmark)
1) Increase the initial variable of myBenchmark
Points to Get Extra Live | myBenchmark |
20,000 | 2 |
30,000 | 3 |
40,000 | 4 |
. . . you get the idea
For this example, we will do 30,000.
Just like the Castlevania games.
2) Now we will tweak the code to increase your life once the score reached the benchmark:
Code:
LDA myScore_10000 ;;;;Load the 10,000 place
CMP myBenchmark ;;;;Check if the 10,000 place = benchmark
BNE +giveExtraLive ;;;;If so...
;;Instead of Increasing myBenchmark by ones,
;;we will increase them by threes,
;;or any number you want
LDA myBenchmark ;;;; Load the Benchmark
ADC #3 ;;;; Add 3
STA myBenchmark ;;;; Store the value on the Benchmark
INC myLives ;;;;Add an extra Live, by ones
;;;Update HUD Element -- only if you use a tile HUD
;;;If you have a Sprite HUD, you can skip this
UpdateHudElement myLives, #$02 ;<------ or whatever number your lives variable is in the HUD
+giveExtraLive
(requested by Scott Savage on Facebook, kudos to him!)
That's it!
Now your Score will be a bit less useless!
Last edited: