This repository is ~95% generated using Kilo Code with Gemini 3.0 Pro Preview, Gemini 3.0 Flash Preview, Opus 4.5 and ChatGPT 5.2.
DOOMHouse: 3D game render engine in pure ClickHouse SQL
DOOMHouse is an experimental "Doom-like" 3D game rendering engine that offloads all the rendering logic entirely to a ClickHouse database.
This project serves multiple purposes:
- As a playground for exeprimenting with agentic coding, using frontier models to solve highly complex and non-trivial tasks.
- As a proof-of-concept, demonstrating that modern analytical databases like ClickHouse are powerful enough to handle complex, non-traditional computational tasks — specifically real-time 3D graphics generation.
- As a fun way to learn about and experiment with advanced ClickHouse concepts.
The core graphics logic — including collision detection, raycasting, texture mapping, and shading — is executed via SQL queries, while a lightweight Python client handles user input and displays the resulting frames.
The engine supports different visual styles through SQL-based rendering logic. Examples:
| Theme 1 | Theme 2 |
|---|---|
![]() |
![]() |
- Python 3.11 or later
- ClickHouse Server 26.1.1.562 or later (Local or Remote)
OBS: Due to an issue with some newer versions of ClickHouse this program only supports ClickHosue version 26.1.1.562 or later.
If you don't have ClickHouse installed, you can run it easily using Docker or install it directly on your system.
docker run -d --name clickhouse-server -p 8123:8123 -p 9000:9000 --ulimit nofile=262144:262144 clickhouse/clickhouse-serverFor macOS (using Homebrew):
brew install clickhouse
brew services start clickhouseFor macOS or Linux:
curl https://clickhouse.com/ | sh
./clickhouse serverInstall the required libraries using pip:
pip install -r requirements.txtThe project depends on:
clickhouse-connect: Database connectorPillow: Image processing and texture loadingpython-dotenv: Environment variable management
If you already have a ClickHouse server running or need to change the default connection settings, modify the .env file in the project root:
CLICKHOUSE_HOST=localhost
CLICKHOUSE_PORT=8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASS=to the specifc connection settings needed to connect to the server.
- Ensure your ClickHouse server is running.
- Run the main Python script:
python src/DOOMHouse.py
| Key | Action |
|---|---|
| ↑ / W | Move Forward |
| ↓ / S | Move Backward |
| ← / A | Rotate Left |
| → / D | Rotate Right |
| T | Switch theme |
| Esc | Exit |
This project is amongst other inspired by:


