1. P

    GML Saving Nested Data Structures

    What's the best way to save nested data structures specifically ds_grids
  2. S

    GMS 2 [SOLVED] Issue with Inventory & DS_Grid

    Heya, I've spent the past two days looking for a solution to this so this is really my last desperate measure. x) Three days ago I started following Friendly Cosmonaut's Farming RPG tutorial series and all went (mostly) smoothly. But now I've run into a problem that (search as I might) I can't...
  3. R

    Legacy GM Some advice on designing a snippet to identify a random tile in a grid based room?

    Hi again everyone! I've had a complete mental block, and I was hoping someone would be able to shed some light or direction on how I can design a code snippet that basically generates a random set of coordinates, proceeds to check whether the cell at those coordinates in a grid is free, and if...
  4. R

    Legacy GM Coding/Creating a line of sight code in a project that uses no objects?

    Hi again everyone! I was wondering if anyone had any ideas or suggestions for where to start with regards to creating a line of sight algorithm (for want of a better word). Under normal circumstances, I'm assuming something could be knocked together using a distance check between the required...
  5. S

    Need Help With DS_Grids

    Hello, all i am know to game maker, and i was wondering if someone could help me figure out how to use a ds_grid, to randomly spawn an object inside the grid i created with ds_grid. i have my grid drawing all the spots i want, but now i want to be able to use those spots as positions where an...
  6. dazza_bo

    Legacy GM [SOLVED]Isometric pathfinding using mp_grid?

    I have read a few times that the easiest way to implement pathfinding in an isometric game is to handle it all in regular 'top down' code then only use isometric for rendering. What I don't understand is how though. I have a ds_grid which is filled with isometric sprite tiles that I can render...
  7. B

    GML ds_grid or tile layer for collision?

    Hey guys, I've generally overlooked the way to do tile layer collision checking as I normally use a ds_grid for collision instead. But was curious if anyone knew whether using tile layer collisions would be more efficient than a ds_grid?
  8. B

    Legacy GM how can i make a ds_grid like this?

    Hi,i'd like to make a skill bar which is 3 cell wide,but i don't know how to dot it. And also i'd like to attach objects inside the cells. It should look like this: Thanks in advance!
  9. H

    Check if Space is Enclosed

    So, I'm working on making a kind of Zoo Tycoon-esque game in which fences are placed to create enclosures and then critters are placed inside. I want to be able to tell if a space is enclosed, and also to measure its area (within the fence, not including the fence). It seems like the best way...
  10. S

    Help with A*-Pathfinding

    Hello everyone, I'm trying to implement a simple a*-pathfinding algorithm in my game, but I have problems with it. I don't get any error messages, but the script doesn't seem to work. Here's the code i'm using so far: In the create event of an control object the following code runs, that...
  11. D

    Legacy GM Help with ds_grid tiles

    Ultimately, I'm wanting to be able to change a circular selection of tiles in a ds_grid using a function like "ds_grid_set_disk". I have not been able to get this to work. The method I have been using is to manually select all the tiles that I want to change, and if I'm wanting to destroy tiles...
  12. Posho

    GML Reading CSV Files

    Hello. I am working on a project that needs to handle lots of database data. I manage all this data on Google Sheets and then export it as a .csv file which then the game would load and save as either an array or ds_grid. My problem here is that I haven't found a single method that actually...
  13. N

    GML [SOLVED] ds_grid Collision Question(s)

    So at the suggestion of a friendly user on this forum i converted my randomly generated sandbox game to utilize ds_grid collisions to improve it's dismal performance; however, using the same sizes (room and block) the performance dives from the original (instance) system: 58~ fps to a...
  14. jb skaggs

    GML ds_grid_copy does not seem to do anything- what am I doing wrong?

    I'm sorry for all the ds_grid questions but everytime I try something they just don't for me. Im trying to duplicate ds_grid to another object, I previously used a for loop to copy manually. But seeing this ds_grid_copy in manual I thought it would be easier. But it doesnt seem to copy data...
  15. jb skaggs

    GML ds_grid conventions

    when is it preferrable and why to use these items that seem to be the same thing: my_grid[#1,1]=string; ds_grid_add(my_grid,x,y,string); ds_grid_set(my_grid,x,y,string); same thing with reading string=my_grid[#1,1]; string=ds_grid_get(my_grid,x,y); thanks
  16. Flashpants

    Legacy GM [Unsolved] Drag and set an area on a grid

    Hi I'm having an issue designing a satisfactory system whereby a player can drag and define an area within a top-down style game. Within the game, the player can define what a room is used for in an translucent overlay that appears when the player is within "construction mode". The game is...
  17. jb skaggs

    GMS 2 ds_grid size (w,h) is that actually (r,c)?

    Also in the manual it says: ind=ds_grid_create(w,h) but it seems w seems to be the number of rows and h seems to be the number of columns when I try and use it. Am I misunderstanding? JB
  18. I

    Getting value from DS_GRID at mouse point

    I have spent a while trying to figure this out also have talked with people on the game maker discord and no solution. The issue I'm having is I can't return the x,y of the grid from the place I clicked with my mouse. I think you could do it with some complex math but I can't wrap my head around...
  19. R

    Using variables in ds_grid_get not working

    I really want lil Jimmy to be able to mod my game, but because he is 7 years old, I don't want to have him get messy with any heavy code. To do this, I'm making my "Dirt" object a child of a "Solid" object, where I store the actual code for working with the DS Grid. So, I create a variable...
  20. BerserkMecha

    GML Movement issues with DS Grids and MP Grids

    Hi, I'm making a movement system that uses DS Grids and MP Grids. This is for a turn-based strategy game that I have an idea for. The gist of this script is to move an object (called Character2) to a space withing a limited range around it. Unfortunately, I'm having issues. In the create...