DS_Collections
A downloadable library
Starting in GameMaker 2024.14/2025 LTS, this is how array appendage is handled by the runtime, meaning that this data structure is pretty much obsolete. I'll be leaving it up for posterity but going forward I don't think it'll ever be needed.
Ever wish ds_lists were automatically cleared by the garbage collector? I've re-implemented them using arrays. Documentation can be found here.
Some actions are more performant than others (the sample project includes a speed test; see the screenshot). I recommend using this only if you have a specific need for it.
There's a trick you can do with array_resize to accomplish something similar using normal arrays, although it's not a behavior I'm going to assume is going to stay consistent as GMS2 receives updates, as it's not part of the function spec. If GameMaker ever updates to treat arrays more like ds_lists internally, this code library will effectively be obsolete.
Credits
Updated | 21 days ago |
Status | Released |
Category | Assets |
Author | Dragonite |
Tags | data-structure, GameMaker |
Download
Install instructions
To run the demo, download either (or both) of the zip files, extract them, and run the executable.
To add the library to your project, download collections.yymps and add it to your project with Tools > Import Local Package.
Development log
- A notice of obsolescence21 days ago
Leave a comment
Log in with itch.io to leave a comment.