Is there anyone else having a hard time doing a simple thing like displaying a full screen image exported from Piskel (pokitto version)?
I imported an image with 5 colours in Piskel. Set the colours to HEX and 16 made sure the palette is made of the image colours.
The I export the .h file and the image displayed on the pokitto is showing only black and white.
I really just did like in the tutorial that was teaching hot to display the pokitto icon…
I can’t believe that I am struggling with something so basic…
Did you notice that you need to create a palette that stores your colours?
Section 2.3.2 in the guide
This is a hardcoded limitation of Piskel that would require lots of rework. The problem is that palette (aka Current colors) only saves colors that are in active graphic.
Creating your own pixel art for your Pokitto program
If you are familiar with creating pixel art, you can jump directly to chapter 3, the exercise. If you just want the link to the program, it is here ->
1.1. What are pixels, and where are they stored?
1.2. Designing your own Pixel Art
1.3. Using a computer for making pixel art
Piskel - pixel art web application for Pokitto ( www.pokitto.com/piskel)
2.1. The Piskel User Inteface
Yes. I went to add palette and then loaded the palette from the image itself. Still it’s not displaying any colours on the pokitto. I know i am probably missing a small detail somewhere…
Could you maybe post your code?
(small chance that I will solve your problem but maybe someone else will be able to help you )
@Jonne looks like I had to actually input a name manually for the palette to be saved… Weird.
Anyway the important thing is that it is displaying the title screen now.
@sbmrgd I knew my code was ok, just wasn’t sure how the colours were handled in Piskel for the export. But thank you for offering help.
When coding a game. Should I use only 1 palette? What I mean is that since I am loading the palette at the start of my main.cpp file. Should I have all the colours used in the whole game in that file or I need to load a palette for each sprites that the game is using.
Sorry for the newbie question but i never had to code a game in colour before( I am used to 1bit gfx)
You can only have one at a time.*
You can change the palette as much as you like though.
(I.e. you could have one palette for the main screen and one for the game itself, and yet another for a settings menu.)
* This is a bit of a lie, the sprite modes** support using different palettes for the sprites
** The ‘sprite’ modes emulate actual hardware sprites. Originally the term sprites referred specifically to hardware sprites, where the background was made from tiles and there were a limited number of sprites that could be drawn anywhere on the screen (sometimes there was a limit to the number of sprites/palettes per scanline).
So basically it’s 1colour palette per screen at once.
So I should declare a full 16 colours palette and then the sprites used per screen should use anything included in that palette right?
It depends on which screen mode you are using
A detailed list of all screen modes
Name: Hires 4-color mode
Useful for: High resolution with low screen buffer RAM usage
Type: Raster, Screen Buffer
Resolution: 220x176 (native)
Bit Depth: 2 bpp
RAM Usage: 9680 bytes
My_settings.h: PROJ_SCREENMODE = 1 or PROJ_HIRES = 1 (deprecated)
Screen Mode Define: MODE_HI_4COLOR
Other Features: Sprites, Dirty Rects
Name: Lores mode / fast 16 color mode
Useful for: Fast 16 colors with low screen buffe…
Drawing images the normal way (through calls to
drawBitmap) uses the global colour palette,
so whatever colours you’ve loaded the palette with are the colours that the bitmaps will use.
Like I say, certain modes suport ‘proper sprites’ which can use different palettes,
but you probably won’t be needing to use those for now, you can look into them later.
If you want to make life simple for yourself then the answer is yes