Hello, I'm currently making my first game and I'm using the compressor from dw817 to store png images in code. Then decompress it at precise moments (One image for intro screen and one for the background).
Everything is fine until I launch the game. The images appear but it's laggy as hell. On my intro screen I have to press the start button 10 times before the game launch, and so it display at max 1 FPS.
I think it's because the method i'm using for these images is way too heavy for the game. Do someone have an idea if there is a better way to display my images ?
In case of, here is my cartridge. The images are stored into draw_splash_screen() and draw_fujisan() functions.
Thanks in advance.
So in fact dw817's tool work only on still cartridge ?
- you would better store the image bytes as a string
How could I do it efficiently ?
Also PX9 tool seems daunting for someone starting from nothing. I'm starting to learn how pico8 is managing the memory, but where should I start for learning requisite stuff for understanding these parts ?
Thanks for your answers.
Ping @SyntaxError: demo cart for real-time string to screen display.
- import image in cart (import xxxx.png)
- uncomment spritesheet to string code
- run cart
- copy clipboard in text editor (Sublime, VSCode...)
- remove 0x and . char
- put everything on 1 line
Note: these 2 steps could be done in pico-8 code. Exercise left to the reader :]
- copy string to splash variable
Note: this is using poke4 to copy 8 pixels per loop while decoding the string.
[Please log in to post a comment]