freehabitat Posted February 4, 2008 Share Posted February 4, 2008 hello,... i thought about someting since a time. the TIA shows 128(pal104) different colors. for example, i choose 20 colors out of them. this selection is for a player/missile/whatever ... and should change by any action (collision,firebutton,.. ). how can i start with that? i am not shure how to tell the atari that it has only the selected to use and not the whole chart? it should be simular to random color. just that i can do the step whitch changes the color. hope this is to understand for others ?? best f. Quote Link to comment Share on other sites More sharing options...
LS_Dracon Posted February 4, 2008 Share Posted February 4, 2008 Do you want a random color, but in a limited range? Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted February 4, 2008 Share Posted February 4, 2008 If I understand correctly, you want to pre-define a list of 20 colors, use the first color for some object (e.g., player0), and then whenever some event occurs (e.g., pressing the fire button) the color of the object will advance to the next color in the list, and will cycle back to the beginning of the list after it has reached the end? The easiest way to do that is with an array of ROM data: dim current_color = a current_color = 0 player0: %11111111 %11000011 %11000011 %11000011 %11111111 end player0x = 80 player0y = 44 loop COLUP0 = player0_color[current_color] drawscreen if joy0fire then current_color = current_color + 1 if current_color = 20 then current_color = 0 goto loop data player0_color $10,$14,$18,$1C,$40,$44,$48,$4C,$60,$64,$68,$6C,$80,$84,$88,$8C,$C0,$C4,$C8,$CC end Michael Quote Link to comment Share on other sites More sharing options...
freehabitat Posted February 4, 2008 Author Share Posted February 4, 2008 (edited) jop, thats what i am looking for. data player0_color thats the code i did not know,... thanks a lot well,.. i tried to include the code in the frame_program but i was not that succsefull this time,... somehow my steering is blocked,... i guess it´s only the order of priorities... should the loop for colors be a subroutine or something !? thanks, Tom frames.02_col.bas Edited February 4, 2008 by freehabitat 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.