• 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!

grid

  1. D

    GML Drawing a grid with for loops

    Hi there, I'm drawing a grid in a room with size 1000x768, with every "tile" being 128x128. It draws alright but at some point the for loop seem to stop working, or something else that I couldn't pinpoint. I used show_debug_message to print the iterators from the loops, but I couldn't really...
  2. Didjynn

    [solved] Midpoint circle algorithm

    Hello, I'm trying to create an area around my player in circle that would grow with his levels. The thing is : I suck at mathematics. I made some research but I'm not able to understand what I read I tried on my side but it's too big for me. I don't even understand this wikipedia, I tried to...
  3. dazza_bo

    Legacy GM [SOLVED]Snapping sprite to isometric grid

    I've been playing around with isometric lately and learning a lot. One thing I haven't been able to figure out though is snapping to an isometric grid. I'm trying to get a sprite to follow my mouse cursor and snap to the iso grid as I move the cursor around. I have tried a few different...
  4. I

    Question - IDE Dropping object in room snaps to grid intersection

    When dropping or painting (with LMB + ALT) objects into a room, the object snaps to the grid intersections. Also moving single objects snaps to grid intersections. However moving multiple objects (selected with LMB + SHIFT) moves the objects to the grid cells and not the intersections. This...
  5. G

    GML [SOLVED] Movement Along Grid

    hey all, i'm having some trouble figuring out how to get stuff to move along my grid more naturally. the problem is most visible in projectiles atm, but i'm not sure what i can do to smooth it out. obj_player : Step Event : state.aim if(input_fire) { var _inst = instance_create_depth(x +...
  6. J

    GameMaker New To GameMaker....Need Help Please.

    So First I was Wondering How to set my rooms to a grid. second I am trying to create an instance of an object at a grid point when the left mouse button is released (it will also delete any previous instances of this object in the room) I have already got the delete instance on the release...
  7. R

    Physics Snap to Grid

    Hey i've been working on a little Terraria-like game and I was doing fine with snapping blocks to a grid when the player places them, but when i created an arrow object (which uses physics), i also had to make the blocks use physics, which makes them not snap to the grid anymore. I can't find a...
  8. M

    Mp_grid_draw vertex buffer crash

    Hey! Trying to draw my grid using mp_grid_draw, but I keep getting the vertex buffer crash as if I try and draw something that exceeds the room. Would anyone know why that is?
  9. R

    GML mp_grid pathfinding problem

    Hi, I've got an issue where i'm building a grid then putting "walls" in it : the walls are squares of the same dimensions than the grid's cells. But whenever I put walls and "recalculate" the grid, the walls appear ENORMOUS in it : blocking any unit trying to go through a one-cell-width passage...
  10. D

    GML Isometric Graph Drawing Function

    - I just spent several hours making an 'isometric graph drawing function'. This graph is perfectly isometric, unlike many other posts I have seen that have slopes of 26.5 degrees and are therefore completely inaccurate. This code is completely from scratch and works with any room size or tile...
  11. A

    Legacy GM Isometric Object Placement in Room Editor

    I was following along an old Game Maker 8 Legacy tutorial on making a basic isometric game in GameMaker: Studio when I noticed something odd as I was placing the isometric wall objects in the room via the room editor. It became increasingly difficult to see where I'm placing the objects, as the...
  12. M

    GameMaker No more "Check Grid" action

    In previous versions of GM, there was a drag/drop action "Check Grid" that would check is an instance was aligned to a specified grid size (e.g. 40px x 40px). I'm teaching 9th grade students using drag and drop to create a maze game where avatar movement is grid based. I asked tech support for...
  13. Z

    GML Q:mathematical problem

    does any1 know a formula that can create a spiral out of a 2d grid? if not, does any1 know a mathematician who can make such a formula? i alredy have a function that creates the resaults, but i need it as a formula. this is how the coords used in the function look, and the end resault.
  14. S

    GameMaker (SOLVED) grid problem

    does anybody know why my grid look like this? the red numbers shouldn't be like that it should be setting the collision data depending on the quick mask. but it seems to get messed up. /// @desc load_solids() /// @arg level var level = argument[0]; var tile_len = level.length; var ids...
  15. M

    GML Make an Enemy Move Towards Player(Grid Based)

    I have grid based movement for a Pokemon Mystery Dungeon like game and I want the enemy to move towards the player. My grid is 32x32. My Player Code is Create: image_speed = 0.05; dir = 1; //0 = Up, 1 = Down, 2 = Left, 3 = Right Step: if !place_snapped(32,32){ move_snap(32,32); }...
  16. N

    Simple Answer But Can't Recall For 32x32 Mouse Movement

    I need to set the object to follow the mouse but always be snapped to the nearest grid. 32x32, 64, 64, 8x8, etc... I had this code long ago but no more. To clarify even more, I am placing walls, furnaces, etc... Objects in general and they need to be snapped to a grid BUT before you place...
  17. Y

    Legacy GM make enemy stop in front of player

    so I have enemy AI that use the mp_grid function to find a path towards the enemy player. but I need them to stop a few pixels in front of the enemy instead of them trying to go inside him. here is some code but I don't think it's very usefull ///path RepothPosx = (Obj_Repoth1.x div 20) * 20 +...
  18. Y

    Legacy GM Make enemies spawn only in direct view of player

    so I'm randomly spawning enemies in an arena. however this arena has some spots where there are no other objects so sometimes the enemy will spawn there. however the enemy is chasing the player using a grid and a path so if it spawns in a spot that is blocked it never reaches the player and the...
  19. S

    Design 2d platformer fundamental design

    Morning all, Having read around I understand, like most things, there are more than a few ways to handle the underlying design of platformer. The main ones I have seen mentioned are grid and tile based, with two other prominent ones being bitmask and vectorial. There is a great article in the...
  20. T

    Legacy GM 2048 block like movement

    What's the best way to replicate the movement of the blocks in 2048? (As in if you press right, they will move to the edge of the grid). My player moves one spot at a time currently. how do I make it go the full distance?
Top