A pixel-art isometric colony survival simulator set on the red planet. Inspirated by games like OpenTTD and Surviving Mars. Relase version soon!
Open Mars is an isometric colony-building game where you establish and grow a self-sustaining human settlement on Mars. Manage energy production, water extraction, and resource logistics across procedurally generated Martian terrain — all rendered in a retro pixel-art isometric style.
The game is currently in alpha (v1.0.0-alpha.1).
![]() |
![]() |
| Main menu with animated Martian sky | Custom world generation engine |
![]() |
![]() |
| Colony with solar panels and pipe infrastructure | Procedurally generated terrain with ice deposits |
- Procedural terrain using Perlin noise with domain warping
- Configurable roughness, elevation, and warp strength
- Ice deposit generation in natural basins
- Three map sizes: Small (64×64), Medium (128×128), Large (192×192)
- Seed-based generation for reproducible worlds
| Structure | Function |
|---|---|
| Solar Panel | Produces energy; output scales with terrain elevation |
| Pipe | Routes materials between producers and consumers |
| Ice Melter | Consumes energy to melt ice into water |
| Water Magazine | Stores and buffers water supply |
- Automatic network detection and merging on placement
- Material-type propagation (energy vs. water — no cross-contamination)
- Pipe routing across flat terrain and four valid slope orientations
- Real-time resource transfer between producers and consumers
- Tick-based resource production and consumption
- Inventory system with per-material capacity limits
- Adjustable game speed
- In-game calendar (day / month / year)
- Isometric projection with height-aware tile picking
- Painter's algorithm render ordering for correct depth
- Slope-aware tile and pipe texture selection via 4-bit mask atlas lookup
- Ice tile variant rendering
- Custom pixel-art cursor
- Binary save format with full world state serialization
- Slot-based save system
| Input | Action |
|---|---|
W / A / S / D |
Pan camera |
Mouse wheel |
Zoom (anchored to cursor) |
Right / Middle mouse button |
Drag-pan camera |
Left click |
Place / demolish structure |
ImGui toolbar |
Select tool and building type |
- C++17 compiler (MSVC / GCC / Clang)
- raylib
- Dear ImGui +
rlImGuibinding - CMake 3.16+
git clone https://github.com/AdamCofala/Open-Mars-Colonization-Simulator.git
cd open-mars
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildThe binary expects a resources/ directory alongside the executable containing the texture atlases:
resources/
├── tile_atlas.png
├── pipe_atlas.png
├── ice_atlas.png
├── cursor.png
├── solar_panels.png
├── ice_melter.png
├── pipe.png
└── water_magazine.png
src/
├── core/ # Game loop and state machine (main.cpp)
├── entities/ # Structure, Pipe, PipeNetwork, Inventory, Enums
├── structures/ # Concrete buildings (SolarPanel, IceMelter, WaterMagazine)
├── world/ # Map, Tile, World, WorldGenSettings
├── rendering/ # Renderer, GameCamera, TextureManager
├── player/ # InputManager, Gui, StartScreen
└── utils/ # PerlinNoise, Math, SaveSystem
Key design points:
Map::rebuildNetworks()— full network graph reconstruction on every structural change; handles material-type propagation in a fixed-point loop before connection mask calculation.PipeNetwork::updateNetwork()— proportional resource distribution across all producers and consumers each tick.- Texture atlas — slope and pipe variants indexed by a 4-bit binary mask derived from corner height deltas or neighbor connectivity.
- Native file dialog for save/load
- Additional resource types and buildings
- Music and sound
- Colonist simulation
- Dust storms and environmental events
- Research tree
- Multiplayer (long-term)
This project is open source and released under the MIT License.
- Jakub Sałata @JLetuce
- Jędrzej Tymiński @Kayla137
Built with raylib and Dear ImGui.



