pathfinding

  1. ph101

    One way pathfinding, possible algorithm

    Hi guys I'm using mp_grid_path to calculate paths in a 2d grid, and its working well. However I want to be able to make certain cells one way, so I can have one way corridors for example. I realise mp_grid_path doesnt support this sadly, so I'm looking for a way to do it without coding my own...
  2. S

    Help with A*-Pathfinding

    Hello everyone, I'm trying to implement a simple a*-pathfinding algorithm in my game, but I have problems with it. I don't get any error messages, but the script doesn't seem to work. Here's the code i'm using so far: In the create event of an control object the following code runs, that...
  3. Bee

    HTML5 Party member movement

    Hello all, I'm trying to work through some bugs that happen with the game when I try it in HTML5. I have movement based on a mouse click. The "player" is invisible and moves exactly to the click, and the party members move to the mouse click on an x and y random offset. In Windows, it works...
  4. S

    Legacy GM Making a graph/grid like node system[solved]

    Hello fellow game designers and programmers, I have (very)recently started to work on a breadth-first pathfinding algorithm and after some really long posts(here), I finally managed to get a grasp on how the algorithm would be programmed.... after working most of it out on paper I realized that...
  5. S

    Legacy GM Breadth-first pathfinding algorithm[problem][Solved]

    Hello fellow programmers, I was trying to create a pathfinding algorithm using breadth-first search and using enqueues and dequeues...... I had seen a post on a*(star) algorithm and I was adapting that to my algorithm(bad idea?) an ways here is the code I was trying to adapt it from... /*...
  6. Bee

    GML Pathfinding and masks

    Okay I solved my last issue by myself after posting... maybe I can do that again! Fingers crossed. I'll try to explain my problem. The background is generated from tiles, and then overtop of that are mask tiles to prevent anyone walking through the "solid" objects that are drawn on the tiles...
  7. C

    GMS 2 Path-finding AI that stops at barricade

    The code I've got is really sloppy and does not quite get the job done. I'm asking for anyone's help that could help smooth the path up. The objective is as follows: 1. Hunt the player 2. Stop if a barricade is in the way of the path 3. Continue the pursuit of the player if...
  8. Z

    GMS 2 [SOLVED] A* pathfinding problem

    Hi guys and girls, So I'm making a 2D tile-based isometric game in gamemaker studio 2. I'm having a problem with the A* pathfinding algorithm I wrote. It appears to work most of the time but for certain tiles, there is a issue. It's quite in-depth unfortunately, but I'll try to explain. So...
  9. O

    Legacy GM Objects not following path

    I am trying to create a top-down stealth game a lot like the original Metal Gear for the MSX2. It was all going so well until I ran into a little issue with some path-finding code. My efforts to fix the problem have often resulted in me rewriting code in unusual ways to desperately try to solve...
  10. ikonhero

    AI pathfinding and doors

    Hi, I followed this tutorial on AI pathfinding: It works quite well. The only thing I can't seem to figure out is how to implement doors into my maze. I use the pathfinding for player movement through the room, but I also tried using it to go to the door and open it, but since a closed door...
  11. M

    Pathfinding and roaming states

    I've been using pathfinding for a while now in my game (top down shooter). The enemies are supposed to have 2 different states whenever they are not engaged, idle and roam. While in idle they stay still and while they are roaming they pick a random direction and move there until an alarm makes...
  12. H

    Legacy GM Do I Need 1 Grid Or Multiple?

    Hey, so I'm working on a game where my enemy objects are using the grid functions to move around. Right now I have the game create a single global grid at the beginning of the game that all the objects use as their grid. However, I've just created a type of door object that I want certain...
  13. A

    GML Problems with pathfinding (mp_grid) and overlapping enemies

    Hi guys! First of all, sorry for my english sometimes.. I'm from Germany ;) I'm just working on a topdown shooter (yes, it's a zombiesurvival...), but before you start complementing about it, it'll be a remake of the CoD zombie games, with ALL the features of the original game in a sweet...
  14. Cpaz

    GML Pathfinding with minimal number of enemies causing slowdown

    Recently, I've been putting together a better system of pathfinding. Now that it works, I need it to run well with a decent number of enemies. The path is defined the the create event of the parent object as so: ///collision testing path=path_add(); The "end step" event handles the use of the...
  15. S

    Legacy GM Messy A* Pathfinding

    Hi :) I'm trying to implement A* pathfinding to my game(I can't use the built-in pathfinding system because i want to have full control of the routing system) But i'm getting messy results when trying to get a path around a wall: The red circles are the Open nodes, with their heuristic values...
  16. F

    GML Platformer : AI Pathfinding

    Hi there, I'm looking for a good tutorial on how to program pathfinding for enemy AI in a side-scroller platform game. Youtube only has tutorials for top-down pathfinding (using the A* engine if i'm not mistaken). I have found this video illustrating what I'm looking for, but it's way too...
  17. Necromedes

    MP Grid Pathfinding - How To make Enemies Avoid Each Other?

    I understand that this is a long lived issue but I haven't been able to find a proper solution. I am using an mp_grid for my enemy pathfinding and need a means of collision between different enemies, instead of allowing them to seemingly merge into one spot. I have tried x and yprevious...
  18. M

    Legacy GM Traffic AI Pathfinding

    For my game i'm trying to create cars that navigate a road system to their destination. I have multiple intersection objects that determine when cars will make a turn, like a graph with nodes and lines. All i need is a way for the cars to choose whether to turn left, right or go straight on. I...
  19. Ggbah

    What if the object finding a path is an instance on the grid?

    My Mob is force moving to the top left of the room at start after attempting to use the start_path finding function.. 1. The Obj_master_collision (which is my grid instance) is the parent of the monster that is using the path.. 2. So maybe the monster is like.. Path_start, my current X/Y is...
  20. ph101

    Legacy GM where do paths originate within cells on mp_grid_create

    Hi I'm having trouble generating paths that start from and end in the centre of a cell of my grid cell_width = 145; cell_height = 145; offset_w = 0; offset_h = 0; grid = mp_grid_create(offset_w, offset_h, room_width div cell_width, room_height div cell_height, cell_width, cell_height)...
Top