SkiaVoxelComanche
A high-performance, CPU-based Voxel-Space rendering engine written in Delphi using Skia4Delphi. It simulates a Comanche-style helicopter flight experience over a procedurally generated voxel island at night.
Skia Voxel Comanche v 0.3
Sample video: https://youtu.be/nhMKJpLjuFs
"Despite being just ~1300 lines of code, this is a complete all-in-one voxel sandbox. Unlike most traditional voxel-space demos that only render static heightmaps, this project combines dynamic heightmap destruction, a 3D-projected particle system, and flight physics into a single monolithic engine."
✨ Features
Rendering & Performance
True Voxel-Space Raycasting: 1D heightmap lookups with a Y-Buffer for occlusion.
Unbounded Terrain: Modulo-wrapped coordinates for an infinite flight grid.
Heavy Optimizations: Trigonometry caching, dynamic Level of Detail (LOD) steps, pixel skipping in the far distance, and fast-math (multiplication instead of division).
Volumetric Fog: Distance-based color blending into a black night horizon.
World & Environment
Procedural Generation: Radial falloff island generation combined with noise and texture variations (water, sand, grass, rock).
3D Spherical Star Field: True 3D spherical projection (Azimuth/Altitude) for stars. Correctly occluded by terrain.
Night Atmosphere: Custom dark palette designed for moonlight and fog blending.
Combat & Physics
Destructible Voxel Towers: Enemy towers have HP, visually deteriorate (cracks/darkening) when damaged, and instantly collapse into rubble when destroyed. (the rockets are very cheap trash, so they not hit so often :P)
Particle System: Gravity-affected explosions spawning fire, smoke, and debris.
Helicopter Physics: Throttle-based forward speed (with inertia/damping) decoupled from independent vertical altitude control.
Helicopter Pitch: The entire world and horizon dynamically tilt based on current forward/backward velocity.
Procedural Projectiles: Side-alternating rocket fire with trajectory arcs and timed explosions.
Terrain Deformation: Rockets impacting the ground permanently deform the heightmap, creating scorched bomb craters.
Splash Damage: Destroyed towers trigger massive ground craters around their foundation. Ground craters instantly destroy any towers caught in the blast radius.
Cockpit Radar: A tactical radar overlay showing nearby towers and UFOs relative to the player's orientation.
🎮 Controls
Action Key
Turn Mouse or A / D
Throttle Up/Down + / - (or P / O)
Forward / Backward W / S (uses current throttle)
Altitude Up / Down E / Q
Fire Rockets R
🚀 How to Run
Download the repository.
Extract and run the included .exe file. (No installation required)
Alternatively, open the .pas file in Delphi and compile it yourself using the Skia4Delphi framework.
Latest Changes:
v0.3:
- Added permanent bomb craters: Rockets deform the heightmap on impact
- Added scorched earth visuals (burnt dirt/ash) inside craters
- Added Real Helicopter Pitch: Entire view tilts forward/backward on thrust
- Added Tower Splash Damage: Destroyed towers create massive craters
- Added Crater Splash Damage: Craters instantly destroy nearby towers
- Added Transparent Water Layer: Underwater craters are covered by a
separate, transparent, and wobbling water mesh.
- Added UFO Enemies: Procedural flying saucers with lasers
- Added Player Health: Taking damage drops altitude
- Added Cockpit Radar: Shows towers and UFOs in real-time
- Added Laser Projectiles for UFOs
v0.2
- Fixed Stars not showing
More game repos:
🎮 Skia4Delphi Games (each one file, no ext engine):
2D JumpnRun Platformer https://github.com/LaMitaOne/Skia_PlatformerGame
2D MegaCatling (Megaman platformer/shooter) https://github.com/LaMitaOne/Skia-MegaCatling
2D Lemmings/Worms/Portal/Touch hybrid https://github.com/LaMitaOne/SkiaLemmings
2D Side-scrolling space shooter https://github.com/LaMitaOne/SkiaStarPatrols
2D Tetris clone https://github.com/LaMitaOne/Skiatris
2D Skia Powder (Falling Sand Simulation) https://github.com/LaMitaOne/Skia-Powder
2D BombRunner (Bomberman clone) https://github.com/LaMitaOne/SkiaBombRunner
2D Skia Micro Racers https://github.com/LaMitaOne/SkiaMicroRacers
2.5D C&C style isometric rts https://github.com/LaMitaOne/Skia-RTS-Game
2.5D Isometric cat game https://github.com/LaMitaOne/Skia-A-Cats-Life
2.5D Raycasting doom base https://github.com/LaMitaOne/SkiaDoomBase
3D better go to https://github.com/castle-engine
🎮 Game components FMX:
MRX Gamepad Core https://github.com/LaMitaOne/MRX-Gamepad-Core