The Trials and Tribulations of LiveView RPG Development
HTML-код
- Опубликовано: 16 янв 2025
- ElixirConf US 2024 - Chris Ertel
2024.elixircon...
Elixir and Phoenix LiveView give us everything we need to make games in the browser-but sometimes, things get weird. This talk is about when things get weird.
This talk is a journey through a many-month quest to build a 2D RPG using LiveView. It covers adventures in rendering a world using performant SVGs, diversions in sandboxing for implementing a magic system, NPC dialog with LLMs, and various other oddities.
SVGWorld: Moving beyond chat servers in Elixir
Description of the major functionality of the game
Rendering the world in SVGs
Cell architecture and portals
Casting spells
Basic physics
Pathfinding
Peril the First: Rendering the world
SVGs are weird (mouse event story)
SVG performance hacks
use trick
attempt at client-side animation
Peril the Second: Making magic
The Idea For Spells
The Cruel Jagged Reality of Sandboxing Elixir Code
Luerl to the rescue? Something else?
Peril the Third: Dialog and knowledge
Chatting with NPCs
RAG and knowledge stores
Summarizing gameplay
The End of The Whole Mess
Summarize what we tried
Show what worked
Show what didn’t
Demo SVGWorld