permafrost-engine is a free, open source gaming project written in C and released under GPL-3.0. It has 2,768 GitHub stars, 121 forks and 3 open issues, and was last pushed 16 days ago. On this registry it ranks #44 of 64 tracked projects in Gaming, with 5 head-to-head comparisons available.

What is permafrost-engine?

Permafrost Engine is an open-source, GPL-3.0-licensed Real Time Strategy game engine written in C on an OpenGL 3.3 programmable pipeline, aimed at developers who want to build classic-style RTS games without assembling rendering, pathfinding and RTS mechanics from scratch.

What it is

Permafrost Engine is a 3D game engine built specifically for the real-time strategy genre, written in C and rendering through an OpenGL 3.3 programmable pipeline, with more modern extensions used where the hardware makes them available. It is explicitly made in the image of the old RTS classics while incorporating modern ideas, and it lives in the C and OpenGL game development ecosystem with a scripting layer that exposes engine internals to Python 2.7. The project is developed alongside EVERGLORY, its flagship game, which is available as a free demo on Steam, and the demo is distributed together with all the scripts powering the gameplay so they can be studied and modified.

The concrete problem it solves is the sheer breadth of systems an RTS needs before it becomes playable. Rather than writing a renderer, a pathfinder, a fog-of-war system and a selection and combat layer before the first unit can move, a developer starts from an engine that already implements these. It replaces the bespoke, project-specific engine work that would otherwise sit between a studio and its gameplay design, and it also supplies the surrounding tooling: a map and scene editor, a custom text model format for interoperability with external tools alongside a baked binary format for fast runtime loading, and a tile-based map with its own file format.

Key capabilities

  • OpenGL 3.3 rendering with a Phong reflection model and materials, directional light shadow mapping, bump, normal and parallax mapping, water rendering with reflection, refraction and soft edge effects, and a skybox.
  • Hierarchical flow field pathfinding across navigation layers for land, water and air units, with handling of dynamic obstacles, formation-based unit movement, and optimal formation re-shuffling using the Hungarian Algorithm.
  • Dynamic collision avoidance for multiple entities via Hybrid Reciprocal Velocity Obstacles and the ClearPath algorithm, alongside GPU-based crowd simulation using compute shaders.
  • Engine internals exposed to Python 2.7, including an embedded interactive Python console, an event system, and serialization of the entire interpreter state so that any engine session can be saved and restored.
  • RTS systems including fog of war, a minimap, RTS-style unit selection, unit combat, base-building, resource gathering and transporting, garrison and transport mechanics, and configurable automation of workers and production.
  • Procedural content generation: programmatic synthesis of textures using the Image Quilting algorithm and aperiodic tiling of the map plane using the Wang Tiling algorithm.
  • Performance-oriented internals such as distance-based mesh LOD, billboarding for large numbers of distant entities, dynamic batched rendering, ringbuffer-based streaming of data to the GPU, and a multithreaded two-stage simulation and rendering pipeline.

Who uses it and how

  • Studios building a classic-style RTS, where EVERGLORY serves as the reference implementation and the free Steam demo doubles as a working sample of the gameplay scripting layer.
  • Gameplay programmers who want to iterate in Python 2.7 against exposed engine internals and an embedded console rather than recompiling C for every change.
  • Designers working with the built-in map and scene editor and the pause and resume system to construct and test tile-based maps.
  • Teams handling large engagements, who rely on the batched animation pose data, GPU crowd simulation and parallelised pathfinding to keep many animated entities moving at once.

Getting started

The supplied facts do not document a package name, Docker image, compose file or hosted build option; the documented entry point is the free EVERGLORY demo on Steam, which ships with all the scripts powering the gameplay so they can be read and modified. Anyone needing build instructions should consult the repository README directly.

How it compares

The facts provided name no paid products that this project replaces and no comparable engines, so no direct contrast can be drawn. Within this registry it stands alone as an RTS-specific engine.

When to use it — and when not to

