Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Showcase Burst jobified 2d pathfinder (Unity 2021.3.0f1)

Discussion in 'Entity Component System' started by mmankt, Jul 24, 2022.

  1. mmankt

    mmankt

    Joined:
    Apr 29, 2015
    Posts:
    49
    Decided to do something for fun on friday evening and ported my old AS3 pathfinder used in my games (Intruder Combat Training 2x and War Heroes: France 1944) to Jobs and Burst.

    https://github.com/mmankt/BurstPathfinder/tree/release/0.1a

    Right now it's just a proof of concept and I think it works pretty fast. 1mln nodes in ~27ms/10k nodes in 0.3ms on my Ryzen 5900x.

    Very happy that burst compilation speeds up that C# code around 10 times!

    Paths might not be optimal right now on huge grid like graphs, will look into it.

    Maybe someone will find it useful and build upon it. I will be doing some more development on it in my free time to add some more needed features and real world use demos.

    Original code in action :



    Maybe some of more up to date with burst and jobs collegues will have some pointers about what I'm doing in a wrong way :)