Description

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.

More Assets:

GMLVideo

SafeSave

Easy Google Analytics

WebView

End User Licence Agreement (EULA).

Changes in 1.0.1

Fixed a typo within the demo.

Version 1.0.1. Published April 3, 2017

Created with GameMaker: Studio v1.99.525

Age Rating: 4+

Average Rating

This asset hasn't received enough reviews yet.

Your review

You can only review assets you've bought.


Gravatar

Myles P 04 April 2017

Extremely useful

I have been using and saving large grids for an open world game. This has helped optimize and save memory greatly. Thanks!

Package contents

Total size 4.05 KB

What is the issue?

Back to Top