This is a strong fit for a team that wants classic RTS mechanics and a modern OpenGL renderer already in place, and is comfortable working in C with an OpenGL 3.3-capable target. It is a poor fit for teams standardised on Python 3, since the scripting layer is Python 2.7, and for anyone who cannot accept the GPL-3.0 copyleft terms for a derivative work. The absence of documented installation or packaging steps in the available material also means a new user should expect to dig through the repository before getting a build running.

project readme (upstream, from github) — read inline

Support the Development - Wishlist EVERGLORY on Steam

Logo

Permafrost Engine is an OpenGL 3.3 Real Time Strategy game engine written in C. It is made in the image of old classics, but incorporating some modern ideas.

Engine Showcase

everglory-banner

EVERGLORY is the flagship game developed using Permafrost Engine.

Download the free demo on Steam. With the demo you also get access to all the scripts powering the gameplay to learn from and modify as you wish.

screenshot-01 screenshot-02 screenshot-03 screenshot-04 screenshot-05 screenshot-06 screenshot-07 screenshot-08 screenshot-09 screenshot-10 screenshot-11 screenshot-12 screenshot-13 screenshot-14 screenshot-15 screenshot-16

Engine Summary

  • OpenGL 3.3 programmable pipeline (more modern extensions used where available)
  • Custom text model format for interoperability with tools; baked binary format for fast runtime loading
  • Skeletal animation with GPU skinning
  • Batching of animation pose data to a texture for performant rendering of large numbers of animated entities
  • Phong reflection model with materials
  • Directional light shadow mapping
  • Bump mapping, normal mapping, parallax mapping
  • Terrain texture splatting
  • Skybox
  • Distance-based mesh level-of-detal (LOD) rendering
  • Billboarding for efficient rendering of huge numbers of distant entities
  • Batched rendering with dynamic batches
  • Ringbuffer-based streaming of data to GPU
  • RTS camera, FPS camera
  • Rendering of tile-based map with custom file format
  • Water rendering (including reflection, refraction, soft edge effects)
  • Programmatic synthesis of textures using the Image Quilting algorithm
  • Aperiodic tiling of the map plane using the Wang Tiling algorithm
  • Engine internals exposed to Python 2.7 for scripting
  • Embedded interactive Python console
  • Event system
  • UI framework (Nuklear-based)
  • Efficient raycasting
  • Map/Scene editor
  • Pause/Resume system
  • Fast rendering of huge maps
  • Map navigation graph/grid generation
  • Implementation of 'boids' steering/flocking behaviours
  • Hierarchial flow field pathfinding
  • Handling of dynamic obstacles in pathfinding
  • Dynamic collision avoidance of multiple entities using Hybrid Reciprocal Velocity Obstacles and the ClearPath algorithm
  • Formation-based unit movement and placement
  • Optimal formation re-shuffling using the Hungarian Algorithm
  • Pathfinding of different kinds/sizes of units (using "navigation layers")
  • Pathfinding of Land, Water, and Air units
  • Movement and pathfinding computations accelerated with parallelism
  • GPU-based crowd simulation with compute shaders
  • Efficient spatial indexing using a SIMD-accelerated bitmap grid
  • Efficient real-time tracking of entity membership to dynamic spatial regions
  • Audio system supporting positional effects and multiple channels of global effects
  • RTS minimap
  • RTS-style unit selection
  • RTS unit combat system
  • RTS fog-of-war system
  • RTS base-building mechanics
  • Configurable automation of workers and production
  • RTS resource gathering (and transporting) mechanics
  • RTS unit garrison and transport mechanics
  • Ranged combat using an efficient projectile physics simulation
  • Support for different resolutions and aspect ratios
  • Configurable graphics settings
  • Serialization and deserialization of the entire Python interpreter state
  • Saving and restoring of any engine session, including all Python-defined state
  • Multithreaded: simulation and rendering in a 2-stage pipeline
  • Advanced debug visualizations and profiling instrumentatation
  • Lightweight memory accounting for realtime tracking of allocations
  • Fiber system for putting work in lightweight tasks that are scheduled in userspace
  • Fiber-backed Python tasks, allowing cooperative multitasking logic in Python
  • Zero-copy forking of state using page-level Copy-on-Write semantics
  • Cross-platform (Linux and Windows)
  • Windows launcher to automatically capture a minidump and stdout, stderr logs on application error

