Re: Blank Window (Tile Engine)

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...

As a test, I ported Tutorial.c to Euphoria and got the same problem. When I checked the result of TLN_SetLayerTilemap() it was returning zero, so I grabbed the last error and printed it out:

atom tilemap = TLN_LoadTilemap( "assets/sonic/Sonic_md_fg1.tmx" ) 
if not TLN_SetLayerTilemap( 0, tilemap ) then 
    integer errno = TLN_GetLastError() 
    sequence errmsg = TLN_GetErrorString( errno ) 
    printf( 2, "Error %d: %s\n", {errno,errmsg} ) 
end if 

Tilengine v2.14.0 64-bit built Feb  1 2023 19:08:33 
Error 6: Invalid Tileset reference 

I think you need to all of the assets as they seem to reference each other. You'd probably have to open them with Tiled to see what-references-what since the content is all base64/zlib encoded.

Once I extracted the entire assets directory and updated the path to "assets/sonic/Sonic_md_fg1.tmx" your demo worked correctly. At the very least, you probably need the contents of the sonic folder.


You were right Greg. At the very least I needed the sonic folder and it showed up.

Updated example

without warning 
without type_check 
include std/ffi.e 
include tilengine.e 
object fg = TLN_LoadTilemap("sonic/Sonic_md_fg1.tmx",NULL) 
? fg 
if fg = -1 then 
	puts(1,"Failed to load background!\n") 
end if 
while TLN_ProcessWindow() do 
end while 
new topic     » goto parent     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu