Jump to content
  • Advertisement
  • entries
  • comments
  • views

A C64 Game - Step 90

Sign in to follow this  


And the boss got a bit more lively (visually), it was quite stiff previously. Moving body parts and the head screams (also visually) when getting hurt.


The boss helper code is enhanced by a routine doing circling movements:

          jsr GenerateRandomNumber
          and #$03
          bne .DoY

          inc SPRITE_MOVE_POS,x
          lda SPRITE_MOVE_POS,x
          and #$0f
          sta SPRITE_MOVE_POS,x
          ldy SPRITE_MOVE_POS,x
          lda BOSS_DELTA_TABLE_X,y
          beq .DoY
          sta PARAM1

          bmi .Left

          jsr MoveSpriteRight
          dec PARAM1
          bne .Right
          jmp .DoY

          jsr MoveSpriteLeft
          inc PARAM1
          bne .Left

          jsr GenerateRandomNumber
          and #$03
          bne .Done
          inc SPRITE_MOVE_POS_Y,x
          lda SPRITE_MOVE_POS_Y,x
          and #$0f
          sta SPRITE_MOVE_POS_Y,x
          ldy SPRITE_MOVE_POS_Y,x
          lda BOSS_DELTA_TABLE_Y,y
          beq .Done
          sta PARAM1

          bmi .Up

          jsr MoveSpriteDown
          dec PARAM1
          bne .Down
          jmp .Done

          jsr MoveSpriteUp
          inc PARAM1
          bne .Up


Plus a rather simple swinging table:

          !byte 0, 1, 0, 1, 1, 0, 1, 0
          !byte 0, $ff, 0, $ff, $ff, 0, $ff, 0
          !byte 0, 1, 0, 1, 1, 0, 1, 0


To make the boss' head scream we adjust its hurt routine:


;hit behaviour getting hurt
!zone HitBehaviourBoss7
          lda #SPRITE_BOSS_HEAD_HURT
          sta SPRITE_POINTER_BASE,x
          jmp HitBehaviourHurt



Previous Step Next Step


Sign in to follow this  


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!