Dependencies

  • SDL2 2.30.0
  • GLEW 2.3.1
  • python 2.7.17
  • openal-soft 1.21.1
  • mi-malloc 2.2.3
  • stb_image.h, stb_image_resize.h
  • khash.h
  • nuklear.h

All dependencies can be built from source and distributed along with the game binary if desired. Python is built with a subset of the default modules and packaged with a trimmed-down stdlib.

Building Permafrost Engine

For Linux
  1. git clone https://github.com/eduard-permyakov/permafrost-engine.git
  2. cd permafrost-engine
  3. make deps (to build the shared library dependencies to ./lib)
  4. make pf

Now you can invoke make run to launch the demo or make run_editor to launch the map editor. Optionally, invoke make launchers to create the ./demo and ./editor binaries which don't require any arguments.

For Windows

The source code can be built using the mingw-w64 cross-compilation toolchain (http://mingw-w64.org/doku.php) using largely the same steps as for Linux. Passing PLAT=WINDOWS to the make environment is the only required change.

The compliation can either be done on a Linux host, or natively on Windows using MSYS2 (https://www.msys2.org/).

  1. git clone https://github.com/eduard-permyakov/permafrost-engine.git
  2. cd permafrost-engine
  3. make deps PLAT=WINDOWS
  4. make pf PLAT=WINDOWS
  5. make launchers PLAT=WINDOWS

Alternatively, a Visual Studio 2022 solution file is provided in the root directory of the project.

Devlog

Follow the development of Permafrost Engine and EVERGLORY on YouTube.

Indie RTS Devlog #1: Introducing Permafrost Engine

Indie RTS Devlog #2: Saving The Python Interpreter

Indie RTS Devlog #3: Group Pathfinding

EVERGLORY: Teaser Trailer #1

Indie RTS Devlog #4: Fog of War

Indie RTS Devlog #5: Performance Optimization

Indie RTS Devlog #6: Fibers, Async Jobs

Indie RTS Devlog #7: Main Menu UI, Loading Missions

Indie RTS Devlog #8: Python Tasks + Making Pong!

Indie RTS Devlog #9: Base Building

Indie RTS Devlog #10: Demo Gameplay

Indie RTS Devlog #11: Resource Gathering, Game Design

Indie RTS Devlog #12: Crafting Units

Indie RTS Devlog #13: Large Unit Pathfinding

Indie RTS Devlog #14: Projectiles, Big Battles

EVERGLORY - Official Trailer (2021 Indie RTS)

Indie RTS Devlog #15: Unit Formations

EVERGLORY (Indie RTS Game) - Pathfinding Showcase

Indie RTS Devlog #16: Land, Water, and Air

Indie RTS Devlog #17: Economy + NEW DEMO

Indie RTS Devlog #18: Improved Map Rendering

EVERGLORY: Teaser Trailer #2 [Indie RTS Game]

EVERGLORY: Teaser Trailer #3 [Indie RTS Game]

License

The source code of Permafrost Engine is freely available under the GPLv3 license, with a special linking exception. However, I may grant permission to use parts or all of the code under a different license on a case-by-case basis. Please inquire by e-mail.

Comments/Questions

You may contact me with any questions, comments, or concerns pertaining to the source code or the underlying algorithms. In addition, you may solicit me regarding interesting job opportunities.

Discuss EVERGLORY and its' development on Discord.

My e-mail is: edward.permyakov@gmail.com

Frequently asked questions

Is permafrost-engine free to use?

permafrost-engine is open source under the GPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does permafrost-engine do?

An OpenGL RTS game engine written in C

What is permafrost-engine written in?

permafrost-engine is primarily written in C. Its source is publicly available at https://github.com/eduard-permyakov/permafrost-engine, and it has 2,768 GitHub stars.