1. S

    GML Read alpha value at specific position

    Hello everyone :) I tried to toy around with flow fields for pathfinding. I have an RTS in mind, but working in physics also woke my curiosity in this ;) To calculate a flow flield, a cost needs to be assigned to every cell, right? Dynamic changes in that aside, there need to be some "fixed...
  2. Ben Allen

    Legacy GM Pathfinding with mp_grids

    So I have a pathfinding system working for a turn based strategy game using mp_grids. My problem is best explained with an example. In the image above, an enemy is pathing to a goal. There are two equally fast paths to get to the goal. In the image below, the enemy will always chose left over...
  3. D

    AI Mob Movement with Moving Platforms

    Hello, I have adopted the RTS Group movement system found in the marketplace to create the effect of mobs of units moving towards a single goal (the Player). It works beautifully for moving units and moving them around objects. The only issue I am having is when I try to move a unit around a...
  4. P

    IA colision & pathfinding

    Hello evrybody first i am sry for my bad anglish cause its not my first langage i have a problem, its 3 day i try to fix it but nothing work i am beginner on gms2 and i try to do a shooter 2d zombi and i just need to know how can i do a pathfinding for zombies i just want a simple rulle like...
  5. K

    Legacy GM [SOLVED] Having 2 enemies on an MP grid disables wall collision

    I was testing my game, and I noticed that if I spawn another enemy and use the game_restart() function or go to another room and come back, the enemies start walking through walls. This doesn't happen when I only have 1 enemy, and I have no idea how to fix it. Any help would be appreciated. I'll...
  6. Skull_k

    GMS 2 Platformer Pathfinding. Tutorial

    GM Version: Game Maker Studio 2 Target Platform: All Download: NA Links: Summary: This tutorial deals with platform pathfinding. I made 3 vidéos on Youtube to explain how we can implement pathfinding for a 2D platformer in game maker...
  7. T

    GMS 2 Grid-based pathfinding with tileset

    Good morning. The title already states it.. Is it possible to have grid-based pathfinding work with enemies collide with tiles? I got a tile layer where i set all my collision tiles. This works fine with my player though. But for my NPCs the function mp_grid_add_instances() needs to have an...
  8. D

    GMS 2 Is there a reason mp_grid_to_ds_grid exists, but ds_grid_to_mp_grid does not?

    I'm building an RTS-style game in Gamemaker Studio 2. Think Command & Conquer or Dune 2. I'm having performance problems. I have to clear and repopulate the room mp_grid multiple times per second to get reasonably acceptable pathfinding from my obj_units. This a slow process because my maps...
  9. mar_cuz

    GML Pathfinding Alternative

    Hi guys, I'm looking for an alternative to A* pathfinding and steering behaviours. Those two styles don't operate the way i need. I have a lot of objects needing to pathfind at the same time so A* cuases slowdowns and steering behaviours are too slow when changing their target x and y. Is...
  10. O

    Legacy GM Making Enemy Follow Player if it's in their Field of View

    So I want obj_enemy to follow obj_player (If it can see it with no walls inbetween) avoiding obj_walls. This is what I have as a code: On the obj_control create event: global.grid=mp_grid_create(0,0,room_width/32,room_height/32,32,32); On the obj_enemy create event: global.path=path_add(); On...
  11. Didjynn

    Patfinding/drawing the path problem

    Hello everyone :) I found a link between 2 bugs and this is... quite strange. It will be a little hard to explain but I will do my best. Normally, rectangles are drawn to show the path I will follow, it stops to draw under my mouse (like the right side of the picture). But there is a "+"...
  12. Didjynn

    Draw a path on a pathfinding without using draw_path

    Hello everyone, I have a grid and a pathfinding working well and I would like to draw the path depending of my action points like this : But the actual system I'm using isn't really good and anyway doesn't work anymore since I don't use objects anymore to make my map (I was using the...
  13. L

    GML Flow-Field Optimization

    I've been developing a flow field for some time now and i'm running out of optimization ideas. Currently, it's just too slow for use in an actual game. I am using buffers, accessors, and making sure my scripts are as lightweight as possible. I already know about separating the map into several...
  14. dazza_bo

    Legacy GM [SOLVED]Isometric pathfinding using mp_grid?

    I have read a few times that the easiest way to implement pathfinding in an isometric game is to handle it all in regular 'top down' code then only use isometric for rendering. What I don't understand is how though. I have a ds_grid which is filled with isometric sprite tiles that I can render...
  15. B

    GML RTS Cover System

    So I am making an RTS game and I want it to have a cover system kind of like XCOM, where if you click on a wall, the soldier would take cover on the side closest to it. I am using a mp_grid as the pathfinder. Does anyone know if there is an algorithm that can help me do this? Thanks Ian
  16. M

    GML AI pathfinding and sudden reaction to world objects

    Hey, I have a problem regarding enemy pathfinding and how I can make them react to sudden doors closing and things like that. In my game I have pathfinding for enemies using an mp_grid and mp_grid_path. It is simple, I create the grid at the start of the room and I modify it if there are any...
  17. Rackover

    GML mp_grid pathfinding problem

    Hi, I've got an issue where i'm building a grid then putting "walls" in it : the walls are squares of the same dimensions than the grid's cells. But whenever I put walls and "recalculate" the grid, the walls appear ENORMOUS in it : blocking any unit trying to go through a one-cell-width passage...
  18. W

    Legacy GM [SOLVED] possible bug with mp_potential_step

    I think there is a bug with mp_potential_step or something. The linked gif shows the minion getting stuck (the white circle in the bottom left corner) then I switch camera follow object to minion instead of the obj_player and it works fine. Please see this animated gif for detail...
  19. John Andrews

    Game Mechanics Pathfinding Platformer AI

    I've been developing a platformer game whose enemies have a function to follow the player finding paths through "complex" buildings and avoiding obstacles, using platforms and other things, the question I have is: Is it too much for AI to have pathfinding nature? Should I make my AI simplier or...
  20. D

    Path stops midway (First post XD)

    I programmed an object to use pathfinding to go to a location and then destroy itself. However, the instance sometimes won't reach the end of the path. I find this out using path_position. Some of them stop at 0.83, 0.92 etc. What are the cases where the pathfinding's path won't complete its path?