DEV DIARY #9: OPTIMAL OPTIMIZATION

When we originally started working on our Alpha map, Seneca, many moons ago, our initial idea was to create the map with marketplace assets, and in time slowly replace them with custom made ones. In theory, we thought that this would speed up production, and help us achieve our goal of having a functional map more quickly.

The major problem with this strategy is that when utilizing a plethora of marketplace assets, they all have their own master materials, and their own shaders and ultimately they have varying quality.

As Cold Comfort is an online multiplayer game, it is essential that it runs smoothly. The more complex objects or textures are, the more of an effect it will have on game performance. While the original version of Seneca looks simply stunning, from a game-play perspective it was a disaster, as we were getting between 10 and 60 FPS depending on the amount of objects and materials visible.

So… it was back to the drawing board.

We have a solid 3D team, so creating assets, although somewhat of a time consuming process, they are optimized according to our own specifications regarding complexity and quality.

 IT’S ALL ABOUT DEM DRAW CALLS

We make no qualms that we’re gamedev noobs. Sure some of us have had the privilege of working on some AAA titles in the past, and that knowledge has been essential in finding a proper workflow. One major mistake we made originally is that we simply added new props to the level without instancing them, which would effectively lower the draw calls.  Draw calls are often resource-intensive, with the graphics API doing significant work for every draw call, causing performance overhead on the CPU side.  It is possible to instance static mesh objects, providing that they share the same materials and are non-movable objects, which basically results in the CPU only having to do the draw call for one of those objects, and not all of them.

Now that we’ve more or less figured we’re seeing a significant performance increase. Go us!

SETTING THE SCENE

By creating a custom scene and placing a HDRI camera in the middle, and creating a cubemap, we were able to create a highly optimized 3D image.  Cubemaps provide a simple method of environment mapping, in which distant scenery – such as skies surrounding environments, or in our case the interior of  buildings – is mapped to a Panoramic Texture. Under the hood, these textures are stored as a series of six images mapped to the inside faces of a cube.

CUBEMAPS ARE WHERE IT’S AT

In the case of Seneca, we wanted to create a realistic city set in the immediate aftermath of the viral outbreak. This meant creating a location that perhaps just hours before was a vibrant and active place, where people went around their daily business.

While doing the greyboxing of the level, we came across this pretty cool solution for creating fake interiors of buildings. Initially we had simply put up fake opaque window panes to prevent players from seeing an effectively empty building. Sure, it works, but having the illusion of interiors definitely adds to the general atmosphere. You may have seen this being done in the new Spiderman game, where Spidey climbs on buildings, and basically you can look inside each and every one, and it looks, at least at first glance like a normal apartment or office. But I assure you it is trickery!

Yeah, trickery that we decided to utilize as well. Just don’t judge us.

WEAR AND TEAR

Adding variable parameters to ensure that materials do not repeat is essential when creating an immersive environment. We’re lucky enough to have some technical artist whiz kids on the team- and they come up with some wicked stuff! On the right you can see our master metal material, which has a rust parameter. It’s the little things in life.

CORPSE NESTS WIP

Corpse Nests are locked locations, and only accessible by breaking down the door, utilizing fuses and electronically unlocking the door from outside, or entering through a hole in the wall when embodying a rat, while playing as a Gamma Prime.

 MORE ON THE HORIZON

We’re kind of wingin’ this here (if you hadn’t guessed already!) so please let us know what you think of our updates. Would you like to see more of a certain aspect of Cold Comfort? Just join our discord community server and hit us up, and let us know what you REALLY think.

CHECK OUT OUR PREVIOUS DEV DIARIES

Modular AI and You

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply