January 13, 2023 at 6:37 am #35061
First, this RAIN looks very, very nice tool. Nice job!
I’m thinking of doing a game, top down, 2D world. I’m currently trying to figure out, what parts of RAIN i can use.
1. Behaviour tree
- I’m looking for AI that tries to act based on it’s needs, hunger, pain, fear etc
- World can change, buildings can be created, thus precalculated waypoints will not work.
- AI needs to react to actions happening around it and find “interesting” entities from the world
Is there something, that is restricting the usage these in 2D?
What has to be taken in to consideration, when using 2D and not 3D world?
Is this suitable tool or do i try to fit square to circle hole here?January 13, 2023 at 8:13 am #35064
Good questions. RAIN isn’t really built for 2D. We’ve been wanting to add 2D support for some time, but just haven’t been able to get to it yet. Here are some of the difficulties:
1) 2D usually uses a different coordinate system. RAIN is build on the standard Unity 3D coordinates and makes some assumptions there in a few places.
2) RAIN doesn’t recognize 2D geometry or colliders when doing things like generating navmeshes, raycasting, etc.
3) Although you could work around these issues, you will probably need to create your own Motor and Navigator to do so.
Things that should generally work regardless of 2D/3D:
1) AI Memory
2) AI Behavior Tree
3) Entities/Aspects/Sensors that don’t do raycasting and use radius detection only.
4) Mecanim support
5) Audio support
6) Custom AI elements
On the one hand, it isn’t terribly difficult to write a 2D motor and navigator - much simpler than the 3D case - but on the other hand it does require some knowledge of RAIN. You are also free to use the HeuristicSearch class for your A* pathfinding.
If you decide to use RAIN, reach out to us directly (email@example.com) when you have questions/issues.January 13, 2023 at 2:01 pm #35070
So, i have to take a look at custom motor and navigator coding. Nice to hear, that most of the features should work out of the box.
Thanks for the answer.
You must be logged in to reply to this topic.