1. Every Day We Fight
  2. News

Every Day We Fight News

Developer Diary #1 (Part 2)

Modular Level Kit and Smart Asset Library in Unreal Engine (Part 2 of 2)


In Part 1 of our latest dev diary we described how we constructed the building blocks for making the environments of Every Day We Fight. We’ve been strong advocates of why great tools help make great games for a long time, and in that spirit the subject of this diary is: Creating layout tools for making big worlds fast.

[h2]Case Study: Making a room[/h2]

By having many wall module variants we can configure any building we want. The key now is how to iterate fast. The challenge we’ve set for ourselves is: “why can’t greyboxing a level be as simple as playing the Sims?”



By using our tool to trace the footprint of the building, we can quickly populate our layout with wall modules. Each module derives from a parent in the root level kit (which shares the dimensions of a final asset, but is essentially a greybox version). The tool can now pick kit elements from the selected kit (each kit representing an architecture style) to quickly make a room with a door, windows, etc. The level designer can then quickly swap certain modules for another variant to get the desired lines of sight and pathing. This makes prototyping in greybox very efficient in addition to making the transition from greybox to level art much more seamless, since the positioning and dimensions of the pieces has already been set.



Setting the modules isn’t the only part of the process, we also have to set the floors. Once we have established the footprint or our room we need to use the patch tool to create a procedural mesh for the floor. We use earcut triangulation to allow for real-time manipulation of the mesh. Once we are done editing we can bake it down to a denser mesh to allow for better vertex painting. The mesh is then assigned to the room with the other modules.

Finally, we need a trim tool to make the seams between the wall modules and the floor less jarring.

[h2]Case Study: Making a building for a bird’s-eye view camera[/h2]

Every Day We Fight has two primary camera angles, one from the bird’s-eye view and another over the shoulder. Creating buildings which satisfy the needs of both of these perspectives can prove challenging.

When the player is moving their units they use the bird’s-eye view camera which has a high elevation but does have an angle so we aren’t looking straight down. This gives us a great view of the battlefield, unless there is a wall between our camera and our target destination. To stop the player from having to rotate to see what is behind a wall in this view we can make the wall module transparent and have it ignore the click collision channel so we can select the floor behind it without obstruction.

The next step is making a building with multiple stories. From our bird’s-eye view camera angle, we will want to be able to select which floor is active in a building we are targeting. To do so we can detect when the cursor enters or approaches a room instance. Now by rolling the mouse wheel the player can set the desired elevation on this building, hiding floors above it to leave the targeted floor in plain view.

The benefits of building your worlds with a level kit go beyond the increased iteration time in making your content. You will also benefit from static mesh instancing, greatly reducing your required memory and increasing your rendering times.



[h2]Next Steps[/h2]

At Signal Space Lab we pride ourselves on our ability to deliver best in industry audio, we have been very excited to experiment with Quartz in Unreal 4.27. We plan to add attenuation volumes to our rooms to experiment with how we can get the desired occlusion and reverb with a native Unreal Engine audio implementation.

Follow us so you don’t miss our next Dev Diary where we discuss how to break up the visual repetition caused from using a modular level kit using vertex painting and substance designer/painter.

Developer Diary #1



Modular Level Kit and Smart Asset Library in Unreal Engine (Part 1 of 2)


Every artist uses a set of tools to express their vision to the world. Engineers can design and build tools for any purpose. Seems like a match made in heaven, but the reality of making games is such that there is often a large disconnect between those parties, that’s where the Tech Artist comes in, to bridge the gap between engineering and art.

When we set off on our journey to make Every Day We Fight, one thing was clear: we needed to make large environments that offered tactically interesting gameplay. For our game, that meant a mix of exterior and interior environments that weren’t limited to a grid system. The nature of the game is such that sight lines are everything and this posed a number of challenges when considering how to make levels which had the geometry we desired and the gameplay data the game needs for its various systems.

