Planetary Installations and HQs
I hope you all had a great 2018! I've been hard at work on Pegwars whenever I get the time, which is not as often as I would like, and have made some great improvements that I'll detail over the coming weeks. One such feature I have working now and would like to present a teaser of is Planetary Installations.
Planetary Installations
Imagine purchasing and equipping your frigate with some heavy planetary bombs, and seeking out an enemy planet. Hypering in, you orbit the planet with eyes out cockpit window for any valuable targets - depots, airports, perhaps even the enemy HQ. Evading the orbital defences you plunge into the atmosphere over your target, only to discover ground-based defences surrounding it are now opening up on you. You dodge and weave fearlessly through the laser artillery fire until expertly maneuvering into place to drop your bombs on the perfect trajectory to ultimately destroy the enemy installation, causing immediate political and economic damage to your foe!
The general makeup of planets is procedural, these provide a base level of detail, such as the basic shape, the resource makeup, biomes etc. Consider planets a dice roll - sometimes you get a planet that is barren and worthless, while others are rich in minerals, surface resources and native population.
However populated planets also harbour installations - civilian, military, commercial structures that have important strategic and gameplay value. For example : for imports and exports to flow, a planet must have airports or spaceports for facilitation of trade. Here's an example of a planet-based airport. You can spot them and target them from space, fly down and land on the runway and get out and explore the planet. However, you could also blow up an airport in order to hinder trade from an opponent's planet and stifle its growth.
Planets are not just for exploration and resource-gathering, they form the basis for empires - yours and your opponents. My current game design for planets revolves around the concept of planetary HQ.
Planetary Headquarters
If you discover a uninhabited planet, and have enough money, you can build an HQ and you thus gain ownership / governorship of the planet, its existing native population and resources. Once your HQ is built it comes by default with some resource gathering capability, which can later be enhanced by paying for extra mining or refinery installations. Cities will grow organically from around your HQ over time, depending on the quality of resources available in the vicinity. The area from which you can mine and gather resources is based on the city size and harvesting capacity. The location you place your HQ will therefore be of utmost importance - the nearer to a rich and balanced set of resources you place your HQ, the quicker the city and population will grow. Good HQ placement will eventually tip a planet over the point of self-sustainable growth. But bad HQ placement will, without manual intervention, eventually starve itself of growth and die off.
Your governorship of the planet determines the planet's focus - should it focus on population growth, military defence or tourism? Is the planet lacking resources required for the cities to grow further in the manner you desire? Then you build airports and setup an import/export trade with the rest of your empire to provide the resources required. Excess resources can be exported to other planets in need, or sold for huge profit.
If you discover on the other hand a planet with an enemy HQ, it will already come with cities, installations and defences. You must take over the HQ (or destroy it) in order to claim the planet.
This means that of course an HQ is now the most vulnerable installation. So as well as cities and resources, you will need to place defences, you will need to build airports to support imports/exports, you need to build specialised mining tiles and refineries to improve production.
How Installations are Implemented
On a technical level, for the game engine to generate and places buildings on procedural planets by default, there are some elements to consider. Installations are often large - they must be able to be seen from outer space, for gameplay reasons - and as such, require flat land on which to build. The land beneath the installations must be terraformed, to produce a flat surface. But also the colour generation is affect, and biomes are destroyed or regrown with specific items.
To implement this I refactored the planet generators to be a layer-based system. After the underlying procedural basis is run, plugin terraformers are applied, which can modify height, colours and/or biomes :
- flattening beneath installations, colouring and altering the landscaping
- craters, faultline generation are now plugin based
- added volcanoes as a new planetary plugin - these add a glowing red centre inside the volcanic crater mountain shape
- dynamic terraformers such as asteroid - ground impacts, manual terraforming, ...
The following screenshot demonstrates some of these plugins - levelling beneath the platform installation, made grey with rocks scattered around the footings - and to the right a volcanic pit with lush green trees around the rim and a city feeding off the rich resources. These plugins are only 'just working' and over time I will polish and tweak them, especially when I get proper artwork to suit.
These planetary installations are python game objects like any in space, and so have full gameplay support - game volume triggers, docking animations, trade UI, shields and hitpoints, AI.
If you have any ideas for any types of installations you'd like to appear on planets, moons and large asteroids, let me know in the comments below!
Planetary Installations
Imagine purchasing and equipping your frigate with some heavy planetary bombs, and seeking out an enemy planet. Hypering in, you orbit the planet with eyes out cockpit window for any valuable targets - depots, airports, perhaps even the enemy HQ. Evading the orbital defences you plunge into the atmosphere over your target, only to discover ground-based defences surrounding it are now opening up on you. You dodge and weave fearlessly through the laser artillery fire until expertly maneuvering into place to drop your bombs on the perfect trajectory to ultimately destroy the enemy installation, causing immediate political and economic damage to your foe!
The general makeup of planets is procedural, these provide a base level of detail, such as the basic shape, the resource makeup, biomes etc. Consider planets a dice roll - sometimes you get a planet that is barren and worthless, while others are rich in minerals, surface resources and native population.
However populated planets also harbour installations - civilian, military, commercial structures that have important strategic and gameplay value. For example : for imports and exports to flow, a planet must have airports or spaceports for facilitation of trade. Here's an example of a planet-based airport. You can spot them and target them from space, fly down and land on the runway and get out and explore the planet. However, you could also blow up an airport in order to hinder trade from an opponent's planet and stifle its growth.
Planets are not just for exploration and resource-gathering, they form the basis for empires - yours and your opponents. My current game design for planets revolves around the concept of planetary HQ.
Planetary Headquarters
If you discover a uninhabited planet, and have enough money, you can build an HQ and you thus gain ownership / governorship of the planet, its existing native population and resources. Once your HQ is built it comes by default with some resource gathering capability, which can later be enhanced by paying for extra mining or refinery installations. Cities will grow organically from around your HQ over time, depending on the quality of resources available in the vicinity. The area from which you can mine and gather resources is based on the city size and harvesting capacity. The location you place your HQ will therefore be of utmost importance - the nearer to a rich and balanced set of resources you place your HQ, the quicker the city and population will grow. Good HQ placement will eventually tip a planet over the point of self-sustainable growth. But bad HQ placement will, without manual intervention, eventually starve itself of growth and die off.
Your governorship of the planet determines the planet's focus - should it focus on population growth, military defence or tourism? Is the planet lacking resources required for the cities to grow further in the manner you desire? Then you build airports and setup an import/export trade with the rest of your empire to provide the resources required. Excess resources can be exported to other planets in need, or sold for huge profit.
If you discover on the other hand a planet with an enemy HQ, it will already come with cities, installations and defences. You must take over the HQ (or destroy it) in order to claim the planet.
This means that of course an HQ is now the most vulnerable installation. So as well as cities and resources, you will need to place defences, you will need to build airports to support imports/exports, you need to build specialised mining tiles and refineries to improve production.
How Installations are Implemented
On a technical level, for the game engine to generate and places buildings on procedural planets by default, there are some elements to consider. Installations are often large - they must be able to be seen from outer space, for gameplay reasons - and as such, require flat land on which to build. The land beneath the installations must be terraformed, to produce a flat surface. But also the colour generation is affect, and biomes are destroyed or regrown with specific items.
To implement this I refactored the planet generators to be a layer-based system. After the underlying procedural basis is run, plugin terraformers are applied, which can modify height, colours and/or biomes :
- flattening beneath installations, colouring and altering the landscaping
- craters, faultline generation are now plugin based
- added volcanoes as a new planetary plugin - these add a glowing red centre inside the volcanic crater mountain shape
- dynamic terraformers such as asteroid - ground impacts, manual terraforming, ...
The following screenshot demonstrates some of these plugins - levelling beneath the platform installation, made grey with rocks scattered around the footings - and to the right a volcanic pit with lush green trees around the rim and a city feeding off the rich resources. These plugins are only 'just working' and over time I will polish and tweak them, especially when I get proper artwork to suit.
These planetary installations are python game objects like any in space, and so have full gameplay support - game volume triggers, docking animations, trade UI, shields and hitpoints, AI.
If you have any ideas for any types of installations you'd like to appear on planets, moons and large asteroids, let me know in the comments below!
Yay, thanks for the update! Last screenshot looks nice, always wanted to see a space game, where surface installations are not just a compact object, meant to represent entire city, on your picture city looks quite big.
ReplyDeleteHappy 2019!
DeleteI'm going to write up a post about how cities etc will grow on planets, but in short - to run a planet you'll either build or take over an HQ, and over time, out from the HQ, your city will grow depending on the combination of resources in the vicinity, and the political policies you set. Most of the city, residential, industrial etc will be part of the 'tile sets' that cover the planet, and the Installations mentioned here are 'special buildings' that cover multiple tiles, with extra strategic and economic importance, and with which you can interact - land on, walk into, visit their markets etc.