Overview
Lightweight Data Structures is a complete struct-based, garbage-collected replacement for GMS 2's built-in data structures.
Features
ds_*_destroy()
)ds_map_add_list()
or ds_list_mark_as_map()
, for example)Documentation
See the Wiki section on the official GitHub repository.
Examples
Simple List Example:
var list = new List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
list.shuffle();
show_message("Your draws are: " + string(list.get(0)) + "," + string(list.get(1)) + "," + string(list.get(2)));
Simple Nested Map Example:
var characters = new List(
new Map("name", "Alice", "hp", 4),
new Map("name", "Bob", "hp", 5),
new Map("name", "Caitlyn", "hp", 6)
);
lds_save_encrypted(characters, working_directory + "characters.dat", "secretChars");
var loadedCharacters = lds_load_encrypted(working_directory + "characters.dat", "secretChars");
show_message(
"Stats:" +
"\n- Alice: " + string(loadedCharacters.get(0).get("hp")) +
"\n- Bob: " + string(loadedCharacters.get(1).get("hp")) +
"\n- Caitlyn: " + string(loadedCharacters.get(2).get("hp"))
);
End User Licence Agreement (EULA).
Fix Heap.deleteMin
and Heap.deleteMax
, reunify GitHub and YoYo Marketplace version numbers.