path finding

  1. D

    Does mp_potentiel_path_object work on a tile index

    I made this command unfotunately it doesnt seems to understand the obj as a final argument but it doesnt send an error so it might work and i made a mistake or it absolutely doesnt and im screwed... if (mouse_check_button_released(mb_left)) { state = states.walking...
  2. Nyymi

    GMS 2.3+ Path finding for custom tiles

    I'm trying to create a path finding function to get a list of provinces (tile_id) from start to target. This one works fine until you add actual obstacles when will loop forever. I've tried to rewrite this many times but just can't wrap my mind around it. I've been using point_distance to jump...
  3. if (user.brain == NULL)

    Pathfinding for a topdown tilebased dungeon crawler

    I want to know what the easiest way to add pathfinding for enemies in my game is. I have done some research and learned about a* pathfinding however I am not sure if that is the best option. I also don't know how I would implement a* pathfinding. If anyone has a different pathfinding suggestion...
  4. Kezarus

    GMS 2.3+ Pathfinding Code Performance

    Hi! I'm making a pathfind code and I'm wondering if there is anything that I could do to reduce the impact of it. I am already using some shenanigans to reduce it. Those are: Manhattan heuristics Max distance allowance Lookup lists I'm starting to think about on making some kind of queue...
  5. jb skaggs

    Weird Mp Grid issue

    I discovered when using mp grid based movement I get this weird behavior it is the same 128x128 sprite with middle center offset on two objects locked on the same 128x128 grid and with same offset- but mp creates a path that drops the Y axis. Even though they are in a straight line and...
  6. ioci

    Steam Can't create a path in mp_grid

    Hello there, I've been stuck on this for a week now. I want my agent object to move around by using "global right mouse pressed" event in a room that has the rest solid objects randomly generated. I read the Mark Alexander's Tech Blog on YYG website and watched several mp_grid related tutorial...
  7. KamilSeven

    GML (SOLVED)Flying/Hovering Enemy A.I. Motion Planning (Like in Super Create Box)

    Hi! I want to build a flying enemy motion planning for a side view game (Super Crate Box clone for learning purpose). I've tried using a simple motion planning line to achieve it. But the issue is, mp is creating the shortest path to the target, so it doesn't give the effect of flying/hovering...
  8. J

    SOLVED Target Tracking Issue: Only works when target's X & Y are greater than the tracker's.

    I have a bit of experience with GMS2, so I'm not a baby with it. But as all my coding experience if from GMS2 and Youtube, I wouldn't say I'm proficient either, so bear with me. In theory, my zombie object scans for a line of sight to the player, and if there are no walls in the way, it "sees"...
  9. M

    Group path finding issue

    Hey guys, I am trying to make relatively large groups of NPCs move across a map while keeping them from stacking up either on the way or at the destination. The alternative of having a separate grid for each NPC does really make sense for me due to number of NPCs and the fact that just with 5...
  10. Heavenisreal777

    GMS 2 [Please Help] Enemy pathfinding problems :(

    Hi, GameMaker Community. I'm making a top down game, but the enemies that are supposed to follow the player, sometimes run into walls and obstacles. I've temporarily fixed this by doing the following: // If player is near Enemy object then target_x - is player postition x target_y - is player...
  11. DirectOrder

    Problem moving diagonally through adjacent walls with mp_grid

    I am using the mp_grid functions to generate pathfinding for my enemies, and I do have "allow diagonal" set to true, however, if two walls are diagonal from each other, the enemy does not see that as a valid path. For instance: a = enemy b = goal X = wall --------------------...
  12. xDGameStudios

    GML mp_grid what happens under-the-hood?

    I wanted to ask YYG team or someone that knows this, what implementation is used by the mp grid pathfinding under the hood? 1) A* + normal grid? 2) A* + QuadTree? Is it even A*? I've been looking at some algorithms and wanted to know how can pathfinding in GMS2 can be made better (more...
  13. BlockSmasher68

    Need help with pathfinding

    I'm working on a dungeon crawler and was working on the pathfinding for the enemies. I tried the grid and path technique, and although it does work, the sprites of the enemy pass through the walls. I thought that running the enemies movement through my collision engine would fix the problem...
  14. JEMcG

    GML Is it possible to pull information from a path then move it towards each point manually?

    Hello! So I have been wrestling for some time with pathing. I'm trying to make a game where the player can choose whether to use keyboard or controller movement (which works just fine) or mouse movement. For mouse movement so far I am using an mp_grid and mp_grid_path to do the movement. This...
  15. MattD227

    Path Finding

    hey guys, so what im needing help with is that i want my player(s) on screen to move where i click, however i want the game to find the shortest distance to where i clicked while avoiding obstacles in the way. For example, lets say i have a building and a doorway to go through, i want to be...
  16. C

    GMS 2 Trying to make an object walk a path frowards and backwards indefinetly

    I am trying to make enemies walk a certain path forwards and backwards indefinetly when they are in patrol mode. I have tried setting the endaction to path_action_reverse but this only makes the enemy follow the path to the end, follow the path backwards, then follow half of the path forward...
  17. zampa

    GML Unreachable pathfinding mp_grid_path

    Hi, i'm working on pathfinding for my enemies using the a* system, i created a grid and added all tile instances for walls and pits in the room and i encountered a problem let' say i put a platform surrounded by pits that the player can access, i that case the function mp_grid_path would return...
  18. DarthTenebris

    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...
  19. CoolGiraffe1

    GMS 2 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...
  20. Rook

    GMS 2 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...
Top