Internship

Some of the things I have worked on or contributed to during my internship at Skybox Technologies ApS, working on Rush Tactics

Fog of War

Early development footage of Fog of War, showing shadows.

Early development footage of Fog of War, showing circular shadows.

Early development footage of Fog of War, showing fog fade out.

Fog of War was planned very early on in the development of Rush Tactics. I was given this task, since my specialization was graphics programming.


A few parameters such as awareness radius, view distance, view angle, and look direction were sent to the shader for every soldier. These were then used to calculate which parts should be illuminated, similar to how point and spot lights work. Additionally, the spot light's positioning had to be calculated such that the light's cone would perfectly graze the awareness sphere, for any specific view angle and awareness radius.


The slightly trickier part was the shadows. Calculating actual shadow maps would have been far too expensive. The approach I decided to go with was to place box colliders, which would loosely define the level geometry, and which were then send to the shader. The shader would then iterate over these colliders and do simple AABB vs Ray intersection tests (additionally with intersection depth for smoothing) to calculate whether the point was in shadow or not.


Lastly, the Fog of War had to fade out after a certain time. This was accomplished simply by coloring the red channel with the lights' strength, and the green channel with the amount of seconds the fog should last. The green channel would have value reduced by the deltaTime every frame, and when it hit zero, the illumination would fade away.

Camera Movement

Early development footage of a camera movement system, showing tracking, zooming, switching between soldiers, and FOV change

Late development footage showing camera zooming, transitions, switching between soldiers, movement

One of the first assignments I was given was a camera movement system. It needed to support switching between a zoomed-in view of each soldier, and a zoomed out overview of the map. In the end, we settled on a system where selecting a soldier tracks their position, with manual rotation, along with the options of manually moving and zooming. The camera also stops tracking the soldier if you decide to completely zoom out.

Some of the many features the system includes is adjustable zoom distances, zoomed in/out FOVs (unused in final version), smoothing of movement and rotation, recentering when zooming out, and tilting of the camera when zooming in and out.

Smoothly changing the FOV when zooming in was particularly tricky, as objects' screen size changes non-linearly as you linearly change distance and FOV.

Various effects

During playtests, we discovered certain cards felt overpowered. We wanted to keep the cards and their functionality in game, so we came up with the idea of 'burning' cards, making them single-use. The effect itself uses a color gradient, and uses the brightness of the texture to decide which parts burn first.

One of the grenades we wanted to have was a smoke grenade. I made a simple shader which would deform a mesh and give it a slight outline. Another intern, Jonas Gustafsson, then used this to make a particle effect which played when the smoke was thrown. It was also important to integrate this effect with the Fog of War, as the smokes needed to obscure both the soliders', and the user's vision.

One of the effects I'm happier with was a targeting indicator for a health card we had. The cross itself is calculated with an SDF. The illusion of depth is created by scaling the UV coordinates and redrawing the cross multiple times, with an additional sinusoidal offset to give the wandering appearance.

In order to slow down gameplay and prevent spam, we needed a cooldown before cards could be played. I took the job of creating an effect which would indicate the state of this cooldown. The desaturation along with the glowing line indicates how far the cooldown has progressed. The backglow only shows when a card is ready to play. The effect uses simple perlin noise to achieve the scrolling effecct.

As with many other games, easy friend-or-foe recognition is important. After a long discussion, going over many alternatives, we decided an outline was the best approach given our time and resources. The end result is a colored outline that not only shows team color, but also which soldiers are currently selected with powerups. Additionally, the outline scales in order to have the same thickness on the screen, regardless of the distance to the camera.