Giter VIP home page Giter VIP logo

ue4boids's Introduction

UE4Boids

This is a simple, multithreaded boid implementation based on http://www.red3d.com/cwr/boids/. During the update phase the forward vector of all boids are being adjusted and moved accordingly.

Written in UE4.23.1, StarterContent is required.

Configuration File

The executable can be configured via the following options. It's located in %appdata%\Local\Boids\Saved\Config\WindowsNoEditor\Boids.ini. The file may not exist, you can use the values below when creating it. (If the folder is missing, start the packaged executable once)

[/Script/Boids.BoidSpawner]
SpawnCount=500

[/Script/Boids.BoidManager]
AmountOfThreads=2
  • SpawnCount Amount of boids to spawn
  • AmountOfThreads The amount of threads to create and use for calculating positional updates

Classes

Boid

Implementation of a single Boid.

Settings

  • Amount of Boids to Observe Max amount of boids to take into account for next calculation
  • Forward Speed Speed at which the boid is moving
  • Turn Speed Speed at which the boid is turning
  • Close Boid Distance Cut Off Max distance for another boid to this boid to be taken into account for next calculation

BoidManager

Manages all boids available in the scene. Ticks and calls the boids move functions. Creates BoidCalculationWorker and assigns them their boids.

Settings

  • Active Should boids be updated
  • Amount Of Threads The amount of threads to create and use for calculating positional updates (BoidCalculationWorker)
  • Boids Follow Target Do boids try to reach the BoidTarget or are free to roam
  • Separation Weight Weight of Separation, see http://www.red3d.com/cwr/boids/
  • Alignment Weight Weight of Alignment, see http://www.red3d.com/cwr/boids/
  • Cohesion Weight Weight of Cohesion, see http://www.red3d.com/cwr/boids/
  • Target Weight Weight of trying to reach the target

BoidTarget

The target in the scene the boids try to reach.

BoidSpawner

Spawns boids according to its settings on BeginPlay.

Settings

  • Active Should spawn boids (boids can be added to the scene at any time)
  • Class to Spawn Boid implementation class
  • Spawn Count Amount of boids to spawn
  • Spawn Radius Radius around the spawners location to spawn boids at

BoidCalculationWorker

Calculates the rotation for its assigned boids. Boids are assigned via the BoidManager. FRunnable implementation.

ue4boids's People

Contributors

darman1136 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.