FudgeFiddle Posted September 8, 2014 Share Posted September 8, 2014 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? Quote Link to comment Share on other sites More sharing options...
bogax Posted September 9, 2014 Share Posted September 9, 2014 (edited) 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 September 9, 2014 by bogax Quote Link to comment Share on other sites More sharing options...
FudgeFiddle Posted September 9, 2014 Author Share Posted September 9, 2014 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. Quote Link to comment Share on other sites More sharing options...
bogax Posted September 9, 2014 Share Posted September 9, 2014 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 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.