🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

A C64 Game - Step 50

posted in New Old Things
Published April 14, 2012
Advertisement

In this step the powerups for range increase and decrease reload delay are made permanent. They won't fade with time.
You can also collect up to five extras to reach the maximum. And the powerup stays even when you get killed. (Don't you hate it when you die in Bubble Bobble and you're slow again).



Previously we had a flag that stored the time left of a faster reload. The max times are now kept in a table, and a faster reload step value is stored instead.

The speed table RELOAD_SPEED_MAX and other counters for this update:

PLAYER_RELOAD_SPEED
          !byte 0
RELOAD_SPEED
          !byte 1,1,1,1,1
RELOAD_SPEED_MAX
          !byte 40,35,30,25,20

Initialising on game restart:


          lda #0
          sta PLAYER_RELOAD_SPEED

During standing still the reload speed value is now used to count down the time.


          ldy PLAYER_RELOAD_SPEED
          lda PLAYER_STAND_STILL_TIME
          clcadc RELOAD_SPEED,y
          cmp RELOAD_SPEED_MAX,y
          bcs .ReloadTimeDone

          sta PLAYER_STAND_STILL_TIME
          jmp .HandleFire

.ReloadTimeDone
          lda #0
          sta PLAYER_STAND_STILL_TIME

During pickup of the increase reload speed the counter needs to be updated:


          lda PLAYER_RELOAD_SPEED
          cmp #4
          beq .SpeedHighestAlready
          inc PLAYER_RELOAD_SPEED
.SpeedHighestAlready 

Making the force range increase permanent is even easier, we simply remove all instances where it was reset to the start value on respawning and starting the next level.


step50.zip

Previous Step Next Step

Previous Entry A C64 Game - Step 49
0 likes 2 comments

Comments

O-san
Looks great, reminds me of good old Ghosts 'n Goblins. I tried running the game but couldn't get it to start up. After Load "..",8,1 Ready, Run... then nothing happens.
April 19, 2012 11:00 PM
Endurion
Sorry, I just saw your comment.
The .prg extension is a fake emulator medium. Usually you can attach it via the tape (or drag/drop the .prg file onto your emulator). It should autostart then, you shouldn't have to manually load something.
May 04, 2012 07:21 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement