Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!






A C64 Game - Step 93

Posted by Endurion, in C64 30 March 2013 · 670 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 Posted Image

Attached Image

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!



Previous Step Next Step

Attached Files






April 2015 »

S M T W T F S
   1234
567891011
121314151617 18
19202122232425
2627282930  
PARTNERS