• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

data structures

  1. O

    Does GMS2 have HashSet data structure?

    Does GMS2 have support for hash sets? I wanted to use it, but couldn't find any. Then searched the docs and there seems to be any mention of sets in general. Though it is quite a fundamental data structure, so I'm probably missing something.
  2. VoxPrincipalis

    GameMaker Pass by Value, or Reference?

    Buen Thursday Y'all 🤠 if I create a map, and fill it with arrays holding arrays and then access a value from the map, is the variable accessing the map value given information by reference, or value? ///Ex var cool_array = [1,2,3,4]; var cooler_array = [4,3,2,1]; var coolest_array =...
  3. Magicwaterz

    SOLVED How to drop (fill) values in ds_grid?

    I am redoing this game without creating tile objects and only rely on the data structure for movement and other stuff. At the moment, I have 'invisible' grids where it generates the values needed. My issue is for those values to 'drop' down the grid if the struct variable struct_DATA = noone...
  4. Jihl

    Question on how to use Game Maker features for more than ten thousand objects

    Hey there! My question goes around how to manipulate this many "objects" inside a game. For what I have been developing so far, I have 4 years of GML develop experience and found myself trying to do this with simple objects at first, but obviously failed. So I'd like to ask anyone who knows...
  5. O

    Global Inventory System

    So i should start off by saying ive looked up almost every inventory tutorial and have tried to learn all the data structure types but im still struggling to adapt something into what i need. From what ive seen Structs seem to be the best method for when items have alot of variables and info...
  6. G

    Problem with #

    Dear GMS-community, I'm getting to grips with data_structures and don't understand why scenario A does work and scenario B doesn't. As far as I can tell only the x and y coördinate for the grid AllAgents have been swapped. (I prefer to have scenario B.) Scenario A function...
  7. FoxyOfJungle

    Disabling Garbage Collector: What are the risks?

    As we know, we now have the Garbage Collector, the only problem is that it uses 14% of the CPU with only 2 loops (and some other simple layer functions) in an empty project on a Ryzen 5 CPU. When disabled using gc_enable(false), the performance drastically increases, using between 0 and 1% of...
  8. 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...
  9. 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...
  10. 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...
  11. S

    GameMaker 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...
  12. J

    GameMaker 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...
  13. J

    GameMaker 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...
  14. Jam373

    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...
  15. C

    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...
  16. 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...
  17. 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...
  18. tibbycat

    GameMaker [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...
  19. KyleRansford

    GameMaker 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...
  20. 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...
Top