Games & Demos powered by Dragonfly Lua scripting.
All game logic runs as Lua scripts inside Dragonfly — a modern, Redis-compatible in-memory data store. The Python clients just send EVAL and render the result. The database IS the game engine.
- Docker
- Python 3.8+
docker run -d --name dragonfly -p 6379:6379 docker.dragonflydb.io/dragonflydb/dragonflypip install -r requirements.txtA multiplayer snake game. Each player connects from a separate terminal. Dragonfly handles all game logic — movement, collisions, food spawning — in a single atomic Lua script.
# Terminal 1:
python3 examples/snake.py alice
# Terminal 2 (optional — join the same game):
python3 examples/snake.py bobControls: Arrow keys / WASD to move, Q to quit, R to respawn when dead.
Conway's Game of Life. The entire simulation (birth, death, survival) runs inside Dragonfly. The client renders the universe using braille characters for high-resolution output.
python3 examples/game_of_life.pyPress Ctrl+C to stop.
The classic DOOM PSX fire effect. Fire physics are computed inside Dragonfly and rendered with true-color ANSI output.
python3 examples/doom_fire.pyPress Ctrl+C to stop.
All examples accept optional host and port arguments:
python3 examples/snake.py alice 192.168.1.10 6379
python3 examples/game_of_life.py 192.168.1.10 6379
python3 examples/doom_fire.py 192.168.1.10 6379See LICENSE.


