Jump to content
Sign in to follow this  
Random Terrain

Is it possible to have different colors for pfscore1 and pfscore2?

Recommended Posts

I searched this forum with the AA search and Google and don't see any mention of it. The way it is now, pfscorecolor changes the color of both pfscore bars, but is there any way to have two different colors? In the game I'm working on, the health bar changes color to yellow, then red as a warning that your health is getting too low, but that means the lives bar would change color too. I'd like to keep the color of the lives bar separate if possible.

 

If it's not possible to have 3 separate colors (for the score, pfscore1, and pfscore2), would it be possible to make pfscore1 share the score color? That way the pfscore1 color would remain unaffected by pfscorecolor.

 

 

Thanks.

Edited by Random Terrain

Share this post


Link to post
Share on other sites

The way it is now, pfscorecolor changes the color of both pfscore bars, but is there any way to have two different colors? In the game I'm working on, the health bar changes color to yellow, then red as a warning that your health is getting too low, but that means the lives bar would change color too. I'd like to keep the color of the lives bar separate if possible.

 

If it's not possible to have 3 separate colors (for the score, pfscore1, and pfscore2), would it be possible to make pfscore1 share the score color? That way the pfscore1 color would remain unaffected by pfscorecolor.

I haven't looked into it yet, but either scenario should require changes to one or more include files. Assuming pfscore1 and pfscore2 are separated from each other on the screen-- e.g., on different lines, or on different sides of the screen-- then it should be possible to give them two separate colors as long as it doesn't mess up any important timing on those lines.

 

Michael

Share this post


Link to post
Share on other sites
I haven't looked into it yet, but either scenario should require changes to one or more include files. Assuming pfscore1 and pfscore2 are separated from each other on the screen-- e.g., on different lines, or on different sides of the screen-- then it should be possible to give them two separate colors as long as it doesn't mess up any important timing on those lines.

Thanks. I hoped that pfscore1 sharing the score color would be easier and less likely to mess things up, but if it would be just as hard, maybe we'll end up with 3 colors instead of 2 one of these days.

Share this post


Link to post
Share on other sites

Almost forgot about this thread. If bB users can get some version of this, our games will be even better.

Share this post


Link to post
Share on other sites

I don't think this is going to be possible, as requested.

 

pfscore1, pfscore2, and the 6 digit display all happen on the same scanlines... there isn't enough time for a single color change, let alone 2. The CTRLPF score mode doesn't help either, since both players are being used to draw the score on those lines, so they can't be set to different colors.

 

One solution would be to flicker the colors: turn off pfscore1 in one frame and use one color, turn off pfscore2 in the next frame and use another color.

 

Or the kernel could be modified so pfscore1 and pfscore2 are on different lines than the score.

 

Either way, something has to give.

Share this post


Link to post
Share on other sites

Thanks for the info.

 

 

One solution would be to flicker the colors: turn off pfscore1 in one frame and use one color, turn off pfscore2 in the next frame and use another color.

 

Or the kernel could be modified so pfscore1 and pfscore2 are on different lines than the score.

Either one would be fine with me. I just need to be able to change the color of a health bar without it changing the color of anything else. Whatever would be easier for the magic maker (asm programmer).

Share this post


Link to post
Share on other sites

Flickering is best left in the hands of the basic program... bB doesn't track a framecount, and depending on your requirements you can do better than a general flicker routine.

 

I've attached two different routines that illustrate flickering for dual-color pfscore.

 

The first is a straightforward routine that independently flickers both bars. Either lives or health can be any arbitrary color.

 

The second takes advantage of the fact that you want to use green, yellow, and red for your health bar colors. Since red+green is yellow, it means that your lives can be yellow and have reduced flicker, and the health bar will flicker less when it's in the yellow region.

 

Try these out on the background color you're interested in. If they're not satisfactory, I'll scare up a minikernel to draw the pflives above the score, though you'll need to sacrifice display lines if you're using them all.

 

PfscorecolorFlicker.1.bas

PfscorecolorFlicker.1.bas.bin

PfscorecolorFlicker.2.bas

PfscorecolorFlicker.2.bas.bin

  • Like 2

Share this post


Link to post
Share on other sites

I did the flicker thing and it seems to be working fine so far. Don't know what it will look like on a real Atari 2600, but it looks OK with Stella if you hit alt + p except for the red color ($42) on that green strip ($C4). Red kind of turns into a faded pukey orange-ish color.

 

pfscorecolor_flicker_1_2011y_01m_19d_1558t.bin

 

 

 

Thanks.

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...