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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Christian Bäuerlein
April 19, 2018
Programming
1
400
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
170
Single File Ruby Programs 2.0
fabrik42
1
210
Single File Ruby Programs
fabrik42
0
290
Agile Software Development for Software Developers
fabrik42
0
53
Phoenix Live View
fabrik42
0
620
Rails API-only considerations
fabrik42
0
380
Org-Mode
fabrik42
0
550
Cleaner, scalable views with object oriented components
fabrik42
0
370
Headless Browser Experiments
fabrik42
0
410
Other Decks in Programming
See All in Programming
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
AI巻き込み型コードレビューのススメ
nealle
1
280
Data-Centric Kaggle
isax1015
2
770
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
200
SourceGeneratorのススメ
htkym
0
200
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
270
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Why Our Code Smells
bkeepers
PRO
340
58k
Chasing Engaging Ingredients in Design
codingconduct
0
110
Ruling the World: When Life Gets Gamed
codingconduct
0
140
sira's awesome portfolio website redesign presentation
elsirapls
0
150
[SF Ruby Conf 2025] Rails X
palkan
1
750
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The untapped power of vector embeddings
frankvandijk
1
1.6k
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Into the Great Unknown - MozCon
thekraken
40
2.3k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
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/