ds grid

  1. V

    DS accessor not being read as a number for sprite subimage

    I reccently followed the heartbeast tutorial for creating an inventory system, in which he creates a ds-grid to store items, and then references it in a for loop in the draw event to display the correct item, with the value in the grid being a number that corresponds to a subimage of a sprite...
  2. Smenkare

    GMS 2 (solved)Big data structure, easy to handle

    I need data structure with about 700 objects, every object needs to store 6 properties. I need to be able to change, get these values, and look for values through this whole data structure. What is the best way to make it? Ds_list, grid or simple array? If someone has time, please show me some...
  3. Ç

    GMS 2 Can't Set the Ds Grid to a value Out of Range Error

    Insıde obj_RoomState; -Create- RoomGrid = ds_grid_create(5, 5); ds_grid_set_region(RoomGrid,0,0,4,4,"aaa") //RoomGrid[1, 0] = "aaa"; RoomGrid[2, 2] = room1; RoomGrid[3, 2] = room3; RoomGrid[3, 3] = room2; RoomGrid[2, 3] = room4; -Draw- draw_text(x,y,RoomGrid[1, 0]) When i run the game i get...
  4. Divinik

    GML Looking Through Two Arrays for Duplicates?

    So I have a ds_grid that holds all items in the game. In the Inventory's Menu, there are tabs that copy certain "Types" of items from the master grid and creates it's own ds_grid for that tab. I'm trying to figure out how to delete the same item from from the sub arrays and the main array when...
  5. Lord KJWilliams

    (solved)I need a second opinion about my complex game mapping design

    I have a game that I have been working on for more than 20+ years, originally designed on a Commodore Amiga which I had to survive from PC to PC, after Commodore Business Machines went out of business. Since then I had to learn C which saved me from the insanity of BASIC. So I have been working...
  6. A

    GMS 2 Need DS_Grid Help

    I am new to programming with GMS in its entirety, and I need a bit of help. I have a Ds_Grid set up fully with visuals for my inventory system, but the issue is that I have no idea how to grab the array values from the ds_grid relative to the mouse position on the inventory GUI. The inventory...
  7. 2

    GML Rotate,Flip,Shift Ds Grid or 2d Array

    How do you rotate (90 degree increments) or flip (xflip, yflip) the contents of a ds grid or 2d array without manually rewriting the whole thing? I might also need to x shift and y shift the contents afterward as well.
  8. 2

    DS Grid vs 2d Array: Speed and 4 other Questions

    1. Which is faster a DS grid or 2d array? 2. Which are local or global? 3. Which need to be destroyed before destroying the object that made them, to free up memory? 4. Which are persistent/nonpersistent? 5. Which take more memory?
  9. Flashpants

    GMS 2 DS List vs DS grid with embedded arrays

    Hello all Our game is based off of a 120x64 grid and we want to hold multiple variables of information for each grid square (what room type it is, what's on it etc). The information in the variables will have to be accessed every few seconds by 50-100 different objects, so needs to be as fast...
  10. T

    Legacy GM [SOLVED] Trying to update ds_grid diagonally

    I have a ds_grid that I sometimes need to update in a diagonal fashion and I wondered if anyone could suggest a method. The attached image shows what I'm trying to do (the actual grid is larger). First the red diagonal (1 cell) is updated, then the yellow (2 cells), then the green (3 cells) and...
  11. Daniel Mallett

    Adding a ds grid to a ds_map

    Hey guys, Does anyone know if you can add a ds_grid to a ds_map then save the map and load it back up again and the data be intact.
  12. L

    GMS 2 falling object problem (lemmings-esque), using ds_grid values

    Hi all... I'm trying to make a lemmings-y object that walks left and right & falls down whenever there's a gap in my ds_grid. eg. a 0.. At the moment I spawn the object in by clicking a button. It falls correctly (ie at the speed I want) when I spawn it, but after it has hit some ground and then...
  13. S

    GML Feeding variable names into script

    Hello, so I'm working on a cool new game with online networking. I use DS_Grids to keep track of where the players and other objects in the game are and what their status is, things like that. So when it comes to simulating collisions between the different objects, I would loop through the...
  14. S

    Legacy GM [SOLVED] DS Grid problems...

    So lately I've been working on an online networking game, and, surprisingly, the online Networking works just fine! The problem I'm having is actually much more basic, it's with DS Grids. So (on the server side) I convert a DS_Grid to a String using DS_Grid_Write, and I save it as a variable...
  15. S

    GMS 2 DS Grid Error when collecting y variables

    ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Draw Event for object obj_draw: Error: Can not resize a grid with a dimension of <=0 at gml_Object_obj_draw_Draw_0 (line 13)...
  16. P

    GMS 2 Does deleting a data structure full of data structures delete all the data structures with in it?

    Does deleting a data structure full of data structures delete all the data structures with in it?
  17. S

    GMS 2 [SOLVED] Greater than 16 Arguments

    I have an object called obj_inventory, an object called obj_pickup and a script called scr_add_item. I need to send over 50 arguments to the script from obj_pickup, but I can't. So I have written the following in each object and script: obj_inventory: globalvar playerInventory...
  18. Ronchon

    Legacy GM Hashing a datastructure

    Hi, I would like to generate a "hash" out of datastructures such as ds_grids that would allow to quickly compare 2 different grids to know if they hold the same values, for example. Comparing each tile's values is too slow, and too problematic if the values are of different types. How would you...
  19. E

    Saving ds_grids to ini not working (Solved)

    I am making a game similar to sudoku. I have 3 arrays, arrayS is for the solution, arrayP is for the puzzle (the numbers that are shown to the user) and finally array, which is all the numbers placed and displayed. Once array equals arrayS for every instance, the player wins the game. I want the...
  20. Muddykat

    Creating a mini map based off of a ds_grid

    I'm creating a hack and slash dungeon crawler and I want some kind of mini map, not one that gets enemy positions or anything just the room layout witch is created with a ds_grid. I have a beige idea as how I it would work as the grid and information is already there I'm just not sure how I...
Top