Jump to content
IGNORED

Playfield Help?


FudgeFiddle

Recommended Posts

Hi all. I'm having an issue with the playfield. I want to make the title screen so that the top words flash in different colors while the bottom words are red. Here is the code:

 set kernel_options pfcolors

_Title
 playfield:
 (Omitted for brevity)
end
 e=rand
 pfcolors:
 e
 e
 e
 e
 e
 e
 $40
 $40
 $40
 $40
 $40
end
 drawscreen
 if joy0fire then goto _Start
 goto _Title

So if I did this correctly shouldn't the top area change for each frame as the variable picks a new random number each time? Instead it just shows a light green every time. Am I doing this wrong or something?

Link to comment
Share on other sites

The playfield colors are in table(s) in ROM and
can't be changed.

I suppose it might just barely be possible
use RAM since you wouldn't be using it for
the title any way but I wouldn't bet on it.
For one thing the pfcolors table(s) seem to
come in 44 byte chunks and you'ld be pressed to
find that much RAM.

The simplest thing would probably be to
create a few pfcolors statements with
different colors and choose one at random
with on gosub or some such.


edit
And roughly speaking e is a constant
with the value $DA which is the address
of the variable.
When you put it in the color statement
it get's interpreted as a color.

Edited by bogax
Link to comment
Share on other sites

Oh ok. Thanks. I was able to do a similar color flash with sprites so I wasn't understanding why it wasn't working with this. I'll probably just use 2 pfcolor statements then.

 

 

 

I think the bB sets aside space for four whether you

you use it or not (in groups of four eg if you have five then

it uses space for eight)

Might as well use four if you want

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...