User Tools

Site Tools


minitrem

Minitrem

[A screenshot of the game, [[https://www.youtube.com/watch?v=Hkt2JXWH4sw|watch the video]].]

Minitrem is a 2D real-time strategy game with an infinite, procedurally-generated world. The overall theme is loosely based on Tremulous. The game is written in C++, using SFML for graphics and sound. Most of the assets were also made by me.

Background

Minitrem started in 2017 as a project for an “intro to C++” class at my University. I kept developing it until I eventually lost interest.

Compiling

The source code is available at minitrem. Make sure you have a C++14 compiler and SFML installed and run the Makefile. It should even work on Windows and OS X, your mileage may vary.

How to play

[Some Crystals in a cave.]

The objective of the game is to collect crystals and expand the number of your units. After starting the game, you have to place the first teleporter. Find a suitable spot (away from enemies), hold the right mouse button and select placing the teleporter from the context menu. Use the left mouse button to select the newly-placed building and use the context menu to hire a Scientist and a Soldier. This consumes Crystals, the currency in the game, displayed in the top left corner. Make sure no one is standing on the Teleporter when units are teleported. You can move selected units from the context menu.

Scientists

[The two buildables: a Teleporter and a Replicator and the three unit types: a Scientist, a Builder and a Soldier.]

Scientists walk quickly and can collect crystals from the world. Losing the last scientist while having not enough crystals or a teleporter to hire a new one is a game over scenario. You must take good care of them as they explode upon death, usually taking everything and everyone around with them.

Soldiers

Soldiers, equipped with pump-action shotguns, fire at Spiders and Nests in range. Their ammunition is finite and will eventually need replenishing using a Replicator. You can order Soldiers to fire at a specific point using the context menu. Soldiers can also throw grenades, which deal a lot of area damage.

Builders

Builders can build new Teleporters and Replicators and repair damaged buildings. To build something, stand close to the desired location and use the context menu.

Replicators

Replicators spend crystals on creating shotgun ammunition and grenades. Select a Replicator and use the context menu to “replicate shells” or “replicate grenades.” Once there's ammunition in the Replicator, visualized on the building's card in the lower right corner, approach it with a Soldier. Then use the Soldier's context menu to “restock shells” or “restock grenades”.

Aliens

[A few Spiders near a Nest.]

Aliens are the enemies of the game. Spiders attack by approaching a human and biting him to death. They spawn randomly all over the map. Spiders are sensitive to sound and will react to gunfire and explosions from a large distance.

Nests continuously spawn new Spiders and must be destroyed for an area to become safe. Use grenades to quickly take out Nests and all nearby Spiders.

The world

Arguably the most interesting thing about this game is the infinite world. You can scroll as much as you want in any direction and the game will generate new chunks as needed.

The game uses a sleep/wake system for objects, similarly to physics engines. Objects actively participate in the game only if they've been woken up and go to sleep if nothing's happening. This way there can be huge numbers of Nests ad Spiders in the game, but because only a few are active at a time (those with human activiy nearby), the cost is negligible.

minitrem.txt · Last modified: 2022/04/15 17:36 (external edit)