A ds_map is a data structure that stores data in linked pairs consisting of a key and a corresponding value.
Feb 06, 2020 For reference, devkitPro is the development tool chain with the DS-specific devkitARM, PAlib is a simple add-on library and DS Game Maker is an interface for these so you can make games without having to learn programming. Roleplayer is a turn-based strategy game maker that features game template, sample game based on the template, a player to the generated games, etc. The games can be generated by the configuration file that already includes other sample games settings for reference.
The ds_map data structure is an exceptionally useful one as it lets you store key and value pairs. For example, a character in your game can have a quantity of different items (keys) and for each individual item he can have a number of them (values), like in an RPG where you can have 10 health potions, 5 mana potions and 100 gold. Maps maintain such pairs all together in the one place and you can add pairs to the map and search for the value corresponding to certain keys as well using some simple functions. There are a couple of things you should know about maps before you use them, however! Download steam games mac. Maps are not sorted in any (recognisable) way, meaning that to find a certain key you may have to iterate through the whole thing (which is very slow). There is also no way to hold two keys that are the same, nor can you assign one key two values.
NOTE: The ds_map functions have changed since previous versions of GameMaker so imported games may not work or behave as you expect.
NOTE: As with all dynamic resources, data structures take up memory and so should always be destroyed when no longer needed to prevent memory leaks which will slow down and eventually crash your game.
The following functions exist that deal with DS maps.
- ds_map_exists
- ds_map_create
- ds_map_add
- ds_map_clear
- ds_map_copy
- ds_map_replace
- ds_map_delete
- ds_map_empty
- ds_map_size
- ds_map_find_first
- ds_map_find_last
- ds_map_find_next
- ds_map_find_previous
- ds_map_find_value
- ds_map_read
- ds_map_write
- ds_map_destroy
There are four further functions available for saving and loading a ds_map. These functions will encrypt the map and store it in a secure location on the target platform, so you can use this to save In App Purchase details, passwords, sensitive game information, etc..
- ds_map_secure_save
- ds_map_secure_save_buffer
- ds_map_secure_load
- ds_map_secure_load_buffer
Apart from these specific functions you can all use an expression (called an accessor) to add or modify the contents of your ds_map. This accessor looks similar to a 1D array with the following syntax:
map_index[? key]
Ds Game Maker Free Download
You can find more information, plus examples, from from the GML Overview page on Accessors.
JSON And Ds_maps
One of the uses that ds_maps have is when working with JSON, and so there are a few special functions that are specific to that:
- ds_map_add_list
- ds_map_add_map
- ds_map_replace_list
- ds_map_replace_map
There are also a couple of complimentary functions for ds_lists:
- ds_list_mark_as_list
- ds_list_mark_as_map

Ds Game Maker Tutorial
NOTE: While these functions permit you to add lists and maps within a map, they are useless for anything other than JSON, and nested maps and lists will not be read correctly if written to disk or accessed in any other way.
NOTE: if you need to check if a data structure exists, you can use the ds_exists() function.