KevKelley Posted January 10, 2023 Share Posted January 10, 2023 (edited) 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. 2600basic.h 2600basicheader.asm Edited January 12, 2023 by KevKelley Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 10, 2023 Share Posted January 10, 2023 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). 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 10, 2023 Author Share Posted January 10, 2023 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! Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 10, 2023 Author Share Posted January 10, 2023 I would imagine that since I use SuperChip, the loss of two variables isn’t terribly big deal. 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 10, 2023 Share Posted January 10, 2023 2 minutes ago, KevKelley said: I would imagine that since I use SuperChip, the loss of two variables isn’t terribly big deal. Let me know if you want details on what needs to be changed on the assembly side to get it to work. 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 10, 2023 Author Share Posted January 10, 2023 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 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 11, 2023 Share Posted January 11, 2023 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: 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. Edit 2600basic.h and comment out the definitions for pfscore1 and pfscore2 by putting a semicolon at the beginning of each line (not REM). 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. 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 11, 2023 Author Share Posted January 11, 2023 Ahh. I was just looking at the various includes and I admit I was a bit unsure where to start. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 12, 2023 Author Share Posted January 12, 2023 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. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 12, 2023 Author Share Posted January 12, 2023 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. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.