Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flocking Simulation with Phoenix Channels
Search
Christian Bäuerlein
April 19, 2018
Programming
1
370
Flocking Simulation with Phoenix Channels
Code can be found here:
https://github.com/fabrik42/flocking_elixir
Christian Bäuerlein
April 19, 2018
Tweet
Share
More Decks by Christian Bäuerlein
See All by Christian Bäuerlein
Single File Ruby Programs @ RubyUnconf 2023
fabrik42
0
140
Single File Ruby Programs 2.0
fabrik42
1
200
Single File Ruby Programs
fabrik42
0
250
Agile Software Development for Software Developers
fabrik42
0
47
Phoenix Live View
fabrik42
0
570
Rails API-only considerations
fabrik42
0
350
Org-Mode
fabrik42
0
510
Cleaner, scalable views with object oriented components
fabrik42
0
350
Headless Browser Experiments
fabrik42
0
380
Other Decks in Programming
See All in Programming
TypeScript LSP の今までとこれから
quramy
1
500
Development of an App for Intuitive AI Learning - Blockly Summit 2025
teba_eleven
0
110
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
510
プロダクト開発でも使おう 関数のオーバーロード
yoiwamoto
0
150
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
350
2度もゼロから書き直して、やっとブラウザでぬるぬる動くAIに辿り着いた話
tomoino
0
160
CSC307 Lecture 17
javiergs
PRO
0
110
「兵法」から見る質とスピード
ickx
0
270
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
6
1.4k
データベースコネクションプール(DBCP)の変遷と理解
fujikawa8
1
250
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
670
複数アプリケーションを育てていくための共通化戦略
irof
10
3.8k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
430
65k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
It's Worth the Effort
3n
184
28k
Docker and Python
trallard
44
3.4k
Building Adaptive Systems
keathley
43
2.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
900
GitHub's CSS Performance
jonrohan
1031
460k
For a Future-Friendly Web
brad_frost
179
9.8k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
690
Designing for humans not robots
tammielis
253
25k
Transcript
Flocking Simulation with Phoenix Channels
Flocking Theory
None
Use case: Cinematic effects
Boid: One member of a flock
* Location
* Location * Perception Radius
* Location * Perception Radius * Velocity * Heading
You Need Three Behaviours
1. Cohesion
1. Cohesion
1. Cohesion
2. Alignment
2. Alignment
2. Alignment
3. Separation
3. Separation
3. Separation ! !
3. Separation ! !
* Cohesion * Alignment * Separation = Next move
Architecture
Phoenix BoidsChannel Receives Updates Changes Settings GenServer WorldStateUpdater Calling itself
30 times per second Simulation Calculates new positions per boid based on world state <canvas> Renderer Renders updated world state Socket Connection Receives Updates Changes Settings
Demo Time!
Read on! http://harry.me/blog/2011/02/17/neat-algorithms-flocking/ http://www.red3d.com/cwr/boids/