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

mp_grid

  1. C

    GML How can I program enemies within a coarse grid that all move in unison to pathfind around each other?

    I'm currently working on a game system that I'd describe as "soft" turn based. All instances move within a grid of 32x32px squares, and as soon as the player completes one movement, all enemies make their move at once. I'm using mp_grid for the enemy pathfinding, and everything works perfectly...
  2. A

    SOLVED mp_grid wont render

    my mp_grid wont render, and because of this path follow also wont work IMO. here is my obj_room_manager object // create event /// obj_room_manager :: create event var _w = global.resolution.width var _h = global.resolution.height camera = camera_create_view(0,0,_w,_h, 0, obj_player, -1, -1...
  3. Gonix

    GML mp_linear_path collision with mp_grid

    I'm trying to use A* pathfinding, combined with linear pathfinding in an isometric game. I have successfully managed to implement mp_grid_path pathfinding in my mp_grid, and then to translate grid coordinates into isometric coordinates I can draw, but mp_grid_path gives a strange path, where the...
  4. I

    Object Movement on mp_grid slows down or stops into one direction but works fine with other directions

    Hi everyone, I would like to say first I'm new to GML and picked up programming again after more than 5 years and even back then I wasn't particularly good at it. What I'm trying to say is, this problem porbably has a simple solution which I'm too stupid to figure out because I don't actually...
  5. T

    SOLVED mp_grid_path not being followed, object flies off or doesn't return to passive path

    I have an mp_grid setup that works during the aggro state just fine, but the passive state only works when I add && (path_index == -1) to the if (mp_grid_path(...)) statement. However, this causes the object to not return to its passive path once the aggro state is left. Without the &&...
  6. Hychan

    SOLVED Mp_grid_path function diagonal paths not trying to move through diagonal walls

    I'm working on a turn-based game similar to chess, where every piece can move to the eight adjacent tiles every turn. For path finding for the enemy pieces, I'm using GML's built in mp_grid_path functions to build a grid which is 12x12, and creating cells where each piece is except for the...
  7. D

    GameMaker Area of effect inconsistant

    I've been working on a roguelike and im currently making a spells and ability menu. Been trying to get spell area of effects to work and they mostly work but they seem to have a down/right bias, pictures included to better explain what i mean. The code im currently using is this: if...
  8. C

    Problem with mp_grid

    Hello, I've started with make a point and click game, but I have problem with code functions which allow the player to move avoiding objects as desks or walls. I found topics with mp_grid but not sure how it works. Below my code. My objRay (main character) Create event: x = 1320; y = 928...
  9. D

    Windows Enemy AI

    Hello everybody, I am currently trying to make my game's enemies, and I thought I'd start from the most basic enemy, a simple kamikaze enemy. Unfortunately it turns out it isn't as simple as I thought, particularly when it comes to their behavior. The circles are the enemies, the box on the...
  10. S

    GameMaker [Grid-Based] What is the most efficient way to create a ghost/preview of potential movement?

    I am currently using IDE V2.2.2.413 Hello everyone! I am quite new to GML, and doing a lot of experimentation, and toying around to understand how all the moving parts work. I have spent quite a lot of time in the past few days doing my best to problem solve, and find solutions to my roadblocks...
  11. CoolGiraffe1

    GameMaker mp_grid direction constraints?

    Hi, so i ran into an issue with an RPG game i've been making. I am trying to create maps with "fake height", like in this example: i have implemented the use of mp_grid into the game and all the characters move around the map by calculating a path using mp_grid_path, and mp_potential_step...
  12. Rook

    GameMaker Help with mp_grid and paths

    I'm making a stealth game where if the pursuer loses you they will return to the start and continue on their pre-set path I made via the path resource. Strangely though, before i was using if (abs(x - start_x) < 2 && abs(y - start_y) < 2) to return weather the enemy was at the start, which...
  13. F

    GameMaker How to check if mp_grid exists?

    1.) I was not able to find a way to check if motion planning grids exist the way they do for other data structures. What seems to work is to treat them as "normal" ds_grid structures, for instance, like in this clean-up event: if (ds_exists(mp_grid, ds_type_grid)) { mp_grid_destroy(mp_grid)...
  14. Dr_Nomz

    GML [SOLVED] How much slower is a fine grid?

    I read in the manual that I can have the grid coarser or finer depending on my needs, but the more cells, the more processing power. How is this calculated? Is it REALLY a lot more, or negligible? Does it matter depending on how many NPCs are or could be using the grid? And does it increase...
  15. Dr_Nomz

    GML Is it possible to have an NPC move away from/closer to an object? (mp_grid)

    I would like to make my NPCs be a few pixels from the walls, but closer to certain other ones based on their positioning using mp_grid, is this possible? Or can they not enter the grid at all if it has a wall object in it? Basically I'm asking how flexible I can make the grid system.
  16. Pfap

    mp grid instance not following path

    My instance always successfully draws the path, but sometimes won't follow it. It seems that it is getting stuck somehow. Grid creation code global.grid_m = mp_grid_create(0, 0, room_width / 8, room_height / 8, 8, 8); mp_grid_add_instances(global.grid_m, wall, false); The above debugs...
  17. Q

    GameMaker Better top down movement? (mp_grid_path + mp_potential_step_object)

    Hey there, I'm making a top down adventure where the movement is controlled by mouse, and I'm having trouble getting movement to work smoothly. The basic design is to have 2 types of objects in the environment - static and active. And when players click a spot, a path to that position is created...
  18. D

    Some times mp_grid_path teleports the object at position 0, 0

    I'm trying to do an ai for my game (i never seen some tutoritals about it so if i could do something better tell me pls) , i'm doign a script that moves randomly the enemy in a room (delimited by an object : oRoomDelimiter) when the player isn't in the allert area of the enemy. The player uses...
  19. Dan1

    mp_grid_add_instance not working?

    Hey everyone, So I've been working on a system in which you create these "pipes" to go through and I'm using the path-finding so the characters go through the pipes. You can right-click to add the pipes or in the case of the screenshot below, these pipes were already in the room (to test if it...
  20. Dan1

    Windows Objects to move around each other in a grid?

    Hey everyone, So I've started a kind of "sim" game which is going to feature a lot of characters going along a global grid with path finding. At the moment, on the way to their destination, they will quite happily walk through each other. I can't use the "mp_grid_add_instances" command to...
Top