playMaker

Author Topic: Help on a Pathfinding system which works with a building system  (Read 3221 times)

mitchelq

  • Guest
Hi there,

I'm working on a project and I have had multiple frustrating experiences while getting my pathfinding to work correctly. I hope someone can push me in the right direction.

My situation:
- I have a world which is completely flat, made with the help of Rotorz (2d pathfinding might be an option?).
- I have a building system where I can build walls, doors, refridgerators, beds, etc etc (dynamic world).
- I have 1 player character which you can move around using point and click.
- I have multiple friendly characters (up to 9) who are AI driven, who can decide by themself wether they will wander, sleep, attack, build or whatever.
- There will be spawns of enemy's (up to 10 at a time) who will attack you.
- There will be spawns of neutral characters (up to 10 at a time), who will interact in different ways.

My problems getting a pathfinding system:

I had set up a good system using unity navmesh, but then when I went on with the runtime building system, it slowed down to an unplayable framerate because of the dynamic obstacles. (I made all the walls, doors, beds, etc dynamic obstacles, maybe there is another way?)
I then moved to Apex path, which actually worked really fast. But then I got problems because the gridsquares had to be bigger then my characters, and by doing so the characters couldn't get close enough to objects like walls. Also it did not work as my characters are not all the same size (some are bigger than the doors).

I'm not sure I should post this at the playmaker forum as it might not be a playmaker question. However, I don't know how to program without playmaker so the solution I'm looking for has to be playmaker related. Also, the playmaker forum is very alive and helpfull, so I think this is my best shot of getting a solution.

Thanks in advance & best regards,

Mitchel

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Help on a Pathfinding system which works with a building system
« Reply #1 on: May 12, 2015, 03:33:35 AM »
Hi,

 Any news on this? quite interested to see where you did go with this.

I would definitly contact Apex author because your grid size problem is certainly solveable without much effort.

 Bye,

 Jean

mitchelq

  • Guest
Re: Help on a Pathfinding system which works with a building system
« Reply #2 on: May 25, 2015, 03:18:31 PM »
Hi Jean,

For now I am trying to make it work with Poly|Nav 2d.

I have tried to contact the Ploy|nav 2d author but didn't get a reply, so I'm not sure it'll work extremely well for my project but I found out by trying that it seems to tackle all of the problems I had before.

I am not at the point I was though, because I had to redo most of my project since the navigation polygon can only be placed on the XY axis. Because of this I also decided this was a good time to create the project in unity 5 instead of unity 4.

By choosing this 2d pathfinding solution I do feel I will miss out on some features I wanted in my game in the future (such as multiple height levels), so if anyone does have a recommendation  of another solution I would still like to hear it. For now I will settle for this as I can at least continue.

Thanks & best regards,

Mitchel

mitchelq

  • Guest
Re: Help on a Pathfinding system which works with a building system
« Reply #3 on: June 04, 2015, 04:33:00 PM »
Update:

I actually requested a refund on poly|nav as it does not work well with top-down games since you can't change the navigation to work on the XZ plane, so you're stuck with xy plane navigation which is too difficult to work with.

I went back to apex path and decided I would wait on implementing different size creatures. I resized my objects and all so that the the grid size obligation to be bigger than my character is now no longer a problem.

I feel Apex path is at the moment the best solution. At least for performance.

Best Regards,

Mitchel