News Forums RAIN General Discussion and Troubleshooting 2D topdown game with RAIN

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Katu 2 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35061

    Katu
    Participant

    Hello,

    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
    2. Pathfinding
    - World can change, buildings can be created, thus precalculated waypoints will not work.
    3. Sensors
    - 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?

    #35064

    prime
    Keymaster

    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 (support@rivaltheory.com) when you have questions/issues.

    #35070

    Katu
    Participant

    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.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.