pathfinding

  1. Slyddar

    Top Down GML Tutorial Series inspired by Gauntlet

    GM Version: GMS2 Target Platform: ALL Download: N/A Links: N/A Summary: This is the GML start for a dual GML and DnD top down tutorial series, where we make a Gauntlet like game. The player will shoot enemies with his bow, and even throw bombs to destroy them. The enemies will have path...
  2. W

    GMS 2.3+ Randomizing mechanic slowly degrades

    In the game I'm trying to make, I have 2 enemies that go from their starting x and y to a blue block, then back to their starting x and y, then pick a new blue block to go to and repeat the cycle. This works pretty great 8/10 times. However, as I've been watching the enemies start their routes...
  3. D

    GMS 2.3+ mp_grid_path failing when player collides

    Hello, i've been experimenting with mp_grid_path and i kinda reached a cool pathfinding with it, it's making the enemy avoid the solids i have, but for some reason he just drops the path once i collide with certain walls. On the pictures you can see his draw_path on the ground and that he...
  4. D

    SOLVED Pathfinding without grids

    Hello! I've been searching a lot for pathfinding logics, also i took a look at some A* codes, but all of the ones i found uses grids for pathfinding, but in my game i don't use grids for movement, i want something more precise for my game instead of using grids (or end up using really small...
  5. toothmosnter

    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. Geners

    SOLVED A* pathfinding issue

    So I have a grid of hexes, each containing a coordinate, an array of its neighbors, and its g_value, h_value, and f_value. I have set up this A* pathfinding function to find a path between two points, and as you can see below it works perfectly if there's a valid path. But if there's not a...
  7. R

    GMS 2 Need help preventing enemies from getting stuck on eachother

    I am using the built-in grid pathfinding for my enemies to be able to move around walls to chase the player and all that and its working fine but for some reason, if the enemies touch each other they get stuck. I have tried putting move_bounce_solid(other); into a collision with another enemy...
  8. Z

    GMS 2 The pitfalls of NPC paths/cutscenes.

    So I'm at the point where I'm going to implement cutscenes and NPC's into my (top down 2d rpg) game. I've drawn all the sprites, have a good idea of who needs to do what,... So I'm starting this (quite new) challenge. I thought it would be a great idea to ask around a bit. I have a few systems...
  9. DirectOrder

    Does anybody have a fast implementation of A* pathfinding?

    The built-in pathfinding is nice, but very limited (can't move through diagonally blocked paths, can't weight movement, etc). So I'll just write my own implementation of A*, right? Well I did. And it works. But it's sloooow. So I figured maybe these new structs that I used to track nodes...
  10. James222

    Asset - Scripts Fast Optimized GM Pathfinding *FREE* By James222

    Hi everyone! So for the past few months I have been having a little competition with my friend to write a fast simple pathfinder that can work with multiple units while always returning the optimal path. after a lot of trial and error I have finally simplified my work down to this tiny asset...
  11. TyGamess

    Jobs (For Ai)

    So! I have my villagers on wonder. Witch I am going to set as a job called "Wonder" or "Jobless" and when they are jobless they wonder around. But if you set them to a job, they will wonder around an area, and occationaly pick up items and bring them over to the targeted location for storage...
  12. TyGamess

    Pathfinding Speed Interuption [Solved]

    So! Path finding is a thing. Im using Grid Path Finding in my code. And as said the speed {var spd = 0} is set when you give the code {path_start(path, spd, path_action_stop, false)} This defines the speed from point A to point B. But say between point A and B there is a river and to cross that...
  13. TyGamess

    Drag And Drop with Path-Finding

    Idk if was a post already. But how to i drag and drop an object that has path finding codded into it? Here is the code I have so far: if treached = false { sprite_index = spr_villagerMoving if (!instance_exists(target)) { // create new target var gx =...
  14. SirCaliber

    GML How would i have an enemy pathfind around multiple objects?

    I have this in the step event for the enemy: grid=mp_grid_create(0,0,room_width/32,room_height/32,32,32) path=path_add() mp_grid_add_instances(grid,oBarrel,0) mp_grid_add_instances(grid,oWall,0) mp_grid_path(grid,path,x,y,oPlayer.x,oPlayer.y,1)...
  15. DragonRod342

    Legacy GM [SOLVED!] Pathfinding stop when surrounded

    Hi everyone o/ I'm coding a top down game where enemies follow the player if they're close enough to it. I'm using this code: this works pretty fine, but when an enemy with this code is surrounded by walls and have no possible path to follow, it just disappears! My game'll have some places...
  16. hans

    GMS 2 How to check for an unobstructed path.

    Hello, is there a way to see if an instance has an unobstructed path to a specific instance. I'm currently trying to implement an enemy spawner that first checks to see if the enemies it's spawning are able to travel to the player before spawning enemies.
  17. E.M.I

    GMS 2 Motion Planned pathfinding isn't working

    Hey there! I'm making a top-down adventure game with GMS2 and wanted to code a pathfinding system so the enemies in my game could avoid obstacles when chasing the player. However, the code doesn't seem to be working. This is my code: In my grid object's Create event: globalvar enemyGrid...
  18. badwrong

     Isometric ARPG - progress so far

    So I've been working on the core parts of an isometric game and its going good so far. Since I'm still on the very early parts, I'm wondering if there are any special things to consider early on that might help me later. Currently I have it performing very well even with many enemies at once...
  19. Tidbit

    GMS 2 [SOLVED!] MP_ functions unable to path through blocked corners

    Hello there, I've been fiddling with a roguelike for the past few days and opted into using GM's built in path functions to avoid having to mess around with writing a pathfinding system myself. My RL has 8 direction movement and the player can cross over blocked corners but it seems as though...
  20. AcrobatEpee

    Released The Pathfinding/Puzzle game : OneWayy

    OneWayy (with two Y because OneWay was already taken :() is a pathfinding game available on iOS and Android. It's pretty simple, the algorithm generates a level, and you need to solve it. You must only go once on each cell and fill the whole grid in order to complete a level. Just swipe to move...
Top