• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

pathfinding

  1. T

    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...
  2. T

    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...
  3. T

    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 =...
  4. 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)...
  5. D

    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...
  6. hans

    GameMaker 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.
  7. E

    GameMaker 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...
  8. 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...
  9. T

    GameMaker [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...
  10. 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...
  11. 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...
  12. S

    GameMaker [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...
  13. 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...
  14. 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...
  15. vdweller

    GameMaker 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...
  16. 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...
  17. KPJ

    GameMaker 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) {...
  18. 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...
  19. KPJ

    GameMaker 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...
  20. KPJ

    GameMaker 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...
Top