A multiplayer DOOM-like shooter implemented entirely in SQL, powered by CedarDB.

You read that right, everything is written in SQL: The renderer, the game loop, and the multiplayer sync.
This project started as a thought experiment. Could we take DuckDB DOOM and crank it up to 11? Bigger viewport, more FPS, sprites, multiplayer support, while doing everything in SQL? Turns out, we can.
Read more details about DOOMQL in this blog post.
VIEWS.UPDATE.screen view, polls your keyboard, and pushes inputs to the DB.psycopg2 installeddocker pull cedardb/cedardb:latest
docker run --rm -p 5432:5432 -e CEDAR_PASSWORD=postgres --detach cedardb/cedardb:latest
# Wait a few seconds for Cedardb to start
./server.sh
# in a second terminal window, zoom way out to have no line wraping issues
python3 pyclient.py
The client will connect as a new player, or reconnect you if you enter the same username you used previously.
W, A, S, D movementX to shootSince everyone is a DB superuser, cheating is half the fun:
-- Infinite HP
UPDATE players SET hp = 100000 WHERE id = <your_id>;
-- Delete other players' inputs
UPDATE inputs SET action = NULL WHERE player_id != <your_id>;
-- Claim all bullets as yours
UPDATE mobs SET owner = <your_id> WHERE kind = 'bullet';
Pull Requests welcome! There is a lot of unfinished work. Some ideas for improvements: Adding powerups, multiple weapons, cleaning up the sprite LOD system, a better client, AI opponents, ...
I have taken and adapted a lot of code from the excellent DuckDB DOOM Demo. It also was the original inspiration for this project.
Hacker News (1)
Python
87.8%
Shell
12.2%
A multiplayer DOOM-like shooter implemented entirely in SQL, powered by CedarDB.

You read that right, everything is written in SQL: The renderer, the game loop, and the multiplayer sync.
This project started as a thought experiment. Could we take DuckDB DOOM and crank it up to 11? Bigger viewport, more FPS, sprites, multiplayer support, while doing everything in SQL? Turns out, we can.
Read more details about DOOMQL in this blog post.
VIEWS.UPDATE.screen view, polls your keyboard, and pushes inputs to the DB.psycopg2 installeddocker pull cedardb/cedardb:latest
docker run --rm -p 5432:5432 -e CEDAR_PASSWORD=postgres --detach cedardb/cedardb:latest
# Wait a few seconds for Cedardb to start
./server.sh
# in a second terminal window, zoom way out to have no line wraping issues
python3 pyclient.py
The client will connect as a new player, or reconnect you if you enter the same username you used previously.
W, A, S, D movementX to shootSince everyone is a DB superuser, cheating is half the fun:
-- Infinite HP
UPDATE players SET hp = 100000 WHERE id = <your_id>;
-- Delete other players' inputs
UPDATE inputs SET action = NULL WHERE player_id != <your_id>;
-- Claim all bullets as yours
UPDATE mobs SET owner = <your_id> WHERE kind = 'bullet';
Pull Requests welcome! There is a lot of unfinished work. Some ideas for improvements: Adding powerups, multiple weapons, cleaning up the sprite LOD system, a better client, AI opponents, ...
I have taken and adapted a lot of code from the excellent DuckDB DOOM Demo. It also was the original inspiration for this project.
Hacker News (1)
Python
87.8%
Shell
12.2%