A downloadable library

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

Download

Download
collections.yymps 11 kB
Download
ds_collections.zip 1 MB
Download
ds_collections-YYC.zip 1 MB

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.

Leave a comment

Log in with itch.io to leave a comment.