Skip to content

Project to get a hang of Unity while learning about compute shaders

Notifications You must be signed in to change notification settings

Clemyxy/boids-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extended Boids Simulation

Boids

This project's goal is to get a hang of Unity, while also learning about the boids (See resources for infos about them), and use them to learn about compute shaders.

Getting Started

Project made with Unity 2019.2.19f1, get it here : https://unity.com/fr. Then open the project with Unity.

How to use

This project is not a game, and doesn't have any "play mode" controls, the only way to move around the scene is going into scene mode and moving with the keys binded in your editor preferences (usually WASD).

You can also have fun with the boids behaviour by editing the Cohesion,Attraction and Seperations intensitiy/radius variables and see how the boids react.

Image Du Jeu

Two premade Scenes are available, one with 1000 boids (Warning for lower end pc configuration, may lag serverly), and one with 1000 bois in an aquarium, which keep them in one space (Even tho there still are boids leaks).

Leads

Performances

Done

  • Compute Shaders

To Consider

  • Multithreading:

    • Probably not that interesting considering that compute shaders are just a much better alternative in the case of Boids.
    • Unity may not be thread-safe outside of its job system. It could be a hassle to use multithreading.
  • Space partitioning

  • Unity ECS:

    • Adds a lot more complexity for a huge performance gain.

Resources

About Boids

Articles

(Conrad Parker) Boids Pseudocode

(Craig W. Reynolds) Boids: Background and Update

Papers

(Craig W. Reynolds) Flocks, Herds, and Schools: A Distributed Behavioral Mode

(Craig W. Reynolds) Not Bumping Into Things

Other projects that I took informations from

(Board To Bits Games) Flocking Algorithm in Unity

(Raphael "Shinao" Monnerat) Unity GPU Boids

(Sebastian Lague) Coding Adventure: Boids

Documentation

About C#

(Microsoft) Documentation

(Microsoft) Collections

###About Unity

(Unity) Scripting API

(Unity) User Manual

(Unity) Compute Buffer

(Unity) Compute Shader

(Unity) Debug

(Unity) GameObject

(Unity) MonoBehaviour

(Unity) Object

(Unity) Physics

(Unity) Quaternion

(Unity) Transform

(Unity) Vector3

About

Project to get a hang of Unity while learning about compute shaders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages