Jump to content
IGNORED

Life counter


RHillFake

Recommended Posts

At the very end of your code include the mini kernel that you prefer for lives support

 

inline 6lives.asm

 

At the top where you dim your variables you can also "dim" whether your lives are centered (if the mini kernel supports it)

 

dim lives_centered = 1

Somewhere near the top (usually in the part where you're initializing things) you need to set the life color

 

lifecolor = $46

 

If you want to add a life during game-play just increment the lives variable by 32

 

lives = lives + 32

 

If you want to take away a single life then subtract by 32

 

lives = lives - 32

 

Please note that 6lives.asm gives you six on-screen life icons. This means six lives = 192. Five lives = 160, etc..

 

EVERY TIME you call the drawscreen routine you must load up the sprite that is your life counter. I find this works best just before the drawscreen.

 

lives:
%00001000
%00011100
%00111110
%01111111
%11111111
%10111111
%01100110
%00000000
end

drawscreen

  • Like 2
Link to comment
Share on other sites

At the very end of your code include the mini kernel that you prefer for lives support

 

inline 6lives.asm

 

At the top where you dim your variables you can also "dim" whether your lives are centered (if the mini kernel supports it)

 

dim lives_centered = 1

 

Somewhere near the top (usually in the part where you're initializing things) you need to set the life color

 

lifecolor = $46

 

If you want to add a life during game-play just increment the lives variable by 32

 

lives = lives + 32

 

If you want to take away a single life then subtract by 32

 

lives = lives - 32

 

Please note that 6lives.asm gives you six on-screen life icons. This means six lives = 192. Five lives = 160, etc..

 

EVERY TIME you call the drawscreen routine you must load up the sprite that is your life counter. I find this works best just before the drawscreen.

 

lives:

%00001000

%00011100

%00111110

%01111111

%11111111

%10111111

%01100110

%00000000

end

drawscreen

Thanks. It worked :P

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...