Search Unity

Fantasy AI 2.0 [RELEASED]

Discussion in 'Assets and Asset Store' started by brilliantgames, Mar 1, 2012.

  1. rockysam888

    rockysam888

    Joined:
    Jul 28, 2009
    Posts:
    650
    Hi brilliantgamestudios,

    If I remembered correctly, each default gui object need 1 draw call. The mini game has several gui objects that may slow down your performance. You may consider to combine them into 1 single draw call (like those from NGUI or EZGui) to speed up the whole game.
     
    Last edited: Apr 4, 2012
  2. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thanks for the pointer. GUI Isnt really much of a focus for this project. If I get extra time after the release maybe I'll work on GUI just for you. ;)
     
  3. blurededge

    blurededge

    Joined:
    Mar 14, 2012
    Posts:
    255
    Though I anxiously await the release of this product, I greatly value your commitment to putting out a quality finished product BGS. I'm sure it will be worth the wait. Please, with all the work your doing, don't forget the importance of good documentation; particularly with a product as powerful and complex as this one promises to be. Keep on keepin' on and we will all be waiting for you at the finish line. Cheers!
     
  4. rockysam888

    rockysam888

    Joined:
    Jul 28, 2009
    Posts:
    650
    No need. :D
    Crossing fingers for next big release...
     
  5. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Encouraging words. Thank you. There will be plenty of documentation. Maybe not as much to start, but I will continue making tutorials. The pathfinding tutorial I made is obsolete now. It is almost a completely new system. Works 10 times better already. You can now bake waypoint data. I will share more details on it in the next few days. The pathfinding system is becoming very powerful though.
     
  6. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    One question I realize I didnt answer. With the pathfinding system I have designed, making AI's climb ladders would not be very hard at all. All the AI needs are waypoints going up the ladder. There are no rules with the waypoints, you can place them anywhere. Its not a navigational mesh like unity 3.5's version(although you can treat it like a navigational mesh if setup properly) This pathfinding system has been 10 times improved since any of the latest updates(including the latest mini game update). I am uploading a new video on youtube as we speak. The video shows 70 units navigating 1000 waypoints. The waypoints are setup like a navigational mesh. Keep in touch.
     
  7. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    New pathfinding system is nearly done! I am uploading a new video of a demonstration of 70 units navigating near 1000 waypoints. The waypoints are setup like a navigational mesh. The old pathfinding system was unstable and slow. It worked by counting backwards frame by frame from the target goal waypoint, to the current AI's waypoint. This became a big problem when there were many waypoints between the AI and his goal. The more waypoints between the AI and his goal, the more exponentially long it took to calculate his path. Now the calculation is instant(one frame) no matter how many waypoints are between the AI and his goal. As well performance wise it runs about twice as fast. As well now, you can bake the waypoint data to speed up load time and performance if you have a large amount of waypoints in your scene. More information and goodies are coming! Heres a screen shot of the top view of the map with the navigational mesh.


     
  8. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Ok so this means that now they move much more dynamically if there are so many waypoints correct?

    Also since your waitpoint system really seem very straightforward and easy to use i might actually consider using it for strategy game. Do you think it would be possible to place waypoints in realtime? For example roads will be built realtime and waypoint would be assigned on each part of road.
     
    BryanO likes this.
  9. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    New PathFinding Video!

     
  10. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Yes. In the mini game Protect The Crystal, there is only a total of 40 waypoints, they are placed on every corner. With this many waypoints the old pathfinding system worked efficient enough to function. If you played it enough you may have noticed the units spin around in circles sometimes. This is because while they were spinning around, they weree calculating how to get to their target. If I used the old pathfinding system on the same map I demonstrated in this video I just posted, they would probably take 2 MINUTES to calculate their path! To answer your question, I am not really sure if dynamic waypoint placing could be possible with the current system yet. I think there are some open doors for this in the future for sure though. It would depend how many waypoints are already on your scene. So much information has be gathered if there are a large amount of waypoints. With this new system, every waypoint has to have a knowledge of how many waypoints every other waypoint is away from itself. So adding a new waypoint would have to updated every waypoint including himself. But the system improves everyday, pathfinding is something I'll probably never stop working on haha.
     
  11. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Damn that is so interesting to watch, you could make circular road, and make video of those skeletons running for first place, maybe placing some obstracles to make it more random, i wonder which one would win:D Keep posting more videos. Movement seems good, please make next one with ladder, becouse that would be really awesome to have.

    Also one more thing. Does your package comes with that game demo you made? Instead of tutorials for setup i preffer rather example scenes, so having this game in package would be great base stone.
     
    Last edited: Apr 5, 2012
  12. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Its funny you asked that. I was just thinking about including this scene with the package. Last night I added 1500 more waypoints to that scene for a test. It took about 2 hours to bake the waypoint data which was 2500 waypoints. Which is not bad considering the incredible amount of data that has to be gathered.
     
  13. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Sometimes when I'm bored I make 150 skeletons target a red cube on the edge of a ledge... :D

     
  14. sirenpro

    sirenpro

    Joined:
    Apr 6, 2012
    Posts:
    97
    I like this alot!!
     
  15. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Well thank you. :)
     
  16. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Turned the entire mini game map into a low resolution Navigational Mesh. Makes for perfect pathfinding. As well, you can now press one button and AI will take over your player!
     
  17. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    More videos! :) Dying to see some new stuff while waiting for release in the Asset Store! :) Already building a small "army" of models and some terrain, ready to drop this AI in and let em go to town on each other... almost literally... :)

    OH! Had a thought... If you have "leader"s set up as a parameter in the AI, I'm assuming you're doing something like this:
    if AI has a "leader" assigned, it only has to "follow the leader" if it's outside a certain range, and if not, do something like "scan for enemies within range" -- but if AI doesn't have a "leader" assigned, it IS a leader, and then it uses the NAVPOINTS to go to a target area? No sense having followers use up the CPU doing nav-calculations, when only the leader needs to, right? Was thinking about that at work today (only on breaks, of course). Thusly, if a "leader" dies, all the followers who had that AI as a leader would then become their own leaders... hmm.. interesting idea: if that happens, the closest "leader-less" AI to the last location of the now dead leader becomes "leader"?
     
    Last edited: Apr 10, 2012
  18. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Hey. My things have changed so much the past week Ive been working on this. Yes the AI only do pathfinding when they need to. But now there are 2 types of pathfinding available. There is "Waypoint Navigation" and "Navigational mesh navigation". Now heres the difference. Waypoint navigation navigates between waypoints and uses a few different methods to figure out the waypoint is closest and in view to his target as well as his next target waypoint. With this method, you can have a very sparse amount of waypoints in your world which is less work. BUT, if you have a ton of waypoints with this method, it will get slow cause the AI has to make lists off the waypoints and organize those lists. Navigational mesh navigation is completely infinite and has very little effect on framerate. It works on collision, so no lists have to be made or organized. BUT, the AI's target has to be colliding with a waypoint for him to pinpoint his goal waypoint. For this to happen you need solid waypoints everywhere to have completely accurate pathfinding. Basically your waypoints have to make one solid mesh, which is of course called "Navigational Mesh". I am in the process of tidying up all the scripts for the next submission. And i am actually uploading new videos of a full runthrough of the mini game(Which is far different then the one you have played).
     
  19. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    I think that navmesh would be most usefull for most developers, so its good to see you developing it.
    I hope that are planning to create collider hit detections system too and maybe ability to give AI orders for formations.
     
  20. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Run through of the latest version of the mini game. The latest version will be posted soon.


     
  21. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
  22. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    YES! - heading to Asset Store right now!

    First Purchase goes to ME! :)
     
  23. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Well thank you. :)
     
  24. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    With the release on the asset store. The mini game Protect The Crystal has been updated. For those of you who tried the earlier versions of this game, be prepared. The game and AI function far better now. With a completely new pathfinding system and all the major bugs fixed.

    PURCHASE ON THE ASSET STORE http://u3d.as/content/brilliant-game-studios/advanced-fantasy-ai-pack/2Qt

    PC GAMERS PLAY PROTECT CRYSTAL FOR WINDOWS(ENHANCED GRAPHICS AND GREATER CHALLENGE WITH MORE ENEMY AI) http://dl.dropbox.com/u/65183439/Protect The Crystal(Windows Exclusive).zip

    OR TRY PROTECT THE CRYSTAL ON WEB PLAYER
    http://dl.dropbox.com/u/65183439/WebPlayer.html
     
  25. dabrow

    dabrow

    Joined:
    Nov 15, 2010
    Posts:
    22
    Can I make Navigational mesh for your AI with Unity NavMesh solution or must place waypoints by hand.
    But your solution is just perfect.
     
  26. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    At the moment, hand placed. In the future I would like to make it compatible with unity nav mesh, and also design my own mesh generator system. :)
     
  27. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    For those of you who have purchased the Fantasy AI Pack. Thank you so much. I would love to hear your feedback, and see what you have done with it!
     
  28. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    finally!! time to spend some bucks :)
     
  29. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thank you sir.
     
  30. dabrow

    dabrow

    Joined:
    Nov 15, 2010
    Posts:
    22
    Yes there are lot of god stuff in this package.
    But I can't find more tutorials.
    Can you make video tutorial on how to setup navmesh that you have in your demo scene please !
    How did you do it prakticaly and the conections .
     
  31. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    More tutorials are coming soon! Just as soon as I find the time. :)
     
  32. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    With the first version released on the Asset store, I would like to announce that I will be working on the next update shortly. Please post your requests for the next update on this thread! I want to make as many people happy as possible. Even if it seems ridiculous, I still would love to hear it! For those wanting to purchase this package! http://u3d.as/content/brilliant-game-studios/advanced-fantasy-ai-pack/2Qt
     
  33. alfogator

    alfogator

    Joined:
    Dec 26, 2010
    Posts:
    5
    I bought the package and spent the best part of yesterday and today working with it.

    The linked tutorial was simple enough to set up. But that's all the documentation I could find and that covers a very small portion of the included scripts and their properties.

    Do you have any other documentation available?

    I tried to study the source code to understand how things work but of course that's not the best solution, also I found some odd behaviors that might be bugs: I was able to fix a few by changing the code but without documentation I'm not even sure I was doing the right thing in first place.
     
  34. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    More documentation is coming very soon! I apologize for any inconvenience. Just been a very busy week. Today I plan to make a few new tutorials. Send me a message on the bugs and I can get to work on them! :)
     
  35. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    I have already made some very important updates to the current tutorials. One important step when setting up your character which I forgot to add is, the AI EYE. Its the transform where the raycast comes out for his vision. Its possible the buggy behavor you were getting may have been from this if you missed this step. If the AI EYE transform hasn't been set, then your raycasts could be coming from his feet for all you know. So even small obstructions like rocks and chairs would obstruct his vision. As well, I am working on a very large tutorial covering all of the functions in AI panel, and what they do. Hope this all helps!


     
  36. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Works good for me, I noticed the AI EYE piece too - it'd be nice if you could support a few prefabbed "vision" pieces for these mobs, I'm sure most people's needs would be captured with cone, sphere or a thick linecast. Maybe add in the option to allow for layers to "block" the vision or at least a callback method we can hook into to confirm if there is a valid line of sight.
     
  37. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    For sure! Something to add to the list for the next update! So many things to keep track off. Almost wish I had a team for this. More feedback from anyone would be appreciated!
     
  38. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    And "Viewob"(View obstructed) tells you if the AI can see his current enemy or not.
     
  39. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    If you need it, I can setup JIRA for you to help out - using it on my own project too.
     
  40. pspdude

    pspdude

    Joined:
    Dec 17, 2011
    Posts:
    43
    I went into the asset store and was just about to buy it, then I realized it needs 3.5 >.<. That's when I got sad, since every time I upgrade my project to 3.5 everything goes from good to horrible.
     
  41. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    That is sad! You should try to figure that out. You are missing out not having 3.5!
     
  42. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    pspdude: Yes, you should work out what the issue is with upgrading to 3.5. This shouldn't do horrible things to your project. Moreover, iirc, that note on the Asset Store re: requiring the version required is cautionary. It is, iirc, a note of the version that uploaded the package. This means the OP uploaded the package and it was tested in 3.5. You may find that it will work in earlier versions, but you are working at your own risk.

    Best would be to troubleshoot the upgrade issue.

    Post a thread in support detailing the steps you have taken and the problems you are encountering, and then PM the link to the public thread.
     
  43. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
  44. CrashKonijn

    CrashKonijn

    Joined:
    Mar 4, 2010
    Posts:
    245
    I like the design, but maybe a brain would be more appropriate ;-)
     
  45. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    I have a feature request that would be very interesting for certain styles of gameplay:

    I would like to see the AI using a complex sensory system, so the player can use the shadows to avoid being seen, move slowly to avoid being heard and be careful with the wind direction to avoid being smelled. If we had a system like that, it would be possible to define some creatures with a very good sight, while other creatures will use the hear or smell senses to detect the player. I understand this feature could be outside of the original scope of the project, but I think it would be a really cool feature... if you don't plan to implement it, would you place a "hook" that could be used to integrate with your AI a sensory system like that?
     
  46. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Thank you for the request. I will definitely keep those things in mind.
     
  47. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Hah, well putting a brain instead of a shield wouldnt give it much fantasy element now would it. ;)
     
  48. blurededge

    blurededge

    Joined:
    Mar 14, 2012
    Posts:
    255
    You could always paint the brain on the shield in the style of a heraldic crest. In traditional heraldry, when a crest animal is standing in an attacking position it is referred to as being in the "rampant" position. That seems rather appropriate for this product. Maybe call it the "Rampant Brain AI" ;)

    All fun aside, as much as I want to buy this product, I'm going to have to put it off for the time being. I simply do not have two days in my current schedule to devote to figuring out this complex of a product and left still wondering if I am doing things right or not. I will be buying it, it looks great and I can see a ton of uses for it in my production pipeline. I vote for you to put out some very solid documentation before you add any more features (a request I made in this thread before). Make sure your users understand and can use what you've already created before adding more to it.

    This really cuts to the heart of a problem I find with many code based products on the asset store. It's driven by human nature really. We tend to focus exclusively on things we're good at. Since code products are created by great coders rather than technical writers or product managers, they tend to be powerful , but poorly documented; sometimes virtually undocumented. The coder seems to assume in many cases, that if it makes sense to him, it will be completely obvious to everyone else as well. Of course, the rub is, it's not. If coders spent one quarter of the time creating documentation of the product that they spent creating it, this problem would be a thing of the past (and a lot more people would be willing to buy and use code products!)

    So there I am. If you can put out some good documentation that could cut the learning curve down to say, half a day, I'd purchase it the second they were out. Otherwise, I'm going to have to put it off until I get a break in my schedule and can devote the time to understand this and then figure out how it integrate it into my products. (If you haven't already divined it, this is really me begging you for some good docs so I can by this cool product you've created!). Cheers!
     
  49. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Blurededge. Do not worry! Tons more documentation is coming! Its really tough and takes lots of time to create enough documentation to cover everything in a short time. I run a recording studio as well so I have plenty on my plate. But this is why I included AI characters that are fully rigged, you can literally drag and drop them into your scene. I'm not sure how much more simple things can get. As well you can look at all the settings on the rigged characters to get an idea of what does what. I also include several example scenes and a fully function, fun to play game, that demonstrates how the AI can be controlled with simple code, or even simply checking off a few settings in the editor. Trust me, I have almost put more time into figuring out how to make this as simple as possible to use, than the actual code itself. The total amount of hours put into this is well over 500 hours I'm sure. This product is worth far more then its priced I can assure you. I did expect some confusion at first, but I'm not a psychologist, I have released it so I can find out where most of the confusion is and do my very best answer everyones questions and make all the documentation necessary. Hope this helps, I apologize things appear so confusing.
    Kind regards, Robert Weaver, Brilliant Game Studios.
     
  50. blurededge

    blurededge

    Joined:
    Mar 14, 2012
    Posts:
    255
    Robert:

    Thanks for that, good to know the docs are on the way. I more than understand having a lot of irons in the fire and therefore never enough time to work on personal projects! It's not so much that things seem so confusing as it is a slower process to dissect example scenes and glean what everything does from them than it is to just read docs which explicitly state this info. I don't debate in the slightest the number of hours you've put into this project or the fact that is more than worth the money you're asking for it.

    All the above being as it is, I just bought the AI, :D Mainly because I really want it and think it will be very useful to me in the future (I've been excited about this product since I first saw this thread), but also because I want you to get some early sales in so the project continues to be worth your while to work on and improve. I should have a little time to play with it come Friday. If I have any questions, I know where to send them. Once I've tested it I'll post a review in the asset store. I hope everyone else does the same as those reviews seem to do a lot to help the sales of asset store products.

    Cheers!