End of March Update - Stuff You Already Saw In the Trailer, and Future Optimizations

Hello everyone,

While the few weeks leading up to the launch of the KS campaign was spent largely working on the campaign itself, we did manage to get a number of huge updates working just in time, and in some cases just days before the campaign launched. You probably noticed at least a few of these in the trailer, but some may have been more subtle.

Firstly, while I had been expecting some of the more advanced lighting features to be added to the game later down the line, Tommy decided to put in a marathon effort to get things like volumetric lighting, spotlights and a fog/haze system just in time for the recording of the game's trailer to take place, so kudos to him for squeezing all those features in in such a short time frame. I genuinely didn't think we'd have those features in time for the video.

The above video demonstrates all three of these new features.

  • Spotlights. This sounds simple, but spotlights are distinct from the lights we've shown before (point lights), since they focus light in an aperture rather than casting it radially in a fully symmetrical manner. This allows us to have things like vehicle headlights and searchlights. As can be seen from the video, the aperture of the spotlight, as well as falloff radius (or how "focused" the light is), can also be controlled.

  • Volumetric lighting, which is the simulation of light illuminating particles in the atmosphere. In real life this is usually photons striking things like dust or water vapor. With this feature, the ray of light from a spotlight can actually be seen in the atmosphere (rather than only where the light meets a surface), which can create for some very cool effects. This can also be used for point lights, so that things like explosions and weapon tracers can have a subtle amount of visible light around them, creating a bloom-like effect. The intensity of volumetrics can also be determined on a per-light basis, so in some cases, volumetrics are reduced or turned off entirely in instances where it doesn't make sense to include them, such as fires, where the light source is actually far above the fire itself.

  • Haze and fog. Maps can have specific settings input for haze and fog, which can very much affect the mood and atmosphere of a map, and also very much directly plays into the volumetric lighting. More fog and haze = starker volumetric lights. Fog can also have a height value applied, and so can be made to be thicker at lower or higher elevations. This can make for an especially cool effect for something like having foggy, misty lowland bogs, or for making the areas below mountains and hills appear mysterious.

Of course there are still a few more light features that need to be added. You may have noticed that objects do not cast shadows from smaller light sources, and that shadows are only cast from the sun position. This will be altered in a future update. You may have also noticed in the trailer that many vehicles only have a single headlight. This is currently an optimization issue, as there is a limitation of 100 light sources per map right now. This will be changed in a future update to allow for theoretically infinite light sources, through the implementation of Forward+ rendering, a rendering strategy many modern games use to allow for many light sources. This of course will be a large project in of itself, and will require a lot of man-hours to replace the existing rendering architecture.

Another smaller update in the trailer is the inclusion of a terrain-altering warhead, which Gustas managed to throw in as a last minute addition.

(Note: proper vehicle wreckage artwork for the Wartruck is still on the to-do list)

Right now, this is a very simple system, which just craters terrain when it strikes the ground, with some options for the scale of the cratering. Note that most weapons will not do this, as that would be rather annoying if terrain was constantly being warped by any little explosion. Terrain deformation warheads will be the domain of very heavy weapons, basically heavy artillery and superweapons.

Of course, Tiberian Sun style terrain deformation is only the beginning of this system. We also plan on including things like worker units being able to manually level terrain and create pits or mounds, useful for base expansion and for creating compliments to your own base defenses. Basic infantry will also be able to construct trenches, which of course offer defenses to defending infantry, and if dug wide enough, can be used for larger units like vehicles and field artillery as well.

Moving onto the immediate future, we plan on focusing heavily on optimization. As you may have been able to tell from the trailer, there are some performance issues that weren't able to be overcome in the time, especially when lots of explosions or fire occur onscreen at once. This is largely due to the limitations of the current system for rendering entities with alternative blendmodes. For a short explanation of what a blendmode is, a blendmode is just the way an object is rendered onscreen relative to any pixels it happens to be overlaid on top of. For the most part this involves the use of the screen and additive blendmodes, which combine the luminosity of the sprite using the blendmode with the luminosity of the terrain and other sprites behind the screen/additive sprite. This is especially useful for effects like fire and explosions which should always be brighter than the artwork behind them, hence the performance issues associated with them. One solution is to switch to the Vulcan graphics API (over our current OpenGL API), which will generally improve rendering performance. We also will spend some time improving performance in other areas by rewriting certain parts of the rendering architecture, such as OpenRA's rendering processing system and general graphics rendering pipeline, which are currently not suited to D.O.R.F's larger and more numerous sprites and thus are huge performance hogs.

That's all for this update. As stated, the coming months will largely be focused on improving performance, but also continuing to flesh out more of each faction's units and buildings, and fixing up and polishing the logistics system.

Next
Next

CREATING LIGHTING IN A 2D GAME