Imagetable from sequential frames

I noticed the SDK mentions “Sequential image tables” that can be loaded by having filenames with the suffix “-table-<sequenceNumber>”. I’m trying to use this to load a logo animation, because there are too many frames to fit into a reasonably sized sprite sheet.

I have labeled my images (all in one folder) “intro-table-x.png”, all the same dimensions. However the imagetable consistently only loads the first frame, no matter how many images I feed it or what I rename them to. I’m on SDK 0.11.1, wondering if anyone else can reproduce this?

For now I have opted to use an optimized GIF to load the frames, and while that works it makes the workflow a lot harder.

This works for me.

My 288 images are named in this pattern:

twingo-table-001.png
twingo-table-002.png
twingo-table-003.png
twingo-table-004.png
twingo-table-005.png
twingo-table-006.png
twingo-table-007.png
...
twingo-table-288.png

and the call to load them from the folder TEST:

self.frames = gfx.imagetable.new("Vehicles/TEST/twingo")
1 Like

Solved! The leading zeroes are key (though this is a bug). https://dev.panic.com/Playdate/Playdate/-/issues/186

2 Likes

strcmp() strikes again. fixed in 0.12, hopefully out soon!

2 Likes

Hi! I'm still experiencing this in 1.12.3. I have images called X-table-1.png through X-table-13.png. The SDK managed image 1 and 2, and then stopped there when loading the image table. Additionally, the error persisted even after renaming the files to have leading zeroes, until I did a clean build (deleted the pdx output folder and recompiled).

Sounds like that might be this bug: Pdc does not update Imagetables If it's still happening for you with 1.13 (once that's out) please let us know!

1 Like