About this project
Permafrost Engine is an OpenGL 3.3 Real Time Strategy game engine written in C. It is designed to emulate classic RTS games while incorporating modern ideas. The engine is the foundation for EVERGLORY, a flagship RTS game available on Steam with a free demo that includes access to all gameplay scripts for learning and modification.
Key features include:
- OpenGL 3.3 programmable pipeline with modern extensions where available
- Custom text model format for tool interoperability and baked binary format for fast runtime loading
- Skeletal animation with GPU skinning, batching animation pose data to a texture for efficient rendering of large numbers of animated entities
- Phong reflection model with materials, directional light shadow mapping, bump/normal/parallax mapping
- Terrain texture splatting, skybox, distance-based mesh LOD rendering, batched rendering with dynamic batches, ringbuffer-based streaming to GPU
- RTS and FPS cameras, tile-based map rendering with custom file format
- Water rendering with reflection, refraction, and soft edge effects
- Programmatic texture synthesis using Image Quilting, aperiodic tiling using Wang Tiling
- Engine internals exposed to Python 2.7 for scripting, embedded interactive Python console, event system, Nuklear-based UI framework
- Efficient raycasting, map/scene editor, pause/resume system, fast rendering of huge maps
- Map navigation graph/grid generation, boids steering/flocking, hierarchical flow field pathfinding, dynamic obstacle handling
- Dynamic collision avoidance using Hybrid Reciprocal Velocity Obstacles and ClearPath algorithm, formation-based unit movement, optimal formation re-shuffling using Hungarian Algorithm
- Pathfinding for different unit types/sizes using navigation layers, land/water/air units, parallelized movement and pathfinding computations
- GPU-based crowd simulation with compute shaders, SIMD-accelerated bitmap grid spatial indexing, real-time tracking of entity membership to dynamic spatial regions
- Audio system with positional effects and multiple global effect channels
- RTS features: minimap, unit selection, combat, fog-of-war, base-building, worker/production automation, resource gathering/transport, garrison/transport mechanics, ranged combat with projectile physics simulation
- Support for different resolutions and aspect ratios, configurable graphics settings
- Serialization/deserialization of entire Python interpreter state, saving/restoring any engine session including Python-defined state
- Multithreaded simulation and rendering in a 2-stage pipeline, advanced debug visualizations and profiling instrumentation, lightweight memory accounting
- Fiber system for lightweight tasks scheduled in userspace, fiber-backed Python tasks for cooperative multitasking, zero-copy forking using page-level Copy-on-Write semantics
- Cross-platform (Linux and Windows), Windows launcher for automatic minidump and log capture on errors
Dependencies include SDL2, GLEW, Python 2.7, OpenAL Soft, mi-malloc, stb_image, khash, and nuklear. All can be built from source and distributed with the game binary.
Building instructions are provided for Linux and Windows (using mingw-w64 or MSYS2, with a Visual Studio 2022 solution also available). The engine is licensed under GPLv3 with a special linking exception, and alternative licensing may be granted on a case-by-case basis.
Development is documented through a series of YouTube devlogs covering topics like saving the Python interpreter, group pathfinding, fog of war, performance optimization, fibers, base building, and more. The project has an active Discord community for discussion.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.