Building Multiplayer Games with Phoenix and Phaser
summary
Live code shows Phoenix channels and Phaser (Pixi rendering) wired over WebSockets to sync a draggable “hello world” text, then evolve into per-player GenServer processes and supervision trees so each character is a server-side process. Demos reach 60fps with many sprites but reveal a scaling fault where 500 clients flood the network using naive broadcasts; switching to broadcast_from and considering a server pulse/batch update fixes echoes and reduces messages. Several multiplayer demos (rock paper scissors, snake, dots) and code on Github ktec are provided.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 2:31Features
- 6:47Project Setup
- 8:37Hello World
- 10:16Phoenix Channels
- 13:12Send Messages
- 14:57Receive Messages
- 17:17Demo
- 18:23Supervision Trees
- 20:46Message Flow Problem
- 22:38Demos
- 26:26Future plans
related talks
40mController Control: Designing Domains for Web Applications
44mCollaborative Music with Elm and Phoenix
01h 13mKeynote: Phoenix LiveView - Interactive Apps without Javascript
21mLessons from Building a game engine from scratch in Gleam
28mState of Multiplayer Games & Current Trends
34mA conceptual future for the multi-device web
29mThe Code Behind Every Real-Time Collaboration Tool
28mLobbying with Elixir: Real-Time LiveView and OTP
