Tilengine - The 2D retro graphics engine forum

Full Version: Tilengine doesn't like certain PNGs?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My level just displayed completely black - until I replaced the PNG of the tileset (tiles.png).

The problem is definitely the PNG file, I think maybe related to the palette;
  • Swapping my png file (tiles.png) with one of the others from the samples, displays the level - but with the wrong tiles of course
  • Opening one of the sample png files in Aseprite (eg. castle_bg.png) and pasting my artwork into it, then saving it, displayed my level correctly.
  • But opening and re-saving the original tiles.png in both Aseprite and GIMP, didn't work.  They may be maintaining the original palette.
tiles.png was originally exported from Pico-8.  I would say Pico-8 might be doing it wrong, but tiles.png still opens correctly in every editor and viewer that I tried.

I've attached a zip of my map and tileset. Try placing it in the assets folder for the samples, and get one of the samples to load it, you'll see the blank screen instead.
just checked your png, you didnt set it to indexed mode - try this one
Greysonstorm is right, your png is 24-bit true color, whereas Tilengine accepts only 8-bit indexed color pngs. It's great that you provided the related assets, this way it's very easy to find the mistake.
Ah, that is obvious now that it's mentioned... Smile Thanks.