Jump to content
satyrsfaction

Variables for colors?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

No.  Just like the sprite data, the color data is stored in ROM, so the values cannot be changed.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (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 by Lillapojkenpåön

Share this post


Link to post
Share on other sites
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.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...