Json data compression???

Status
Not open for further replies.

Duhjoker

Well-known member
i started a new thread for this particular subject since it was so off topic from my last thread. I'm building a game for my T3 handheld game console and tilemaps or back grounds for the game. And are pretty expensive when it comes to bigger maps. So they are taking up a lot of space.

What I really need to understand is how all this works. Is it the json data that makes up my tilemaps or is it something else?

I did some general searching and saw something about Json data compression with arduino. Could this be a solution?

Maybe something like compressing the actual Json data then when calling to draw the tile map you can have it point to specific sets of data?
 
Last edited:
This is a pretty abstract question....

You might get better discussion if you posted a sample of the data. Details like a link to the "something" you saw about Json data compression with arduino might also be useful for a question of whether that's the solution.
 
I was actually hoping that maybe you were familiar with some of the Arduino compression stuff. The stuff I saw during my google searches was questionable but didn't know where to start. Last night I was over that the pretty much dead gamebuino site to post some info about my game and was explaining how much storage space the tilemaps were taking and someone actually answered with a clue.

http://gamebuino.com/forum/viewtopic.php?f=13&t=3260

So the short of it is I can turn my map data into dat files which can be read from the sd. Heres a link to the repository with the code....

https://bitbucket.org/valdenthoranar/tilemaptest/src

I'm trying to figure out how it works but it uses multiple ino files which confuses me since there can only be one ino file in a program.

would any body mind helping me with this?


edit::

ok so the author is using the ino files and h files like libraries. The program file is tilesettest.ino.
 
Last edited:
For some reason I followed the links some - I don't see any mention of JSON- and not sure how it would apply.

The meat of the linked items is having SD storage and paging in the tile map data that won't fit in RAM/FLASH as needed. It doesn't seem to be compressed, but it is only B&W data and much smaller.

The note "packs the data into one .DAT file" just says what you are using now as 'in memory (FLASH) images' is packed or organized usefully/logically in a single file on the SD card. But again that didn't suggest compression or JSON usage as I saw it.

With the RAM on Teensy (depending on which T_3.?) you might fit a full tile map - and keep the sprites in flash or some combination? Load a full tilemap for a level as the level changes?

Or you could follow their direction and store (or pack) a set of offsets and page around the tilemap.
 
The json data i refer to are the tilemap arrays for world maps that display on screen. I started this thread with a differebt idea in mind. But some one mentioned on disk on another forum so i thought i would the guys who know the most. was thinking the dat files since they carry the arrays packed inside that the writerect function could read the data from SD.

May admin can change the topic name to something utilizing the sd card for storage of large data chunks.
 
Status
Not open for further replies.
Back
Top