Jump to content
IGNORED

Creating sprites for lynx, help me understand pallet limitations


sirlynxalot

Recommended Posts

I'm not new to drawing sprites, but I am new to worrying about keeping things to 16 (15?) colors. I have a few questions, one regarding lynx specifications, and 1 regarding workflow in gimp which I am a little new to.

1) So I read that the lynx is limited to a 16 color palette per scene/level. I know you can get fancier with a few tricks, but I have no trouble working within those confines, as most commercial lynx games did. Along those lines, I thought I read something here in the lynx programming contest thread, that 1 of the 16 colors is set aside for transparency? In that case, when making sprites, is it true that I should then use only 15 of the 16 colors in the palette on the actual sprites, for the colors and parts of the sprite that I want displayed?

2) Gimp workflow: I have figured out how to create a palette by importing colors from a picture. How do I set a palette as the "only" colors for a picture - such that I could maybe drop in a sprite I have created without concern to the lynx palette, and have it forced into the limited palette I set?

I know this isn't programming, but figured it belonged in this forum rather than the general lynx forum. Thanks for your help!

Edited by sirlynxalot
Link to comment
Share on other sites

Excellent link! I have these tutorials bookmarked but didn't check out this particular tutorial on collisions yet.

So, if I understand correctly, 16 colors in a palette will correspond to 16 different "pens," 0 to F, and depending on what type of sprite (boundary, normal, background-non-collidable), pen 0 may display its color, or it may be transparent? Based on the table in the tutorial, It seems that for a majority of sprite types, pen 0 will be transparent then, and I should plan my artwork using 15 colors more often than not.

Link to comment
Share on other sites

What I found most helpful with my technical ignorance is the color values.

 

Basically, set each color so that the R, G and B values each are one of these numbers:

 

0

17

34

51

68

85

102

119

136

153

170

187

204

221

238

255

 

It's all multiples of 17.

I chose my colors as I like when drawing, and then adjust them to the nearest values of that list.

 

15 colors is fine, plus the transparent color (to put in the first color slot).

Link to comment
Share on other sites

Excellent link! I have these tutorials bookmarked but didn't check out this particular tutorial on collisions yet.

 

So, if I understand correctly, 16 colors in a palette will correspond to 16 different "pens," 0 to F, and depending on what type of sprite (boundary, normal, background-non-collidable), pen 0 may display its color, or it may be transparent? Based on the table in the tutorial, It seems that for a majority of sprite types, pen 0 will be transparent then, and I should plan my artwork using 15 colors more often than not.

 

That saved me a lot of typing. Yes, you are right. That's how it works.

 

I'm not much of a graphics artist, but here are some things I found out playing with Gimp:

 

Assuming you have some clipart that has your desired colors (otherwise create your palette like 108stars described), open the png, jpg or bmp file.

Go to Image, Mode and choose Indexed... If it is already selected, switch to RGB first.

You will get a dialog. Select Generate Optimum palette and put 16 in the textbox for the number of colors. Select Convert.

 

Now open the toolbox for Colormap from Windows, Dockable Dialogs and also the Palettes toolbox. In the Palettes your palette is probably at the top and says "Colormap of Image # ([yourimage] (imported))". Rightclick and choose Duplicate. Then rightclick the new palette, Edit Palette and give it a new name, save it. It should show up in various dialogs that allow you to choose a custom palette.

In the Colormap toolbox you can rearrange the palette by rightclicking the colors.

Experiment. Have fun.

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