Lightweight pseudo-3D / Mode 7 renderer built with Python, Pygame, and NumPy.
SevEngine focuses on simplicity, readability, and experimentation while still achieving fast software-rendered floor projection effects similar to early racing games and retro console hardware.
Classic infinitely repeating Mode 7 floor projection.
Perfect for:
- endless racers
- vaporwave scenes
- infinite exploration
- retro-style tech demos
Optional bordered world system.
Instead of endlessly tiling the floor texture, SevEngine can generate a finite map surrounded by a configurable colored border.
This creates:
- isolated arenas
- void-style worlds
- map boundaries
- controllable playable spaces
Customize:
- border size
- border color
- finite/infinite world mode
Example:
INFINITE_WORLD = False
BORDER_SIZE = 2048
BORDER_COLOR = (0, 0, 0)Floor shading is automatically calculated based on perspective depth.
Creates:
- stronger depth perception
- atmospheric distance fade
- retro rendering aesthetic
Supports panoramic scrolling skyboxes.
Skybox movement is linked directly to camera rotation for convincing pseudo-3D movement.
Included:
main.pymain_numba.py
The Numba version significantly improves floor rendering performance by compiling the hot render loops to machine code.
- higher render resolutions
- smoother framerates
- better CPU utilization
- larger playable worlds
main.py
main_numba.py
| Key | Action |
|---|---|
| W / Up Arrow | Move Forward |
| S / Down Arrow | Move Backward |
| A / Left Arrow | Rotate Left |
| D / Right Arrow | Rotate Right |
- Python 3.10+
- Pygame
- NumPy
- Numba (optional for optimized version)
Install dependencies:
pip install pygame numpy numbapython main.pypython main_numba.pyNote:
- first startup of the Numba version may be slower due to JIT compilation
- subsequent execution becomes significantly faster
SevEngine/
│
├── assets/
│ ├── floor.jpg
│ └── skybox.jpg
│
├── screenshots/
│ ├── infinite_world.png
│ ├── finite_world.png
│ └── border_color.png
│
├── gifs/
│ ├── infinite_demo.gif
│ └── finite_demo.gif
│
├── main.py
├── main_numba.py
├── README.md
└── CHANGELOG.md
SevEngine uses:
- floor projection
- perspective depth calculation
- software rendering
- texture-space sampling
This is not raycasting.
Instead, the engine projects a textured floor plane using mathematical perspective calculations.
Finite worlds are generated procedurally:
- create oversized surface
- fill with border color
- place floor texture in center
- sample resulting texture
This avoids modifying original assets.
SevEngine v1.1 currently does not include:
- wall rendering
- collision system
- sprites/billboards
- height variation
- lighting system
- multiplayer
- audio
These are planned for future versions.
- border collision
- player hitbox radius
- improved optimization
- cleaner engine structure
- better world-space handling
- raycast walls
- billboard sprites
- elevation support
- map editor
- OpenGL renderer
- shader pipeline
- multiplayer experiments
MIT License
Built with:
- Python
- Pygame
- NumPy
- Numba
Inspired by:
- SNES Mode 7
- retro racing games
- early pseudo-3D renderers




