[RELEASED]Node AI - Pathfinding and AI for procedurally generated games and more!

Hi everyone, I am very excited to announce the release of my new AI and path finding asset: Node AI! What is node AI and who is it for? Node AI is in my (totally biased) opinion the BEST AI and path finding solution available on the asset store for procedurally generated games. As a matter of fact, the path finding is as accurate as navmesh solutions if nodes are set up properly!

Asset Store Link:

Unity Asset Store - The Best Assets for Game Making

With Node AI, you can do many things. Not only can you have complex levels, players can hide behind cover to avoid line of site, AI has adjustable reaction time, and much more.

If you are making a game with procedurally generated levels, or if you just want to write your AI once and have it work in any situation, Node AI is for you!

If you have any questions about Node AI, feel free to ask! Thank you for checking out my asset, I hope you like it!

Store Blurb:

Unity 5 Ready!
Works with free and pro versions of Unity!
Demos and guide at bottom of description

Node AI is advanced Path finding without the need for a navmesh or baking of any kind!

A.I.s can follow routes and track players through complex levels with perfect accuracy!

Built with procedurally generated games in mind, but powerful enough for any situation, node AI is the pathfinding solution you have been waiting for. Why spend time converting code back and forth when you could simplify your A.I. and use a solution that will be flexible in any situation!

Easy to use! No need to write any code. AI Agents have tons of easy to understand options available right in the inspector! And if you want to code, the scripts are packed with comments and written in a way to be as easily understandable as possible.

Features:

-AI agents can wander, follow waypoints/patrol, guard/stand ground or chase a target.

-AI features dynamic reaction time, complete with on screen indicator. Perfect for stealth games!

-AI agents can alert other agents to chase player!

-AI features a sophisticated routine for finding players. If an agent can’t see a player directly, it can follow a players trail, or investigate the players last known location.

-Agents can take damage, and attack player!

-includes bonus animation script with a basic setup for Mecanim compatible models!

-Setting up nodes couldn’t be simpler. simply drag them into your scene, arrange them in a way that suites your level, and that’s it. Node AI takes care of the rest!

-Nodes can be stored in prefabs allowing for ultra flexible and dynamic scenes!

-Easy to use visualization tools!

-Highly optimized performance!

-Easy integration with UFPS! Detailed setup instructions included.

The best way to see what Node AI is capable of is to test it out yourself! Check out these demos:

Complex maze pathfinding (included in package):

https://dl.dropboxusercontent.com/s/j7ippa9x1g7gawp/nodeDemo.html

Playable Demo 1 (included in package):

https://dl.dropboxusercontent.com/s/zvmn8vkfm84r075/wanderDemo.html

Playable demo 2 (included in package):

https://dl.dropboxusercontent.com/s/2kzhmjy388ehqzg/miscDemo.html

Procedurally generated level demo featuring level generation by Dungen (sold separately! This scene is NOT included with Node A.I.!):
https://dl.dropboxusercontent.com/s/ahhmt8770c04fm9/proceduralDemo.html

Have more questions? Check out the 27 page PDF guide:

Video tutorials coming soon!

Thanks again for checking out Node AI!

1 Like

Hi,

Can this do A* like pathfinding ? Does it support heigh and dynamic obstacle handling ?

Also do i have to add nodes manually based on the areas in the game ? Is that automated in any way ? If not automated, how does it work in a procedurally created / changing environment that has not go any nodes setup?

I have also noticed that cliking sometimes make the hero go the opposite way of the clicked area and then start moving correctly. Can this be avoided ?

Thanks

I am not super familiar with A*, but Node AI does support height and should support dynamic obstacles.

For height, if your paths are indoor/have walls everything works perfectly. You can adjust how steep an incline your agent can climb.

Here is an example from a personal project that I use Node AI with:

If you have open paths with no walls, you might need to setup invisible walls/colliders depending on the scene. I will make a demo soon, and will prioritize a slicker implementation with the next update. But short answer, yes Height is totally supported.

