🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

Tool making?

A topic by Dariusz "Darkhog" G. Jagielski created 141 days ago Views: 274 Replies: 8
Viewing posts 1 to 7

Let's say I got a compression function that outputs a lua table that contains compressed data. How do I get it from my tool to game's code so I can remove original data and just use compressed one to save cart space?

i.e. I have for example following function

function compress(uncompressed_table)
--do some compression stuff
return compressed_table
end

How do I get compressed_table out of that tool and into my program?

Developer

you can save compressed data to Sprites area (0x4000) using POKE api and then export/import it

I see. However I prefer to get it into the code instead of having to utilize sprites for that. If we could copy output from the console, it'd be quite easy - just trace() it and then copy-paste.

Developer

you can copy console output, just run 

tic > log.txt

and all the trace output will be in log.txt

When everything works out, please show the code, I'm interested in how to save the numbers in the text.

Hehehe... To do that I'd need someone to port this Pico-8 code to TIC and make it work on ordinary LUA tables: https://www.lexaloffle.com/bbs...

(Edited 2 times)

I tried to transfer to TIC-80 ) WIP

Really cool and seems to work well. Could you make it so the compression and decompression routines could take and return ordinary Lua arrays/tables instead of saving stuff to the sprite data?

Obviously the author of the script would have coped with this better than anyone else )