Jump to content
IGNORED

I have a mighty struggle - Lives counter, seeking guidance.


themewsh

Recommended Posts

So I've been clacking bits of code together like rocks and have to admit I am too in the weeds to know what's next.

Ive been trying to build a basic maze chase concept where the player loses a life if they touch the bad guy and the playfield resets...I have a long way to go, but where I am stuck now is the life counter. I want the player to have three lives, each time they touch the bad guy they lose one life. When there's no lives left, the screen color changes, things freeze, and its game over.


Right now Ive got my sprites in - Ive got a color change on collision, but need to tie that to a life counter, and the issue Im having is just getting a life counter to work in general. I have read several guides online and Im just not getting it regarding the minikernels.

This code right now is all standing on the shoulders of people who have been at this for much longer, and I humbly admit my contributions have been minute, but I am hoping someone here can help me understand what I need to do to get a life counter of basic little squares to display and count down, culminating in game over.

 

Any guidance is appreciated, thank you!

Squatchin_Around.bas

Link to comment
Share on other sites

You can't change the number of digits in the score.

You can however, black them out. An option is going into the score_graphics.asm file, adding an extra blank tile after the 9, which would be A. for example:

dim score1=score+2

score1=$3A

would make the first digit of the score the lives counter and the second digir the blank tile. This would mean the actual score would only be 4 digits long.

 

Another option if you only have three lives and want to keep all six digits in the score, is the lives kernel. More info on this can be found here: https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#lifecounterstatusbar

 

 

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, atari2600land said:

You can't change the number of digits in the score.

You can however, black them out. An option is going into the score_graphics.asm file, adding an extra blank tile after the 9, which would be A. for example:

dim score1=score+2

score1=$3A

would make the first digit of the score the lives counter and the second digir the blank tile. This would mean the actual score would only be 4 digits long.

 

Another option if you only have three lives and want to keep all six digits in the score, is the lives kernel. More info on this can be found here: https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#lifecounterstatusbar

 

 

Thank you, I really like the idea of adding extra blank tiles!

I love RT's site, but I think I must be doing something wrong with the location of the 6lives.asm file because I can't get anything to display to even consider taking that next slick step. Does it need to live anywhere other than where it sits in bB/includes/6lives.asm ?

Unrelated, I did add little noise for the fire button today that trips the enemy sprites timer to "confuse" its behavior on screen, so progress is happening!

 

Thanks again, I'll keep poking this thing.

Link to comment
Share on other sites

Posted (edited)
48 minutes ago, atari2600land said:

You need to put "include 6lives.asm" in your code. At the beginning if it's 2 or 4k, or at the beginning of the last bank if it's larger than 4k.

Editing for clarity.
 

Thank you, I tried inline at the end of the last bit of code per this thread:
 


That didnt do the trick, so I just tried it and "include" at the beginning of the last bank following your guidance and got the same result - everything compiles fine but nothing shows up on the screen.

 

I do appreciate your helping me out, I will keep at it until it works - and I fully admit I might just be looking at it all wrong or missing something here.

 


 

Squatchin_Around_TEST_counter.bas

Edited by themewsh
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...