Simple and ready to use GameMaker functions for saving/loading structs into binary-like files using buffers. Released for public domain under the Unlicense, credit is good but not mandatory :)
- Download the .yymps
- Drag it into your project
- Include the script into your project.
This extension includes the following functions
Saves the struct data
into the chosen filename
.
Loads and returns the data from filename
as a struct, if any errors ocurr returns default
.
Asynchronously saves the struct data
into the chosen filename/path, returns the event_id
for the async event call or -1
if any errors where caught. Take in account for GameMaker reasons, filename
will include into a default/
folder, thus it may not be used outside console exports
Asynchronously loads data from filename
and returns an struct with the event_id
and the buffer
that will be populated with the data loaded. Take in account for GameMaker reasons, filename
will include into a default/
folder, thus it may not be used outside console exports
Using a previously loaded buffer
created with file_compressed_load_async
, convert it and return the resulting struct or default
if errors ocurr
Feel free to open pull requests to improve the functions, however I'm not planning doing any big additions soon. Commit names should be using Gitmoji emoji standard
If you want to support me, you can just buy me a coffee