1. D

    SOLVED Translate position in room to position on gui?

    I have a room that is pretty big in size. So naturally I'm using a camera and view. I can pan around, zoom in, zoom out, and resize the window. I've got all that working pretty good. I'm only using view[0] and its default camera. What I'm trying to achieve: This game is grid based and it is...
  2. R

    SOLVED controlling a grid

    hello guys, I'm coming here to ask for another help. I recently started to get into a new project, and in it I want to practice GML programming. A mechanism that I want to implement in my project is a grid system, where I can manipulate each cell to make checks or even make an automatic...
  3. L

    GMS 2.3+ (HELP) Grid Based Enemy Movement

    Looking for some help here. I have an object called ObjEnemy and I'm trying to figure out how to make it so that it moves randomly on it's own and when it gets to a certain distance of the player, it will move to said player. But I want the enemy to move in between these grid spaces and be in...
  4. 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 = {...
  5. 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...
  6. 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) {...
  7. 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!
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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
  17. 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...
  18. 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...
  19. 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...
  20. 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...