1. D

    SOLVED Saving files (i need to save a grid)

    hey so i have leaderboards in my game and i surly sucks if you get a good time close the game and then you open it again the leaderboards are blank. so i wanted to save the grid i store everything in i watched a bit around and so but i dont think i understand it. i found this saveStruct = {...
  2. D

    How do i address a grid inside a grid ?

    i want to make a leaderboard for each of my levels so i made a grid stat stores leader boards ``` global.grid_levels = ds_grid_create(100,2); for(i=0;i<ds_grid_width(global.grid_levels);i++;) { ds_grid_set(global.grid_levels,i,0,ds_grid_create(4,11)); //how to address 2nd...
  3. A

    Windows/Android grid creation problem

    Hi I am gonna trying making a simple grid on my 2560 x 1600 screen using this draw_gui command var w = 1; draw_set_color(c_orange) for (var i = 0; i < room_height; i += 64) { draw_line_width(0,i,room_width,i,w); } for (var i = 100; i < room_width; i += 64) {...
  4. bodilliam

    GML Grid Code

    Hi guys I am somewhat new to GM, and was wondering if there was a easy way to make a snap to grid. There is on Construct 3 and I was just interested in knowing. Thanks!
  5. A

    ds_grid_read() seems to always consume memory

    My game currently has a memory leak and will slowly crash. The following code is causing the leak, I've stiped down the code as much as possible to simplify the problem. I realize the code block below serves no functional purpose. I just want to understand it and why its consuming so much...
  6. Storm1208

    GMS 2.3+ [Solved] Grid Generation Code Not Printing All Lines

    Hey all! I've been working on some grid creation code and I ran into an issue with it last night. I've been trying to fix it for the past day but I haven't had any luck. The code is supposed to generate a 5x8 size grid within the screen (not based on the room's height and width, but within a...
  7. Y

    SOLVED Help with grid-based movement

    I'll try and keep this is as simple as possible. I'm making a top-down box pushing/pulling game where once the player makes contact with the box, they are "magnetized" to it unless they scrape it off. The movement in the game is tile-based, so one press of the movement key moves the player...
  8. Bart

    GML Using DS Grids For Calculations

    GM Version: ALL (the code makes use of ds_grid accessors but that is not a requirement) Target Platform: ALL Download: N/A Links: N/A Summary This tutorial series shows how certain calculations can be done using ds_grids. Each tutorial focuses on a specific calculation or algorithm. Tutorial...
  9. zendraw

    GMS 2 tiles & depth

    how do you apply depth to tiles so that player can go behind them when his bottom is above theyr bottom? and infront when his bottom is below theyr bottom. basicly adding the -y depth thing, or similar. only way i see is making diffrence betwean layer`s depths the same as the grid and making as...
  10. N

    ds_grid_sort does literally nothing?

    So I'm making a 2d grid, and I populate the first column with an array (node coordinates). The second column is the distance between the origin node and whatever node I'm examining from the list of node coordinates. That part of the code works flawlessly. My issue is that, you'll see I print the...
  11. C

    Legacy GM Need help with making a grid from slanted perspective.

    I want to build a 2D Grid from a 3D perspective that looks like this. I want to have control over every tile, so I have considered making each tile into a separate object. But the thing is, performance is very important in my game. And that, of course, is not very efficient. Is there any...
  12. P

    Isometric grid with Tilemap got inaccurate

    Well, I don't think you got what I mean from the title so I will explain a little bit: I am trying to learn how to make isometric game, I used Shaun Spaldings tutorials and even added the object moving to grid working properly BUT my grid, made with tilemap works strangely because it marks the...
  13. TyGamess


    So there is a add instance to a grid but what about remove? Like I add in a new set of walls but when the “Roaming Villager” steps in a button I can then pass through those instances once again as he was able to do before. I’m bad at wording but yea
  14. A Random Creator

    Optimizing drawing a grid

    Hello everyone! I have a relatively simple issue. I'm currently creating a rts style game, and I have a "Fog of War" which is stored in a grid. It works fine currently, however I'm having a major issue with the lag. Drawing the fog on screen is pretty simple, I just have to draw the few squares...
  15. Oliver Melroy

    GML Game Starts Lagging Greatly

    I have been using GMS2 for about a year now, and I have come across a problem I cannot seem to fix. My game starts lagging a lot after about 10 seconds after running the game, and I think that the problem is the grid around the blocks being drawn every frame, but idk. Thanks! Video: Grid...
  16. T

    Legacy GM Check grid cell distance

    I was wanting to know if was any way I could check to see how many grid cells one object is away from another. I just have a very basic grid, that I have each cell set to 32x32. I have the player at once position in the grid, and was wanting to store the number of cells that are inbetween the...
  17. Z

    (SOLVED) Lag-free depth system

    Hi everyone. I've been using a depth system that works quite nice. The way it works, is it stores all the objects in the current room in a grid, using each individual object's x and y value. The grid is sorted each frame according to these values. When the player moves, each frame, the entire...
  18. S

    Top Down Cover Finding( warning computationally expensive)

    GM Version:1.4.1763 Target Platform: Any Download: <N/A> Links: a quick example(mouse to add delete a to toggle extra draw) Summary: Lets be fair top down shooters don't get a lot of love, so if you've ever wanted your enemies to find cover...
  19. tagwolf

    How to code a match 3 game and backtracking algorithm basics.

    GM Version: GameMaker Studio 2.2.3 Target Platform: Windows / All Download: N/A (TBD) Links: (I used this initially when I was struggling for base logic, but ultimately this is a backtracking...
  20. B

    Circular loop through 2D array

    While I'm worried this is above me, for reasons regarding depth I would like to loop through a 2D array starting at a given position and "spiraling" out from that point. The most helpful thing I found online was this, however it...