Jump to content

  • Log In with Google      Sign In   
  • Create Account






A C64 Game - Step 90

Posted by Endurion, in C64 09 March 2013 · 558 views

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.

Attached Image


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

.Right
jsr MoveSpriteRight
dec PARAM1
bne .Right
jmp .DoY

.Left
jsr MoveSpriteLeft
inc PARAM1
bne .Left

.DoY
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

.Down
jsr MoveSpriteDown
dec PARAM1
bne .Down
jmp .Done

.Up
jsr MoveSpriteUp
inc PARAM1
bne .Up

.Done
rts


Plus a rather simple swinging table:
BOSS_DELTA_TABLE_X
!byte 0, 1, 0, 1, 1, 0, 1, 0
BOSS_DELTA_TABLE_Y
!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
HitBehaviourBoss7
lda #SPRITE_BOSS_HEAD_HURT
sta SPRITE_POINTER_BASE,x
jmp HitBehaviourHurt



Previous Step Next Step

Attached Files






April 2014 »

S M T W T F S
  12345
6789101112
13141516171819
20 212223242526
27282930   

Recent Entries

Recent Comments

PARTNERS