One of the main benefits of Unreal Engine is how it enables small teams to deliver big experiences. Our solution leverages the functionality enabled in Blueprints to make Smart Assets, Unreal Engine Actors made entirely in Blueprint with a set of Child Actor Components containing required gameplay data. By doing so we can create a modular level kit which can be used by our level designers. This makes the transition from level blocking, to gameplay ready, to art much more seamless.

[h2]Case Study: Cover[/h2]

In Every Day We Fight, cover is a crucial gameplay system. Since we are making a turn-based tactics game with physically accurate bullet behaviour, the characters must be able to take the correct position when in full or half cover. They then must lean out of cover to take a shot. The class default data contains the settings used by the animation system to step out and/or lean out and aim at their target, but this can be edited on a per instance basis to allow for a flexible level design. This is also the case for other data types like navigation links. Configuring which covers can be vaulted over and setting the data representing where characters take off, land, and place their hands, is all easily editable by level designers.

Smart Assets are powerful, but it’s not just about having an easy way to package and access data between actors and systems. It also allows for the validation so that when level designers edit their work, they can be safe in knowing they won’t allow a player to vault through a wall or some other bug caused by faulty data. Data Visualizations can be rendered in real time as the assets are being moved in the world so designers can be safe in knowing they aren’t breaking gameplay.

Fig. 1 Every kit element, be it a wall or vehicle or cover prop inherits from the same collection of base classes. These classes are curated into variants such as doors, windows, half-cover barricades etc by the design team with optimal, best case scenario cover points added. Each placed instance of a variant can then be further configured from those defaults to handle edge cases. The placed blueprint then assesses the assets implementation in the level and validates these cover positions based on a ruleset of criteria including things like whether the prop is on the ground or not, is the cover location inside a wall, is the cover location too far from the asset it belongs to etc.

[h2]Case Study: Wall Modules[/h2]

By building Smart Assets using the Entity - Component design pattern, functionality can be added to new asset types by simply adding a component to an Actor. Furthermore, they can easily be expanded upon by technical designers/artists in Blueprint using the Event Graph to have additional functionality. For example a cover component can be expanded to be applied to a wall module. This is the first step in having a smart level kit library, enabling level designers to quickly create buildings with functional gameplay. Now our door frame can be expanded into a door which requires a key to open.

Fig. 2 The doors in this example inherit from the door variant asset. As such they share things like cover positions but then each placed instance can be tweaked for gameplay. Things like which side the door hinges on, whether there even is a door or if the door is locked, and if it is locked, if it can be unlocked with a key.

The beauty of developing in Unreal Engine is how it enables small teams to build big things. We have shown how by writing very few lines of C++, we can build the foundation for our level kit library. In Part 2 we will be expanding upon these concepts to show how we can create simple but powerful layout tools to increase iteration time when building urban spaces.

Fig. 3 In this preview a small subsection of a building is shown. The entire wall can be drawn, pruned back, filled with kit elements and replaced with new variants quickly and easily by the level designer. In a future post this workflow will be explored further.

Every Day We Fight

ABOUT THIS GAME

Take control of a group of resistance fighters, The Thorns, as they transform from everyday citizens to heroes. During its uniquely crafted rogue-lite campaign, The Thorns take the fight to the enemy across a variety of battlefields - each representing a district of their hometown.

It's up to you to come up with innovative tactics and execute them, as you order your units about the battlefield and take control of them during the action. Every Day We Fight challenges the form of the turn-based tactics genre by introducing a unique blend of strategy and action elements.

DEEP TACTICAL DECISION MAKING

The key to overcoming the challenges keeping the player from their goal is making the right choices on the battlefield.

TAKE CONTROL DURING ACTION MOMENTS

Players are in full control as their units execute their commands. Choosing when and where to shoot adds tactical depth to the action.

CONSTANT PLAYER AGENCY

Engagements in Every Day We Fight possess a uniquely natural and dynamic quality since the flow of combat can be interrupted to perform reaction abilities.