pathfinding

  1. Pretorg

    Legacy GM [SOLVED] Problem with grid and clearing cells, it won't work

    Hello! after a long abscense i am back trying to finish my first projec, it is a 2d topdown game set in space and one of the enemies is supposed to be able to navigate towards the player without hitting anything in the way (pathfinding) because both the player and the enemy ships get damaged if...
  2. S

    GMS 2 [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...
  3. M

    Enemy Pathfinding(mp_grid) / State Machine Problems

    Hello everyone, I know this question asked many times before and yes I checked old posts and tried different solutions and approaches as much as I could but I'm still learning :/ (I started to GMS 4 months ago, pretty new). I will try to explain my problem. I'm trying to make a topdown shooter...
  4. hughrock18

    Legacy GM There MUST be an easier way! (Pathfinding)

    Hey everyone! The beginning of this thread is exposition of things leading to the problem. Don't have time for that? Skip down to the "comment", // HELP HERE //. In making an isometric "continuation" of yugioh the duelist of the roses called "Yu-Gi-Oh! The Shadow of the Dark Roses". For those...
  5. vdweller

    GMS 2 Custom A* pathfinding + variations (HPA*, JPA etc)

    Hi all, This is mainly a discussion/presentation of ideas thread. There are lots of good pathfinding concepts and I am not pretending to know all about them. Hopefully this thread will grow to a meaningful exchange of knowledge. I will begin my approach from the basics and move up to more...
  6. D

    Windows path_add functionality

    When you call path_add() the first point added is the position of the caller. If the caller's anchor is outside the bounds of their sprite (such as one pixel below a character's feet so they rest on a platform) then when the path is created the first point will end up registering "below" the...
  7. KPJ

    GMS 2 enemy move toward player (GMS2)

    Hi everyone! I need help. I want the enemy to move toward the player if the player shoots within a certain range. At first, all my code was working and the enemy moved toward the player but then all of a sudden it stopped working and the enemy didn't move. //if player shoots with (oEnemy) {...
  8. KPJ

    enemies overlapping? (GMS2) (SOLVED)

    Hi all. I have an issue in my top down game where enemies move toward the player. When there is more than one enemy, the enemies overlap and look like one. Here is my code: //Enemy Create grid = mp_grid_create(0, 0, room_width / 32, room_height /32, 32, 32); mp_grid_add_instances(grid, oWall...
  9. KPJ

    GMS 2 Enemy pathfinding

    Hi! In my top down game my enemies use a grid system to follow the player and avoid objects. However, while my enemy is chasing the player the way the enemy is facing is very choppy (it glitches between 2-3 different angles). How can I make it so that the enemy smoothly looks toward the...
  10. KPJ

    GMS 2 Pathfinding (GMS2) (SOLVED)

    Hi everyone! I am making a top down stealth game where I want the enemy to chase the player (and look at the player) if it is in within range. I don't want to use move_towards_point or mp_potential_step / mp_potential_step_object as they have jittery movement. So, I tried Heartbeast and Cameron...
  11. A

    Legacy GM Pathfinding clean collision code...?

    Hola! I've had an eyeball at similar queries and understand that, if I want to stop objects overlapping if they use the same path, I need to stop the path and then restart it. The trouble is, I'm not sure how to make this clean so that I don't need different code for each object. At the...
  12. S

    GPS system pathfinding

    I’m making an open-world game and I need to work out a way to find a gps route between locations. I’ve established that I’ll need to determine the closest road object to each location and then find a route between them. Right now, I’m using an mp_grid system with squares the size of the road...
  13. V

    Isometric help (collision and depth)

    I've been struggling to determine the best way to have collisions and depth for an isometric game my team is making. I've been able to get some objects working properly, like a bus, but I had to split the bus into two parts, so I could also use a diamond collision mask. However, this game...
  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. V

    Legacy GM mp_grid and Height Variation

    Alright, so I've recently started working with mp_grid functions for pathfinding for a top-down styled game, and was wondering how feasible it would be to add in a system that can factor in a "height variation" for tiles, ie. you need to get to a point 2 blocks above you, but can only move up...
  17. T

    How know if a Wall is between 2 objects

    Hello , i need help : I have a enemy who go on my player object why his pathfinding and when he is at range he stop and shot arrow, My problem is i need to know how know if the place between the ennemy and the player is free of Wall . Actualy is a Wall is between the enemy and the player...
  18. Askhat

    [SOLVED] mp_grid_path works differently than expected

    Hello, i'm trying to make a simple path finding with mp_grid_path function, but it is smth wrong. I expected that following object will go through center of the nodes. I wrote the minimum path finding code: - created grid - added o_wall to forbidden object - created path - computed the path...
  19. D

    GMS 2 The path found by mp_grid is not actually passable.

    Hi guys, i'm new to GMS, it's nice to be here. I fixed the issue, see the second post.
  20. sv3nxd

    Legacy GM [Djikstra's Pathfinding] Did I do it right?

    Hello game-maker-community, I've been working on a pathfinding-algorithm since yesterday morning. I didn't find any tutorials on how to implement it in GML nor what the most cost-effecient is. This is really important to me, as pathfinding has been a problem for me for atleast half a year (If...
Top