satyrsfaction Posted April 13, 2020 Share Posted April 13, 2020 Is it possible to use variables when assigning colors to a sprite, like in a "playerXcolor" statement? I tried, and got weird results -- not the colors I intended. Quote Link to comment https://forums.atariage.com/topic/305440-variables-for-colors/ Share on other sites More sharing options...
+Karl G Posted April 14, 2020 Share Posted April 14, 2020 No. Just like the sprite data, the color data is stored in ROM, so the values cannot be changed. Quote Link to comment https://forums.atariage.com/topic/305440-variables-for-colors/#findComment-4509169 Share on other sites More sharing options...
+Random Terrain Posted April 14, 2020 Share Posted April 14, 2020 The good news is that you can use constants so you can instantly convert NTSC to PAL or the other way around: randomterrain.com/atari-2600-memories-batari-basic-commands.html#color_constants_ntsc_pal60 2 Quote Link to comment https://forums.atariage.com/topic/305440-variables-for-colors/#findComment-4509175 Share on other sites More sharing options...
satyrsfaction Posted April 14, 2020 Author Share Posted April 14, 2020 1 hour ago, Karl G said: No. Just like the sprite data, the color data is stored in ROM, so the values cannot be changed. but you CAN change them any time you want by assigning new values. I was interested in setting it up so the player could select his own colors for his sprite. Not sure how or if that is possible. Quote Link to comment https://forums.atariage.com/topic/305440-variables-for-colors/#findComment-4509249 Share on other sites More sharing options...
+Random Terrain Posted April 14, 2020 Share Posted April 14, 2020 4 hours ago, satyrsfaction said: but you CAN change them any time you want by assigning new values. I was interested in setting it up so the player could select his own colors for his sprite. Not sure how or if that is possible. You could give the player color sets to choose from. If you tried to give a player row by row color choices of over 100 colors for each row, you could run out of ROM space pretty fast. 1 Quote Link to comment https://forums.atariage.com/topic/305440-variables-for-colors/#findComment-4509448 Share on other sites More sharing options...
Lillapojkenpåön Posted April 14, 2020 Share Posted April 14, 2020 (edited) 7 hours ago, satyrsfaction said: but you CAN change them any time you want by assigning new values. I was interested in setting it up so the player could select his own colors for his sprite. Not sure how or if that is possible. You're not really assigning any new values to anything, you just set the pointer to point to that color table, which is in ROM, but you can point to RAM with a little bit of assembly, and then you can assign new values to that RAM. colors and graphics in RAM.bas Edited April 14, 2020 by Lillapojkenpåön Quote Link to comment https://forums.atariage.com/topic/305440-variables-for-colors/#findComment-4509482 Share on other sites More sharing options...
satyrsfaction Posted April 14, 2020 Author Share Posted April 14, 2020 9 hours ago, Random Terrain said: You could give the player color sets to choose from. If you tried to give a player row by row color choices of over 100 colors for each row, you could run out of ROM space pretty fast. well, what i was after was letting the player design their costume -- you would have a choice of boot color, pants color, etc. What I'll probably end up doing is just designing a bunch of outfits and letting the player choose. Not exactly what I wanted, but it would work. Quote Link to comment https://forums.atariage.com/topic/305440-variables-for-colors/#findComment-4509768 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.