B
BabyDukaCPH
Guest
Hi community
TL;DR: I need a way to compress a long string without the game going in sleep mode while compressing. Does anyone have a link to a nice tool or a clever method to do this without the wait and without too many extensions?
I'm making an online platformer where, when you beat the world record, your player's ghost run, among other things, is saved on a server. The way this is saved is that I keep the x,y,sprite_index,image_index for each step in an array which in is ultimately a very long string I'm writing to a file which later is read when player wishes to upload a custom level. The data sent contains an array of data, one of them is the player ghost. I'm also compressing large user level files (0-400 tiles each containing their vars) to keep level data files below 10 kb each (even on very large levels) so that player can download and keep thousands of levels and player ghost replays without a problem.
I'm currently compressing the string w Taylor Dale's string_compress from the market place which is working fine and even large levels with a long run is 5-15 kb, but when the player does a run over 1 minute or saves a level with hundreds of tiles, the string_compress script takes 1-2 minutes to compress the string. During that time the game 'waits', basically is dead (sleep) which always is doomed to make players think something is wrong. So far the community consists of nice alpha testers who understand and can bare with the waiting (old school C64 days are back!) but obviously I need to implement something fast to make sure new players who are not supported by the community, and just everyone in general, don't think the game has crashed in an annoying frozen way.
Has anyone had any good experience with a super fast string compressor besides from the one mentioned above?
- Jake, the DASH Team
TL;DR: I need a way to compress a long string without the game going in sleep mode while compressing. Does anyone have a link to a nice tool or a clever method to do this without the wait and without too many extensions?
I'm making an online platformer where, when you beat the world record, your player's ghost run, among other things, is saved on a server. The way this is saved is that I keep the x,y,sprite_index,image_index for each step in an array which in is ultimately a very long string I'm writing to a file which later is read when player wishes to upload a custom level. The data sent contains an array of data, one of them is the player ghost. I'm also compressing large user level files (0-400 tiles each containing their vars) to keep level data files below 10 kb each (even on very large levels) so that player can download and keep thousands of levels and player ghost replays without a problem.
I'm currently compressing the string w Taylor Dale's string_compress from the market place which is working fine and even large levels with a long run is 5-15 kb, but when the player does a run over 1 minute or saves a level with hundreds of tiles, the string_compress script takes 1-2 minutes to compress the string. During that time the game 'waits', basically is dead (sleep) which always is doomed to make players think something is wrong. So far the community consists of nice alpha testers who understand and can bare with the waiting (old school C64 days are back!) but obviously I need to implement something fast to make sure new players who are not supported by the community, and just everyone in general, don't think the game has crashed in an annoying frozen way.
Has anyone had any good experience with a super fast string compressor besides from the one mentioned above?
- Jake, the DASH Team