How to use Bitmap (BMP)?

Check out this thread. There is a tool that converts bmp files to the tables that you need to put in your game to display those images.

1 Like

If you have problems, just shout.

wishes for tutorials etc, put them here: What's Up? Discussion - what's going on, what going to come next

Thank you @catsfolly, @jonne. Now another question: What colors do the Pokkitto use on default palette? It seem to be the same random stuff like in the bitmap, or is there a difference?

I just downloaded the bmp2pok program on github, but it seems like theres something wrong. I can send a picture tomorrow. The second link navigate into nothing.

You can also use Effer’s img2pok. Check under “binaries” there is a zip with the latest file.

Ok. I will test it. I asked above about the default color. Is there anyway to made a picture from these Hexcode?

I am not 100% sure what you mean by the question.

Do you mean you want to do a picture with Pokitto “default palette”?

Yes. I want to use these 16 colors only. To do so, I must know the colors. I found the palletes in the PALLETs libery and they are explained in this 0x00 stuff. Is there an easy way to read it?

Ok.

First things first: there is no “default palette” in Pokitto. The display can do 2^16 = 65536 colors and I see no valid reason to limit the palette to a “predefined 16 colors”.

EDIT: I am not annoyed at your question. The reason why I am a bit upset is so many people have told me to “limit the colors to default 16 colors, like Pico 8”. But if you play Pixonia, and you see the palette slide from day colors to night colors, you begin to realize what amazing effects can be done with a free palette.

There are several ready-made palettes you can use.

You should load a palette that you like and use that same palette when you draw your bitmap.

If you have difficulty in deciding what palette to use, I suggest you use:

game.display.loadRGBPalette(palettePico);

palettePico is a copy of the famous Pico8 fantasy console palette.

3 Likes

The “0x00 stuff” that you have found here are RGB (Red, Green, Blue) hexadecimal values for each colour in the palette.

Found a good practical example for you to play with here:

http://home.lu.lv/~tv10012/rgb/

…if you press the + / - buttons next to Red, Green, and Blue you will see the hexadecimal values change as the page’s background colour changes, as well as the corresponding decimal values.

palPico.cpp for example, has the RGB values in decimal, not hexadecimal.

You could use a program like this to find RGB values for any colour on your screen just by pointing the mouse at them.

And there are a bunch a palettes you could play with here:

http://www.gridsagegames.com/rexpaint/resources.html#Palettes

The question then becomes, what program are you using to draw your images? There should be a way for you to choose the colour you are drawing with by manually entering the RGB values.

2 Likes

@jonne I´m sorry. I don´t knew about Pokittos´s 65536 colors. I see the possibilities are unlimited if you don´t use a palette. The main reason why I like to use a palette is that i´m not good in draw pixel-bitmaps and a limit of 16 colors would help me.

No do not be sorry :smile: That was not my point.

I understand its quite difficult to draw pixel graphics nowadays because there is no “palette” anymore. You just have 16 million colors :grin:

I will make some kind of a tutorial on this

1 Like

Thanks! That´s I had needed!

I´m using paint.net a lot. There´s a way to enter RGB values. If it don´t work I can switch to GIMP, but I don´t like this program because it had too much features.

1 Like

Ok :grin: . I will now try to use my bitmap on my little(not realy great working)Pong. I will send a picture later.

2 Likes

My bitmap seems to don´t load correctly. There are green columns right to the bitmap.


Thats the palette i´m using (my own by the way, do you like it?) .

Palette in img2pok tool.
Anyone know this problem?

2 Likes

Your paddle image is 5X20 pixel. Can you try with an image 4X20?
Maybe there’s some problem with odd pixels.

2 Likes

Works. (Ignore the red color, its just a palette mistake by me)

EDIT: @HomineLudens Why 5x20 dosn´t work? It would be easier if I could keep the 5x20

2 Likes

As you said it seems that every odd number makes this green column. Do you know a way to fix this?

16 color mode means 4 bits per pixel. The computer memory is organized as bytes, with 8 bits to a byte.
So your pixel maps must be an even number of pixels wide. You can’t fix it, that is the way it works.

If you want a paddle that is 5 pixels wide, make the bitmap 6 pixels wide, and draw the rightmost column in the transparent color. That way, on the screen only 5 columns will be visible.

4 Likes

Oh! Thank you! I´m new in this stuff and this is understandable for me.

1 Like