Unity Community


Page 2 of 43 FirstFirst 123412 ... LastLast
Results 21 to 40 of 843

  1. Posts
    366
    Quote Originally Posted by Cirion View Post
    Hey,

    Just wanted to ask you a question if this will support jumping between 2+ navmesh.

    EG you have a 2d platformer that allow enemies to jump from platform to platform as part of their patrol path.

    Cheers

    Cirion
    You can have two different nav meshes, but it does not support switching between the two. I'm not sure I understand the second question. I don't think I'd use a nav mesh for a 2D platformer. I've never made a 2D platformer before, but I imagine I would use a waypoint graph, and just set waypoints at the end of each platform where the agent can travel.


  2. Posts
    366
    Quote Originally Posted by BloodWraith86 View Post
    I have a question, as I'm a bit of a AI newb.

    Im making a 2D game that works only on X & Y axis, with Z being layers (irrelevant to movement) and orthographic camera.
    Movement is done in 8 isometric directions using North, east, south, west, northeast, northwest, southeast, southwest directions, but is NOT tile based. Collision is done in tiles, and every character's attacks and collidors are square tiles, but movement is free. However, one can ONLY move in 1 of 8 directions.

    How difficult, if at all, will it be to use this with my 8 directional, free, (NOT-tile-based), movement?
    This system assumes Y is up, since Y is the up vector in Unity, so you'd have to make a few changes if you would want a different up vector. I think the system will be fine for the rest of your concerns.


  3. Posts
    2
    Quote Originally Posted by alexkring View Post
    You can have two different nav meshes, but it does not support switching between the two. I'm not sure I understand the second question. I don't think I'd use a nav mesh for a 2D platformer. I've never made a 2D platformer before, but I imagine I would use a waypoint graph, and just set waypoints at the end of each platform where the agent can travel.
    Thanks for your reply. Sorry for the badly worded question I will have another go

    Basically regardless of method navmesh / waypoint / xyz I want to be able to achieve the AI creep the ability to jump / climb up a set of platforms like the attached image below.

    Name:  ai example.png
Views: 2012
Size:  22.7 KB

    If simple path can not support what i am after is it possible to add or extend it to achieve what i want.

    Thanks in advance

    Cirion


  4. Posts
    366
    Quote Originally Posted by mgrenier View Post
    Really nice work alexkring !

    As King also mention, I'm very interested in seeing a stress test as I'm building a game with high density of AI (crowd).

    I read the user manual, and I must say it's a bit lacking explanation in "Terrain Representation" since we don't have the code structure in front of us. I'm saying this because I've already built my own system with a navmesh (polygons to reduce the nodes count) and I was wondering how it could be merged/connected with your package.

    When building my own "Terrain Representation", I supose I'll need to code every bits of debug / inspector helper?
    The package comes with all the source code; there are no dlls, just c# code. When you buy it, you will have all the code in front of you :] But I will make note of your comment and improve the User's Manual, I agree with you. If you want a bit more information about the code before buying it, take a look at the Doxygen doc which documents every function and data structure in the package.

    When building your own terrain representation, you need to inherit from the IPathTerrain class. If you click that link, you can see the 9 functions that you need to define in order to use your own terrain representation. The pathsmoothing will still work on a nav mesh (I use the funnel algorithm for pathsmoothing), so long as you fill out those 9 functions. I've created a pathfinding system for a nav mesh for Playstation Move Heroes, and I am confident that this interface will work for a nav mesh as well :] Also read the "Create your own Terrain Representation" section of this doc.


  5. Posts
    366
    Quote Originally Posted by Cirion View Post
    Thanks for your reply. Sorry for the badly worded question I will have another go

    Basically regardless of method navmesh / waypoint / xyz I want to be able to achieve the AI creep the ability to jump / climb up a set of platforms like the attached image below.

    Name:  ai example.png
