Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics


2D retro grapics engine with true raster effects for creating 8/16 bit style games · By megamarc

Issues loading sprites

A topic by Toonlink8101 created Mar 09, 2020 Views: 188 Replies: 2
Viewing posts 1 to 3

So, I've been trying a while now to get some custom sprites to display within Tilengine. However, until now, the only sprite I could get to work within my program was the smw_sprite from one of the sample files. Now, after simply loading the file in MS Paint and saving it, even that won't work. I've done everything I can to keep the files compatible, using both the recommended spritesheet packer as well as typing the text file by hand, but nothing seems to work.

My code runs fine until it tries to load the sprite. I have the following code to determine whether it was loaded correctly:

TLN_Spriteset mario;
    if (mario = TLN_LoadSpriteset("smw_sprite"));
        std::cout << "issues loading sprite";

Every time (with the aforementioned exceptions), this outputs "issues loading sprite" in the console, and no sprite is displayed in the game window.  

I am using the version available on GitHub prior to the recent fix to "TestMouse.c"

Is this a bug with Tilengine, or have I done something wrong?

For anyone with problems similar to mine, my issue was the file type I was using. Tilengine exclusively supports 8-bit image files, meaning my 32-bit files were incompatible. All image files must be converted into this format to be used. 


Release 2.6.0 added support for 24 and 32 bpp png files. However keep in mind that they must have less than 255 unique colors each.