pathfinding

  1. E

    Draw line(s) from point to point like a path finder.

    Hello, This is what I want to create : I want to draw a lines between two points but they need to avoid some objects that are marked as red color on this image. How could this be done ?
  2. lolslayer

    Game Maker's very first NAVIGATION MESH?

    So... Lately I've created pathfinding based on a navigation mesh, with a little bit of tinkering it should be able to support 3D pathfinding aswell! I've googled it and so far I could see I'm the very first person to ever create a navigation mesh system in Game Maker. :) Here's a video: PS...
  3. Bee

    Make player face the right way while pathfinding

    Hello all, I have built a game where the player targets the nearest enemy and uses Game Maker's pathfinding to make his way there on his own. The problem is that he doesn't face in the direction of his movement but faces his target. What do I use for his direction for his facing (right, up...
  4. Bastendorf

    Legacy GM [SOLVED] Pathfinding Made Less Robotic

    Sorry to be a bother again, but this is the other one I've gotten stuck on. And I'm sorry if this was already asked, but I just don't have the energy or ADD suppression to scan through 133 results related to the keyword "pathfinding". I'm making an isometric game. Legend of Zelda (the original)...
  5. Necromedes

    Pathfinding Using Cells?

    I am using tiles with my map generator and was told that I could indeed use mp pathfinding with them by use of cells. This is a portion of GML that I have never touched on and have always had trouble grasping the concept of grid/ds_list coding. I need someone to take the time to explain to me...
  6. ph101

    AI: natural looking pathfinding for multiple zombie-like agents

    Hiya I'm looking for suggestions for natural looking pathfinding for multiple NPCs. Say a crowd of zombies (they aren't zombies) but that type of thing. The point is they go between different points on the grid in crowds - they aren't pursuing a player or anything. Here's what I'm doing: I...
  7. Necromedes

    Pathfinding With Tiles?

    I am using tiles for random map generation and the map sizes are quite large. We're talking 50,000 x 50,000. Hence why I am using tiles instead of instances for the map. The generator works good enough at the moment but I intend on using motion planning for the path finding. So now you surely...
  8. HayManMarc

    Pathfinding movement direction

    Is there a way to restrict the movement direction of an object during pathfinding? When I set up an object using pathfinding, it will set it's direction at any angle it needs. I'd like to restrict it to 30 degree increments, and I can't figure out how to do it. I've tried simply manipulating...
  9. M

    [SOLVED] There has to be a better way (for/repeat loop optimisation)

    Context: I've made a simple algorithm that loops through data and creates a series of path points, but the end result is a path with thousands of points - which is extremely slow to calculate in a later bit of code - so I'm working on a way to strip the path of redundant data (that is, points...
  10. Dagoba

    Legacy GM mp_grid_delete_instances() ?

    Hello there! I had my previous topic about something like this but I have bumped it like 4 times now and it doesn't seem to get any answers anymore; probably because it has many long posts and people not necessary want to read them all. I post this same question, however I have progressed with...
  11. brinycann0nade

    x and xprevious remaining the same when moving object on a path (check if moving) [SOLVED]

    I sort of have an idea of what to do but I can't quite get it. I have an object where I need to check if it's moving or not so I can change the sprite accordingly. It moves using a path for pathfinding. I know that x and x previous have something to do with the End Step event but I don't know...
  12. J

    Keep path-finding enemy from freezing when player collides.

    I have a game in which a enemy follows the player, it path-finds fine, just when the player collides with a wall, the enemy freezes. I tried using methods besides ticking Solid and I still get the same results. I have it on a 16x16 grid, it is simply when the player is next to a wall, the grid...
  13. Ariak

     Pathfinding with TileMaps

    Hello! With the complete revamp to tiles I thought i'd have a look at a demo and see how to work with the new set of functions. I noticed the collision in the platformer-demo checked against an invisible tile layer with the tilemap_get functions. These functions return the number of a tile...
  14. Hermit

    Sideview AI pathfinding with stairs and depth in 2D

    I'm stumped on a good way to code this. My enemy AI needs to chase a goal that will move around a map with stairs but some of those stairs are on accessible floors. To illustrate this problem, the purple square is the enemy and the yellow circle is the goal. In this scenario the square must...
  15. T

    Legacy GM [SOLVED] What might be causing mp_grid_path to fail?

    Hey all, Title says it all really. I have a character that follows sounds (or the player if he sees them). After reaching the end of their 'investigation' they will wait 6 seconds and then return. However the mp_grid_path call keeps failing, and the character is not returning to their...
  16. Dagoba

    Legacy GM Pathfinding problem with a gate object

    Hi! I have a pathfinding on my object that roams randomly in a room. There are objects called "obj_gate" and I need to make it so, that if the gate is facing right, you can only enter the gate by walking to right from left. Whenever the object that roams will collide with the gates, the doors...
  17. mafon2

    Pathfinding with grid's shifted, Filling the grid

    I followed two of the most popular tutorials about pathfinding and got the amazing results I've been trying (with horrible results) to write algorithms for. Didn't know there's already built in stuff. But for some reason the grid instances appear shifted 16p down and 16p right, plus sometimes...
  18. D

    Legacy GM AI: Modeling imperfection

    Some quick background: I'm developing a game with one of the emphasis of design being sophisticated AI. Currently I have a simple ecosystem modeled on a map that is 120 cells by 120 cells. Each cell represents 1 meter or roughly three feet. In this map I have a randomized procgen terrain...
  19. A

    Legacy GM Nearest empty space to a point in an mp_grid

    Hey guys, does anyone know of a script or method for determining the nearest empty space to a point in an mp_grid? I'm wracking my brain trying to figure out the pathfinding for my game. Basically what I want is for the character to move to a certain point unless that point is occupied. If it...
  20. N

    Custom action at path end?

    Hello! I'm having difficulty understanding the pathing functions in GM:S - I'm attempting an "idle" state for an AI which computes the coordinates to a random cell in the grid, moves to it, then repeat the process once it reaches the end of its path. However, I cannot figure out how to set any...
Top