• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

data structures

  1. FrostyCat

    Asset - Scripts Lightweight Data Structures

    Lightweight Data Structures Giving ds_*() functions a run for their money since 2020 Overview This library implements struct-based, GC-friendly equivalents of GameMaker Studio's built-in data structures. It also adds the ability to save both single-layer and nested structures, in plaintext and...
  2. KyleRansford

    UWP Help with Saving And Loading When Targeting Xbox - GMS 2.2.5

    Hello, I'm working on creating a UWP version of a game I've been working on for PC. I recently bought the UWP module and reading about the need for changing the saving process I find that the guide isn't explaining the Load function where I can understand it well. I have the Save function...
  3. flyinian

    SOLVED ds_grid data not updating after being changed.

    so, after several hours of trial and error. It appears that I got a system working. It will randomly find a target and apply damage to it and update the grid with the new information. i'm sure ill run into more problems. If you see a problem with the code, please let me know. Thank you...
  4. Slothagami

    GMS 2 best way to store item info?

    I am making a game that will eventually have about 100 items or so (probably not that many) and I don't know the best way to store and access that information If possible, I want a script or other easy way to add and change items, and keep them all in the same place / script. Is it better to...
  5. JapanGamer29

    GMS 2 Does destroying a data structure destroy data structures within it?

    The manual says that destroying a data structure removes all values that it contains, but does that include other data structures? If, for example, I have a stack of maps, does ds_stack_destroy() remove all those maps, too? My memory usage grows with every room_restart() so I'm trying to...
  6. JapanGamer29

    GMS 2 Need help destroying data structures

    Hello. Sad to say that I haven't been destroying my data structures, and now that I'm going back through my code to do so, I'm getting all kinds of "index does not exist" errors. I just need to clear up the confusion in my head about how to do this properly. From the manual, I understand that...
  7. J

    Legacy GM Drawing Priority Queues and other data structures

    So I started prototyping a turn based shooter and needed a way to store actions that take mutiple turns to complete. I thought Priority Queues would work for this, but am now running into trouble using them. My question is, how would I easily draw to the screen every entry of my priority queue...
  8. Cupid Stunt

    GML [Solved] Data structures of objects, message passing, and multiple collisions

    I'm new to GMS2, but I have 34 years programming experience, including 4 years video game programming. IDE v2.2.4.474 Runtime v2.2.4.374 I watched all 4 of the 1st game gml videos on youtube and made the game along with them. I've been searching the forums and the docs on yoyogames. I've...
  9. P

    Passing 2 argument with one DS

    Hello Everybody! Im new to Gamemaker 2 so and programming at all so i dont know if there was a way to pass 2 arguments in function with ONE data structure(of any type). I mean imagine for example that you have to create an object with fixed X and Y coordinates that are always same, but is there...
  10. NotTayyy

    GML Does it matter where I Create and update variables?

    So I Made an persistent inventory manager object and Inside it created a Data structure with all my Characters stats, Like the name, gold, Def, atk, Equipment slots, exp Etc... Then i want to make a Variable for each one so i can update them but i dont know where i should put them. So I Was...
  11. tibbycat

    GMS 2 [SOLVED] Problem using ds map to save game.

    Hi, I'm still a newbie with programming but I'm trying to understand how to use data structures (ds maps specifically) to save where my player is in the platform game I'm making. I've been using @Pixelated_Pope's code from his DS Map Based Save System video which works perfectly for saving to...
  12. KyleRansford

    GMS 2 How to Dynamically Detect and Assign Controller to Player? - 4-Player Game

    I have a top down rpg game that has single player controller support for Xbox One controllers that I'd like to add 4 player co-op to and I'm having trouble figuring out how I would detect and assign each contoller to the player and instead of just Xbox One controllers, I would like it to support...
  13. YellowAfterlife

    Asset - Extension Quality Structures - fixing the ds_* functions

    Links: blog post (explanation) · itch.io page · marketplace page · documentation Platforms: All Versions: GMS1, GMS2 Price: $4.95 (itch), $6.99 (MP) QS is an extension that corrects a number of issues with the current implementation of data structures in GameMaker: Makes ds-related error...
  14. FeetUpGaming

    Data structures help

    Hey i'm starting to learn and use data structures (Put it off for tooooo long) and i'm making an inventory system. The plan is to have a ds_list of the entire inventory then ds_maps for the item values like id, amount, durability etc... The problem is creating the list of items and stats. I'm...
  15. LamePower448

    GML Questions About ds_lists

    I have a projectile penetration mechanic in my game and I currently use ds_lists in each projectile to store identifiers of each object it collided with so it doesn't trigger more than once. I currently do this... # Create Event penetrated_objects = ds_list_create(); # Collision Event if...
  16. Dr_Nomz

    GML How do I save a ds_list to a ds_grid?

    I thought I knew how to do this, but lot's of testing shows I have no idea how to do this. for (var o=0; o<4; o+=1){ var _row = scr_DSGAR(save_blue_dialogue); save_blue_dialogue[# save_blue_dialogue_enum.option, _row]=option[|o]; } Basically it should just go through each and every value...
  17. flyinian

    GML looking for good tutorials on coding data structures

    I am looking for tutorials on data structures. mainly for ds_grids, ds_lists and ds_maps. I've spent several hours searching the web and haven't really found what I am needing. I am currently trying to add tile collisions to data structures and clueless on how to do so. I am basically looking...
  18. P

    Legacy GM ds_grid_add not recognizing 0 as a number

    I'm trying to code a 3-dimensional grid structure for Game Maker Studio version 1.4.1804, and I've hit a bit of a snag. Every time I test the code to add a value to the data structure, it gives me this: Here's the script that encounters the error: ///ds_3d_add(id,val,x,y,z) //Initialize the...
  19. G

     game_restart() should destroy all data structures / free memory

    First: I understand that game_restart(), like a number of other GML functions, is not actually something that should be used because it doesn't work very well. I'm working from the fiction that YYG cares. So, I discovered that game_restart() does not destroy and free the memory from data...
  20. T

    what DS structure will do a PROPER shuffle??

    so i have a grid that is 2 wide with and index of 50 items if items at index 5 are apple,25 and items at index 12 are orange,30 when i do a shuffle...i want items apple,25 and orange,30 to still be together...but at different index values? i dont want apple to be at index 2 and 25 to be at...
Top