Jump to content
  • Advertisement
  • entries
  • comments
  • views

A C64 Game - Step 83

Sign in to follow this  


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.


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.

          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 
          jmp .EnemyKilled

Have fun!


Previous Step Next Step

Sign in to follow this  


Recommended Comments

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.

Share this comment

Link to comment

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!