Jump to content

April 2017 »

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30       
- - - - -

A C64 Game - Step 83



4: Adsense

And here's a new extra for Sam. It works similar to the super bullet. For every demon blood picked Sam can destroy an enemy with one touch.


Attached Image


The code is quite similar to the super bullet. Add a new counter variable (DEMON_BLOOD), a new item image, make it possible for the item to spawn as well.

At the item pickup we add this. If the player is Sam (means x = 1) increase the counter.
.EffectDemonBlood
		  cpx #1
		  bne .DeanDoesNotUseForce
		  inc DEMON_BLOOD
		  jmp .RemoveItem
		 




At the hurt enemy part we add this little snippet. If we have a DEMON_BLOOD, decrease the count and kill the enemy right away.




lda DEMON_BLOOD
		  beq +
		  dec DEMON_BLOOD
		  jmp .EnemyKilled+
		  dec SPRITE_HP,x
		  bne .EnemyWasHurt
		 
.EnemyKilled


Have fun!


Previous Step Next Step

Attached Files

Jan 20 2013 03:52 PM
Cool! What image file format are the sprites? Game is fun.
Jan 21 2013 01:22 AM

Sprites are 24x21 pixels in hires mode with 1 color, or 12x21 in multi color mode with double with pixels. In multi color mode you get to choose one custom color and two colors are shared with all other multi color sprites. Multi color can be enabled per sprite.

Jan 24 2013 12:42 AM
Nice!!!

Note: GameDev.net moderates comments.