A set of scripts that replace the functionality of ds_grid_write/read with a buffer equivalent that provides much much smaller storage size and speed.
Works with grids that are filled with numbers only, not strings.
On average, compared to using GM's functions to write to a string, saving the grid as a buffer can make the resulting data 5-15% of its original size. That means if the size of your grid as a string takes up 1kb, your file size can be reduced to a measly 50 bytes of storage. Provides the following functions
ds_grid_write_buffer(grid[,decimals]) /* Returns a buffer. The decimals parameter is optional, if supplied and true it will store floats (decimal numbers) accurately. Otherwise if omitted or set to false, all numbers will be truncated if need be to integers. */ ds_grid_read_buffer(buffer) // Returns the grid back in tact
See the included test object for a working demonstration.
Fixed a typo within the demo.
Version 1.0.1. Published April 3, 2017
Created with GameMaker: Studio v1.99.525
This asset hasn't received enough reviews yet.
You can only review assets you've bought.
I have been using and saving large grids for an open world game. This has helped optimize and save memory greatly. Thanks!
Total size 4.05 KB