Dynamic/moving obstacles should be fine in most cases, but to be honest I haven’t done many tests with moving obstacles, so thanks for the question! Do you have a specific situation in mind? If dynamic obstacles are a big part of your project you might want to hold off until I do some tests… maybe if a moving object parked on a node it could be a issue… I will do some tests and build a demo. Dynamic obstacles will be a major priority for the next update as well :slight_smile:

You have to set up nodes manually. So for instance, most procedural level generation tools use tile rooms, so you would just set up the nodes in the tile prefab, like this:

If you were to procedurally place obstacles in those tiles, you would need to make sure you placed nodes around the obstacle so a path could still be created. I will create an example soon.

You could write a script to place nodes in your scene, and then build the node graph again. That is a bit more complex, but it is doable. I don’t know that I will ever support this out of the box because it is very dependent on the scene/situation, but I will look into building a simple example to show how it could be done.

Yes! The reason this happens is because I wanted to minimize the amount of nodes used in the scene for loading/performance reasons on the web. The reason this is happening is because when you change the agents destination the agent looks for the closest node with the shortest path to the target, and if you are using a sparse node graph sometimes that node might be behind the agent, or off to the side.

For Enemy agents, it usually makes sense to use a sparser node graph because the odd time this happens really doesn’t affect much, and the agent will always find his path.

But for a player character using node AI pathfinding, that could look a little weird. So the solution is to simply use more nodes. if you used a node graph like this:

That should fix the issue. But it could also increase load times, so it kind of depends on your scene and what you need.

Thanks for the great questions! I will definitely follow up this post with some more examples very soon.

How can you promote this asset as “the BEST AI and path finding solution available on the asset store for procedurally generated games” when your asset requires manual setup? The assumption that most proc gen games use prefab rooms is a bit naive, and makes your claims misleading to those that don’t use tile-based techniques.

1 Like

Fair enough! but when I said “best” I prefaced it with “in my (totally biased) opinion” :slight_smile:

I will work on making a demo that spawns nodes and doesn’t use rooms/tiles. It is completely doable, but definitely not the focus of 1.0.

One thing I should mention, is that you don’t even really need to use nodes if you have a really open type of level. If you had an arena style level, or open terrain with trees, rocks, and other simple obstacles nodes wouldn’t be necessary. I describe this a bit in the manual. In the near future I’ll have videos and more demos to showcase all of this stuff.

Check out this demo:

https://dl.dropboxusercontent.com/s/zvmn8vkfm84r075/wanderDemo.html

This demo doesn’t use any nodes at all, all you would need to do is drop the agents in. No manual setup whatsoever for the pathfinding, but as you can see the level layout is simpler then some of the other demos.

Thanks for your feedback, I appreciate it!

Thanks for clarifying

For anyone curious I put together a super simple scene with moving objects. Path finding seems to work fine. Needs polish for sure, but you can try it out here:

https://dl.dropboxusercontent.com/s/jhvrs9rrs7oau48/movingObjectsDemo.html

Would this work with 2D?

Is this just for shooters or is melee available as well?

Also can it be setup with like people working in a village or zombies eating brains and when they see or hear you they start to chase you?

3D only for now.

You can easily setup Node AI to do shooter or melee style attacks. There are settings called “stop distance low” and “stop distance high” and for a shooter you would set them to something like 4 and 8, and the agent would stop 4-8 units away from the player to attack.

For melee, you would set both of these to 0.5 or 1 (or whatever suites your game) so the agent only attacks when up close.

Yes absolutely! For people working in a village you could set up wayPoints for them to patrol, and Node AI lets you define how long Agents wait at wayPoints. So you could have a Villager at a work table for 10 seconds, then move to a storage bin for 5 seconds, or whatever you want really :slight_smile:

For the Zombies, you could set them to guard mode (guard mode just means they are standing still in one place until they see/hear the player) and have a brain eating animation playing.

Node AI has adjustable reaction time, so you could set up how smart/how good of vision your zombies have. They could see the player and chase right away, or it could take a second or two to allow the player to hide. Its up to you!

To make the zombie “hear” the player is pretty simple. You just need to send a “wakeUp” message to the zombies you want to start chasing the player. This involves a bit of code, but Its pretty easy and if you need help I’d be more then happy to show you how.

