Jump to content
IGNORED

6 Lives Statusbar AND Pfscores


KevKelley

Recommended Posts

UPDATED

 

This post has included edited files to place in game directory.  As mentioned below, DIM pfscore1 and pfscore2 to a variable in your program in addition to using the 6 lives and statusbar include to have both lives, statusbar, and pfscore bars.

 

 

So I forgot to delete some lines in my program when switching over to 6 Lives and Statusbar and I noticed I got I got a bit of both in the process.  Now I noticed things were not perfect.  I ran into scanline issues and the lives did not appear so the status bar looked more like a cigarette (game idea??).

 

I got this effect by simply defining the pfscore constant as "1."

 

Now after some more playing around I was able to pretty much eliminate the scanline issues by reducing the pfres (I am using SuperChip RAM).  I assume this is because of how the kernels are made and by keeping the pfres high and adding more and more stuff like the statusbar just screws things up. Now if I define the pfscore1 and pfscore2 I get the cigarette effect.  If I comment them out I get my lovely little life sprites and a statusbar but I noticed that the pfscore2 section is kind of populated by seemingly random playfield pixels. 

 

I haven't dug too much into this but I was wondering then if it would be possible to keep both playfield bars, 6 lives, and statusbar? Or would that require minor kernel modification?

 

I haven't figured out how to modify the pfscore bars yet.

 

 

 

BuBu_2023_01_09.bas_1.png

BuBu_2023_01_09_b.bas_1.png

2600basic.h 2600basicheader.asm

Edited by KevKelley
Link to comment
Share on other sites

The pfscore1 and pfscore2 variables both use the same memory address as the lives pointer in the standard kernel, so that means defining or changing lives will mess these bars up, and changing these bars will mess up the lives, too. It could be done with a kernel change to set pfscore1 and pfscore2 to use different memory addresses (meaning that you would have to sacrifice two of your available variables to get this to work).

  • Thanks 1
Link to comment
Share on other sites

33 minutes ago, Karl G said:

The pfscore1 and pfscore2 variables both use the same memory address as the lives pointer in the standard kernel, so that means defining or changing lives will mess these bars up, and changing these bars will mess up the lives, too. It could be done with a kernel change to set pfscore1 and pfscore2 to use different memory addresses (meaning that you would have to sacrifice two of your available variables to get this to work).

Cool! That explains why when I changed the lives value the bar appeared. Could be a neat to play around with. In this game I was just looking for a longer statusbar. In my Red Light Green Light game I just made my own bar at the top of the screen but since in this game I use pfscroll I needed a bar to stand still. The possibilities of having a timer bar, life counters, and two other bars or counters seemed promising. 
 

I may mess around with this combo I. The future for fun. I love fiddling around with values and whatnot. Reminds me of when I was younger learning to program and doing the same. 
 

thanks!

Link to comment
Share on other sites

On 1/10/2023 at 7:51 AM, KevKelley said:

That might be very helpful!

 

I was just going to blindly poke around with just a vague idea of what to do. I figured several days of this and I might just learn what to do! Lol

Here's the easiest way I've found to do it. Let me know if this works for you:

 

  1. Copy the files 2600basicheader.asm and 2600basic.h from the bB includes directory to your project directory so that those versions will be seen first.
  2. Edit 2600basic.h and comment out the definitions for pfscore1 and pfscore2 by putting a semicolon at the beginning of each line (not REM).
  3. In your game, add dim statements for pfscore1 and pfscore2, assigning each of these to a different variable.

 

No changes need to be made to 2600basicheader.asm, but it doesn't seem to pick-up the customized 2600basic.h unless it is also present in that directory.

  • Thanks 1
Link to comment
Share on other sites

This is really cool and I cannot wait to try it. Although I have plenty of projects that require my attention I can imagine some cool uses for something like this, like having the lives and status bar to keep track of lives and health while the pfscores used as something like ammo or inventory. I imagine using separating the score and changing the numbers to be symbols. And if using something like SuperChip there are plenty of variables to do things like save inventory levels if you wanted to switch things. 
 

I already have some ideas. Lol. 

Link to comment
Share on other sites

With the suggested edits from @Karl G above, having a statusbar, lives, and pfscore bars at the same time is possible.

 

I included the files in the first post and here is a little screen of a possibility.  The image is of an idea where at the bottom the indicators show your number of ships, health, primary, and secondary weapons.  Of course this set up might not work for two players but as a single player shoo

 

I am sure there are many other possibilities.  

SM_2023_01_11_23.bas.png

  • Like 2
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...