Jump to content
  • Advertisement
  • entries
    104
  • comments
    102
  • views
    260229

A C64 Game - Step 93

Sign in to follow this  
Endurion

1747 views

An addon to make the other bosses a bit stronger against Sam. Now you need to re-grab the boss after every hit you place.
Previously Sam only had to stand there and keep fire pressed. Hardly a challenge :)

step93.png

First of all, a new enemy type is added. Normal enemies stay type 1, bosses are now type 3.

Most changes are in the FireSam routine. Add in the PLAYER_FIRE_RELEASED check:

.FireSam 
          ldy PLAYER_JOYSTICK_PORT,x 
          lda JOYSTICK_PORT_II,y 
          and #$10 
          beq + 
          
          ;not fire pressed 
          lda #1 
          sta PLAYER_FIRE_RELEASED,x 
          jmp .SamNotFirePushed 
          
+ 
          lda #1 
          sta PLAYER_FIRE_PRESSED_TIME,x 
          stx PARAM6 
          lda SPRITE_HELD 
          bne .NoFireReleasedCheck 
          
          jsr SamUseForce 
          beq .NoEnemyHeld 
          
          ldx CURRENT_INDEX 
          lda PLAYER_FIRE_RELEASED,x 
          bne + 
          
          jmp .SamNotFirePushed
          
+ 
          lda #0 
          sta PLAYER_FIRE_RELEASED,x
          
.NoFireReleasedCheck



In the enemy hurt routine we check if a boss was hurt (by checking the type). If it is, release the enemy from the force grip:

          ;enemy was hurt 
          ldy SPRITE_HELD 
          dey 
          lda SPRITE_ACTIVE,y 
          tay 
          lda IS_TYPE_ENEMY,y 
          cmp #3 
          
          ;if boss, auto-release 
          bne + 
          
          lda #0 
          sta PLAYER_FIRE_RELEASED,x 
          jmp .SamNotFirePushed 
          
+

Have fun!

step93.zip

Previous Step Next Step

 
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!