One other cool thing is that if a zombie is chasing your player, it can alert other zombies to start chasing the player as well.

Hope that answers your questions! If you have more, feel free to ask. Thanks for checking out Node AI!

Hi, I wanted to let everyone know I just finished a couple of tutorial videos. These cover the very basic things Node AI can do. In the near future I’ll post more videos covering more advanced topics. If anyone has anything they would like me to cover please let me know!

Here is a link to the playlist:

And here is the first video:

Thanks

Hi Curtis,

The package looks interesting. You haven’t made any mention of performance (beyond saying its ‘highly optimized’), do you have any concrete numbers or comparisons and how would this fair for mobile use?

– Z

Hello,

In my game I have a ship constantly moving on water meaning its x, y, z position and rotation are always in flux.

I would like to have the ai crew be able to move about the ship while it’s moving.

I am wondering if your pathfinding solution is able to accomplish this? I assume it means modifying path finding at runtime in a reasonable way but any waypoint pathfinders that I have looked at so far don’t seem to be capable of that.

Any help would be much appreciated, thanks!

Hi Zapgun,

I just ran a couple of tests on my LG G3 phone. I basically ported over this demo:

https://dl.dropboxusercontent.com/s/zvmn8vkfm84r075/wanderDemo.html

I zoomed the camera all the way out so you can see the entire level, and removed the player character. With 20 high poly animated characters on screen at once, I was getting around 20 fps. When I removed the animated models and replaced them with simple markers, I was getting 50+ fps, often 60.

If anyone is interested I could create a more polished mobile demo and upload the .apk.

Thanks for checking out Node AI, and if you have any specific questions or tests you would like me to run I’d be happy to do it.

Hmm that is a interesting question. So let me see if I get the gist of your question, basically you want to know if AI agents can move around on an object that is moving around? My tentative answer is yes, if the AI agents are children of the moving object.

So if your crew (and waypoints and nodes) were children of the ship, they should be able to move around it just fine.

But before you buy Node AI, if you could show me an example scene or give me more details I could be more certain.

I ran a basic test where I had my AI agents as children of a level, and I could move the level, rotate it, and everything works just fine. Of course if you rotate the level/ship and are using gravity the agents will fall if you tip them upside down and things like that, but other then that, I think it should work :slight_smile:

Thanks for the great question!

Hey, thanks for the reply!

Yes, my crew members are children of the ship, and I am not using gravity either so that should make it easier.

Just to clarify, my ship sails around the ocean and the crew members need to move about the ship.

Would the fact that the waypoints/nodes are moving around have any more of an effect on performance?

Hi, sorry for the late reply, I must have missed the alert.

I imagine it could have a small effect on performance if you had a ton of waypoints/nodes moving around, but I think it would be pretty minimal. I have had a couple of scenes with moving wayPoints, but it is usually one or two at most, and noticed no performance hit at all.

Not sure how I would test this, but I don’t think that moving wayPoints and nodes would be much of an issue performance wise.

No worries. Excellent, I will give it a try over the next while and I will let you know how it works!

Hi everyone, I just wanted to leave a quick update about Node AI. Version 1.1 is coming soon, and it is a HUGE update. Across the board tweaks and improvements, some of the major being:

-Greatly improved load time for scenes with lots of nodes

-advanced wayPoint options. You can use traditional patrol style time based wayPoints, or event based wayPoints with the ability to dynamically assign target wayPoints based on outside scripts. Here’s a super simplified example “if Hp < 5 targetWayPoint = healingPool”

-More modular scripts. For instance, if you don’t need advanced obstacle avoidance, you can easily disable it to save on performance.

-Step/stair climbing support and general revamp for multi-height levels.

-More demo scenes and tutorial videos

If you have any questions about Node AI please don’t hesitate to contact me. I have been getting great feedback so far, and it helps me decide what to prioritize in future updates, so the more feedback and questions the better :slight_smile:

Thanks for checking out Node AI!

edit: if you are having long load times and don’t want to wait for the update, send me a message and I can send it you right away.