Giter VIP home page Giter VIP logo

coopertivepathfinding's Introduction

Cooperative Pathfinding in Unity (C#)

This program implements cooperative pathfinding as proposed by David Silver here.

The cooperation between agents is substituted by a system for predicting the path of nearby obstacles.

The result is agent movement that takes the future obstacle positions into account.

Getting Started

If you're just interested in the code you'll find all the classes here.

I have made the program in Unity 3D game engine, because it allowed me to test my implementation easier.

If you wish to try it out yourself you may take the classes and refactor them a bit to work in your environment, or you can open the project with Unity. The easiest way to do so would be so go to the CooperativePathfinding/Assets/Scenes/Testing folder and run TestScene with Unity.

Then pressing the play button at the top-center of the window is all you need to do to test it.

To make a custom level you can supply a .txt file to the Grid gameobject. And you can also try the local avoidance implementation by toggling isLocalAvoidance in the Manager gameobject.

This is a comparison between using local avoidance (upper scene) and cooperative pathfinding (lower scene):

Prerequisites

The Unity version I was using is 2018.3.6f1 Personal, but I used mostly basic things so I think it should work in most of the newer versions.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.