Castor is a modular, pseudo-3D game engine written in C, purpose-built for creating retro-style first-person experiences reminiscent of Doom and Wolfenstein 3D. It handles rendering, AI, audio, UI, and asset management from scratch — no external game engine required.
This monorepo contains the full engine source code, supporting tools, and a playable demo that showcases Castor’s capabilities.
Located in: engine/
Features:
- 🧭 Raycasting renderer for walls, floors, ceilings, and sprites
- 👾 Enemy AI with patrol, chase, and attack states
- 🧰 UI toolkit: buttons, sliders, toasts
- 🔊 Audio system powered by SDL_mixer
- 🧃 Asset loader using
.listfiles for textures and sprites - 🧼 Utility library with memory-safe strings, file I/O, and math
- SDL2, SDL_image, SDL_ttf, SDL_mixer
.
├── engine/ # Castor engine source code
├── demo/ # Game demo built with Castor
├── builder/ # CLI level builder tool
├── assets/ # Shared textures, sounds, fonts
├── deps/ # Third-party libraries (SDL, Raylib, etc.)
├── dist/ # Packaged binaries for distribution
├── docs/ # Developer notes and architecture
└── README.md # This file
cd engine
make all- Produces a
build/castorbinary - Requires a C compiler and SDL2 development headers
- SDL dependencies can be pulled from
deps/if needed
Located in: demo/
A sample game built entirely using Castor to demonstrate:
- 2.5D rendering
- Combat system
- Enemy AI
- UI and inventory prototyping
cd demo
make all
./eidolonLocated in: builder/
This CLI tool:
- Creates new level files
- Edits existing level files
cd builder
make all
./lvl -r 16 -c 16 --scale 50 -o 1.lvlAssets are organized via .list files for reproducibility and automation.
Example textures.list:
wall_brick.png
wall_mossy.png
floor_tile.png
- Assets are index-based for faster lookup
- Sounds support WAV/OGG
- Fonts auto-scaled at runtime
- Sprite metadata includes animation info
Currently closed-source for private development and research. For collaboration or licensing inquiries, contact the author.