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 81

Posted by Endurion, in C64 05 January 2013 · 661 views

A new pickup! And it shines Posted Image

Sometimes one of those wondrous bullets of Samuel Colt will be dropped. Those can kill any enemy with one shot, so use them well!

Attached Image

The changes are quite simple. In the PickupItem routine we add a handler for those new items:
                  cmp #ITEM_SUPER_BULLET
		  beq .EffectSuperBullet
We make sure only Dean can use it and increase the super bullet counter:



.EffectSuperBullet		 
		  cpx #1
		  beq .SamDoesNotUseBullets
		 
		  inc SUPER_BULLET
The super bullet shot will flash red instead of white, so we add:





		  ;red flash for super bullet
		  lda SUPER_BULLET
		  beq +
		 
		  lda #2
		  jmp ++
		 
+		 
		  lda #1
++		 		  sta VIC_BACKGROUND_COLOR
and finally, at the enemy shot routine we add





                  lda SUPER_BULLET
		  beq +
		 
		  ;directly kill enemy
		  dec SUPER_BULLET
		  jmp .EnemyKilled
		 
+		 
		  lda SPRITE_HP,x
		  dec SPRITE_HP,x
		  lda SPRITE_HP,x
		  beq .EnemyKilled
Done!

BTW, the super bullet also works on bosses!


Previous Step Next Step

Attached Files






March 2015 »

S M T W T F S
1 2 34567
891011121314
15161718192021
22232425262728
293031    
PARTNERS