First of all, sorry for this update being somewhat late. I wanted to finish the basic functionality for battle challenges first, and then have been procrastinating for a few days on top of that. A related update video might come later still. Those usually take several hours overall to produce, and I have found just working on the game more interesting and productive.
Overall, February was a decently productive month. Major new features from include battle challenges, fully implemented shields and a all-new radiator module.
Battle challenges
Battle (scenario) challenges is a new feature that allows battle scenarios (levels) to be saved with some extra metadata that allows the battles to be scored. There are three types of challenges:- Fixed battle: Both the player and enemy fleets are fixed, the player just needs to fight the battle the best they can for a highscore.
- Fixed enemy fleet: The enemy fleet the player faces is fixed, but he can assemble his own fleet freely within a set budget. The player can also change the level and deployment area sizes to his advantage.
- Fleet creation: The player is only allowed to design his own fleet with a given budget, the enemy fleet and level options are fixed.
These challenges are created with the battle scenario editor that now has an option to save the current setup as a challenge. The challenges can be browsed and played through a new screen that lists all of them with basic info, and shows details such as enemy fleet composition for the currently selected one. The battle setup screen is then used for setting up the "fixed enemy fleet" and "fleet creation" type challenges, while selecting a "fixed battle" challenge takes the player directly to the game. All challenges may contain a pre-made fleet for the player to use, and where applicable the player can also overwrite that with his own.
The battle challenges screen |
Somewhere in the future I plan to add a challenge sharing feature that will allow the players to upload their own challenges to a central server, download them and compete on global highscores as well. While such a service should be relatively simple to implement, there are several caveats such a cheating prevention and content moderation that need to be addressed as well.
Shields
Implementing the shields took a considerable portion of this months work. This is partly because I decided to go ahead create at least relatively nice visuals for them in addition to the actual functionality. Like most of the mechanics in Battlefleet Engineer, shields don't really follow the simplest, most common pattern. Rather than being walls made of energy, these shields are more like magnetic or electric fields, meaning that the functionality isn't limited only to the edge but rather affects the whole area they cover.
The shields slow down kinetic projectiles and absorb the energy of plasma and beams traveling through them. All projectiles are also pushed away from the center, resulting in a nice deflection effect. The effects of individual shield modules stack, so having overlapping shields will increase the overall protection of that area, but the limited radius also forces the shield generators to be placed next to the modules they should protect. This creates a certain design trade off, because you will want to keep the shield generators safe, but also need to place them close to the edges of the ship for maximum effectiveness.
Shields have somewhat complex relation with (electrical) energy:
- Each shield module consumes a constant amount of electricity for upkeep while active.
- The shield's own energy is increased by using additional electricity to pump it up to maximum size. The maximum recharge rate and efficiency depend on the module.
- The shield's radius is direcly defined by its current energy level.
- Absorbing projectiles' and beam energy consumes the shield's energy that then needs to be replaced for the shield to retain its nominal size.
In combination, these mean that to overpower a shield, you will need to shoot it with energy or beam weapons at such a rate that either it can't recharge fast enough or the ship can't provide enough electricity to keep it up. It is entirely possible to overpower the enemy ship's electricity system with your sustained firepower so that they can't charge their weapons and shoot back.
Shields deflecting 4 kinetic projectiles. The trails expand and fade away. |
The visual side of the shields consists of two major parts: static shield drawing, and dynamic projectile trails. The shields are drawn with geometry and gradients instead of sprites for perfect sharpness at any scale. To visually represent the stacking of the shield dynamics, I use a separate render target onto which the shield circles are drawn using additive blending and a color gradient texture. This map then contains the color and intensity of all the shields combined per screen-space pixel. Into that intensity map are also drawn expanding trails for all projectiles that travel through the shields, adding to the color and pattern intensity.
When the shield intensity map is done, the shield circles are drawn to the back buffer with a custom shader that reads the map and adds a repeating hexagon pattern from a separate texture as well. The pattern texture coordinates are defined so that it continues seamlessly from one shield circle to another within the whole ship. This ensures that the pattern looks good even if there are multiple overlapping shields.
When the shield intensity map is done, the shield circles are drawn to the back buffer with a custom shader that reads the map and adds a repeating hexagon pattern from a separate texture as well. The pattern texture coordinates are defined so that it continues seamlessly from one shield circle to another within the whole ship. This ensures that the pattern looks good even if there are multiple overlapping shields.
Trail render mesh of two projectiles entering a shield from the left and top. |
Radiators
Radiator is a new module designed to deepen the ship design process by bringing new considerations to the table. By adding these modules that store and consume heat energy, this resource is no longer just something that could be replaced with a simple weapon cooldown timer, but is actually transferred within the ship. By adding radiators to your ships you can increase weapon fire rates by removing one bottleneck. This way you may need fewer weapon modules overall.
There are multiple things to consider when using radiators. First of all, they use a fair amount of electricity to pump the heat and keep the radiating elements at a high temperature where the output power is much greater. Like in real life, the amount of heat radiated depends on the 4th exponent of the surface temperature, so you will want to run your radiators at the maximum heat capacity for them to be effective.
The radiator module is also the first one to have dynamic graphics implemented. In practice this means that the radiating surfaces fade from black to yellow/orange with the stored heat.
The new radiator modules glow yeallow when heated up. |
Again, the easiest and best way to keep up with the development news of this game and see all the cool stuff first is to follow the game on Twitter.