Views: 2012
Size:  22.7 KB

    If simple path can not support what i am after is it possible to add or extend it to achieve what i want.

    Thanks in advance

    Cirion
    For this type of game, I would use a waypoint graph, and yes SimplePath will support searching across a waypoint graph so long as you define your own terrain representation (there's a section in the doc that explains how to do this). However, I wouldn't use any steering for what you are doing. In otherwords, I think you'd want to define your own Agent prefab, and only give him the PathAgentComponent, but not the NavigationAgentComponent and SteeringAgentComponent like the existing Agent prefabs have. For your case, SimplePath will give you a list of points telling you which path that you need to take, and then you can interpret those points as you desire. For example, looking at your image, SimplePath would give you a list of 4 points, so you can take those points and tell the AI to play a jumping animation between each point.

  6. Super Moderator
    Location
    Great Britain
    Posts
    9,683
    Hi alex, couple of questions:

    1. can I just build my own list of points (gameobjects) in the scene and have it generate a pathfinding solution from just a point cloud?

    2. does it support a max time for pathfinding value and spread the calculation (if need be) across several frames? such a setup is pretty much required for mobile devices. And just give me a list of points back via say a callback or something in an array.
    Currently working with Sony on our new
    PS4 and Vita game in Unity!

    This post is not representative of Simian Squared Ltd


  7. Posts
    366
    For those of you interested in the stress test, here you go!


    Last edited by alexkring; 05-18-2011 at 07:50 PM.


  8. Location
    Pennsylvania
    Posts
    2,954
    Quote Originally Posted by alexkring View Post
    Yes you can use multiple grids, and you can theoretically mix terrain representations, though I've never tried it. Each PathManager is linked to a PathTerrain, and each agent is linked to a PathManager. You could have a waypoint graph for the flyers, and a grid for the ground enemies. This would require two PathManager objects.
    So you couldn't use multiple grids for a single agent?


  9. Location
    I am where I am
    Posts
    440
    Quote Originally Posted by alexkring View Post
    For those of you interested in the stress test, here you go!
    Nice! But what fps are you getting? And what are the stats of the rig your running it on?


  10. Posts
    366
    Quote Originally Posted by legend411 View Post
    So you couldn't use multiple grids for a single agent?
    Actually, I think it will support this. You would just need to call RemovePathRequest on the agent who is switching grids, and then set his PathManager member variable to the new grid that he is supposed to use.


  11. Posts
    366
    Nice! But what fps are you getting? And what are the stats of the rig your running it on?
    This is running on my laptop. I have a low-end alienware m17x. I don't know what the framerate is, somewhere between 15 and 30.
    Last edited by alexkring; 05-18-2011 at 07:41 PM.


  12. Location
    I am where I am
    Posts
    440
    Quote Originally Posted by alexkring View Post
    This is running on my laptop. I have a low-end alienware m17x. I don't know what the framerate is, somewhere between 15 and 30.
    Well then 500 is quite (drum roll) amazing


  13. Posts
    366
    Thanks! I updated the video so you can see what it looks like without debug visuals as well (just look at the previous video post). The bottleneck is rendering and physics. I also ran a test with 1000 agents, and I was getting maybe 5-10 fps.


  14. Location
    Zürich, Switzerland
    Posts
    26,572
    Looks very interesting. Definitely looking forward to see where it goes and if it can become a reasonable alternative to Aron Granbergs A*.

    At the time, at least from the docs and videos, it shows a lot of potential, but with a planar grid representation only its at least for me useless and if I have to implement the representation and editor tools to generate it myself I'm a bit in doubt why again I invested at start. I don't mind paying a fair price for good software but at the time its definitely too limited and not where it was indicated to go on the Pathfinding thread


  15. Posts
    366
    Quote Originally Posted by dreamora View Post
    Looks very interesting. Definitely looking forward to see where it goes and if it can become a reasonable alternative to Aron Granbergs A*.

    At the time, at least from the docs and videos, it shows a lot of potential, but with a planar grid representation only its at least for me useless and if I have to implement the representation and editor tools to generate it myself I'm a bit in doubt why again I invested at start. I don't mind paying a fair price for good software but at the time its definitely too limited and not where it was indicated to go on the Pathfinding thread
    Can you tell me a bit more about the game you are making? DragonAge was made with a grid terrain representation, so it might be the case that you can still use a grid. If you want to define your own terrain structure, there is documentation for how to do this. If you really do need tools for generating a navigation mesh, that is not something I plan on offering. I would suggest Mikko Monnen's Recast, which has become an industry standard for nav mesh generation at this point, and it's free and under the MIT license. You could still use SimplePath for the runtime portion of navigation. I'd love to support something like nav mesh generation, but that's simply beyond the scope of the product, and I know I couldn't do a better job than Mikko :] I apologize if you have been misled!
    Author of SimplePath pathfinding package


  16. Posts
    615

  17. Super Moderator
    Location
    Great Britain
    Posts
    9,683
    Did not get a reply
    Currently working with Sony on our new
    PS4 and Vita game in Unity!

    This post is not representative of Simian Squared Ltd


  18. Posts
    366
    Quote Originally Posted by hippocoder View Post
    Hi alex, couple of questions:

    1. can I just build my own list of points (gameobjects) in the scene and have it generate a pathfinding solution from just a point cloud?

    2. does it support a max time for pathfinding value and spread the calculation (if need be) across several frames? such a setup is pretty much required for mobile devices. And just give me a list of points back via say a callback or something in an array.
    1. You can build your own list of patrol points (game objects), and the agent will move through to each of those patrol points in order. But, there is no support for building a waypoint graph. Hmm maybe I should just add a waypoint graph, it wouldnt take long.

    2. Yes it supports load-balancing, and yes it gives you a callback for important events. You can see what control you have over performance on pages 14 and 15 here (read the PathManager section). It's actually better to control performance via the number of "A* cycles" than setting millisecond values, since a single A* cycle is the most atomic operation of a planner (I can go into further detail about this if you like, but I don't think you need that level of detail). The system sends a message to the gameobject when navigation request fails or succeeds. When the path request succeeds, a message is also sent along with a Vector3[] containing the path solution.
    Author of SimplePath pathfinding package


  19. Posts
    240
    Quote Originally Posted by alexkring View Post
    1. Hmm maybe I should just add a waypoint graph, it wouldnt take long.
    Yes, please. That would be great!


  20. Location
    New Zealand
    Posts
    245
    Quote Originally Posted by alexkring View Post
    1.. Hmm maybe I should just add a waypoint graph, it wouldnt take long.
    Yeah, that would be great.

    Im currently integrating into into my rts, which requires hex based circular grids.. so gonna have some fine bulding those, but i have a lot of other plans that this is also gonna find it way into.

    Thanks for a solution....

Page 2 of 43 FirstFirst 123412 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •