I have a question about pathfinding object. The problem is that i'm trying to make a game with a really big map (about 64000x48000). Most objects on this map are created and positioned when player gets close to them. So my question is how can i use the pathfinding object in this project to create enemy pathfinding? Is it better to create a huge grid and check for obstacles every certain amount of time or create a grid which is following the player position and covers generated objects and create a new one when player moves for example 512 pixels? I thing that second option may provide better optimization, but i have no idea how can i do something like that. Maybe do you have some ideas? I would be vaery thanful for any suggestion
Pathfinding object vs huge map
Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
-
-
The pathfinding object handles 1 object at time only.You'd be better off checking examples on "enemy chasing player"
-
The pathfinding object handles 1 object at time only.You'd be better off checking examples on "enemy chasing player"
Sort of. The pathfinding object can handle pathfinding for as many objects as you need. You can find a path and store it in the pathfinding object's internal array, and loop though objects and these arrays advancing objects one positions as they need to be, to control as many objects as the engine can handle. I have a game in production that can handle hundreds of objects using dynamic pathfinding (the level is destructible so the path map must be constantly updated) in real time with the pathfinding object.
-
I found an example of pathfinding for multiple objects and i works nice, but i still don't know how to apply it to massive map like that, because it gives me milions of cells and computation times would be massive. Is there a way to move pathfinding grid around??
-
You can update the grid start position (normally 0x,0y when there is only one grid needed) and size whenever you want. I've never done it, and if you have any objects still pathing but outside of the new zone, they will break.
-
sounds nice, but how can i change start position? Because i tried to achieve it and don't know how can i check if the position really changed?
-
It's the "Set Zone" action, I believe. You'll need to run whatever events you're using after moving it to generate a new map for that area. Like I said, I've never made a map so large that I would need to do any of this so I can't really get into specifics.
-
Is "set zone" setting the position of corners of the map? And how can i get value of position of these corners, because i tried to set counter but it usually stays at 0 no matter what zone i set. Sorry if i ask too much questions, but i've never used pathfinding object before.
Please login to see this attachment. -
I've done some testing and i achieved movable pathfinding map, however after moving and clearing it any obstacles are not detected anymore and i don't know how to fix it. It's probably problem with only one event but i have no idea what's wrong. Can somebody look at the example and correct it? I would be realy thankful
Please login to see this attachment. -
I really need help with this, can someone tell me what's wrong in that example?
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!