Caught in a time loop, your band of resistance fighters is humanity’s last hope. Real-time exploration meets turn-based tactics and roguelite strategy as you learn new abilities, seek out new weapons, and develop new techniques to overcome the mysterious alien threat.
[h1]Modular Level Kit and Smart Asset Library in Unreal Engine (Part 2 of 2)[/h1]
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?”
[img]{STEAM_CLAN_IMAGE}/42042745/adfe15f598557475a72d11845295b9aff44a1983.gif[/img]
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.
[img]{STEAM_CLAN_IMAGE}/42042745/82d3fbc3dbba97d1e35deca70471876c3af633a9.gif[/img]
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.
[img]{STEAM_CLAN_IMAGE}/42042745/24075f021c04459fef4f9b7f9085b20b5ae8fac6.gif[/img]
[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.