Mixing 2D Billboards and 3D Environments in a Game

Lavapotion team talked about the development of their adventure strategy game Song of Conquest with a classic feel of Heroes of Might and Magic.

Introduction

Magnus, CEO: We are a small studio based in Gothenburg, Sweden. As a team, Song of Conquest is our first game, but most of our team members are seasoned game developers who have worked on a wide range of games. We are pretty passionate about strategy games, board games, roleplaying games and fantasy in general. It’s a bit of a cliche to say it, but we are really trying to make a game that we’d love to play ourselves!

Song of Conquest: Idea of the Game

Carl, Game Designer: We felt like there weren’t any new games being released like what we used to play when we were younger. Games that combined adventure and strategy in a more available way and games like Heroes of Might and Magic 2 and 3 or Kings Bounty.

Those games are absolutely a big inspiration, but we like to see it more like a love letter than anything else. We’re also very inspired by many board games and more modern strategy games like Memoir 44, Twilight imperium, Dominion, Total war, Civ and many, many more.

The songs of conquest are the stories being told in and around the time of the game. Songs have always been a way of telling stories and enticing emotions, and we really like the idea of troubadours in taverns singing the stories of what the player has done. It started when we were working on the song that’s in the teaser trailer and we really liked the idea of having songs that will be about different parts of the game. The songs will be another layer of the campaign, another way of living and reliving that story.

Concept Art:

1 of 2
1 of 2

Art Style

Anders, Art Director: It has, perhaps not surprisingly, been a long process of getting to where we are today. We started with a more classic pixel approach which was very true to the restraints of pixel art. It was our stakeholders and investors, Coffee Stain Studios, who suggested that we should try a more modern and perhaps bold perspective on the game graphics. We started to experiment with a “2.5D” look and we immediately felt it was the right way to go. Using modern shaders in a fairly subtle way along with pixel art works really well to create a deep and immersive atmosphere. All of our pixel art is created with Aseprite, except tiles which are made in PyxelEdit.

1 of 2

Game Development & Technical Challenges

Patrik, Technical artist: The biggest technical challenge of our art style is the fact that people expect simpler looking graphics to be, well… simpler on the hardware. This is not always the case, and especially not for us.

First off, our game is rendered in 3D. This is done by mixing 3D elements, such as the ground and cliffs, with 2D elements such as trees, buildings, and characters. This is all created semi-procedurally by generating 3D-meshes in a chunk structure by a system we named Cartography.

The simpler of these are the 2D elements, often called billboards. The main challenge here was that we wanted to have tens of thousands of them on the screen, and most of them animated. To pull this off we had to do three things. The obvious first one was to create well-packed atlases to limit our draw calls. It was quite convenient to let each faction have their own, as well as a couple of supporting ones. The second thing was getting them animated at a very low cost. For things like trees and grass, we ended up using a shader approach were we set up our atlases so that we could scroll over them. By doing this in steps we create the appearance of animated frames. The drawback is that every animated item in the environment has to have 8 frames, and the exact same framerate.

Arleon’s unfinished biome atlas showing trees and grass with an eight frame horizontal animation.

The last thing we had to solve was the actual billboarding itself. Traditionally, each billboard gets its own draw call as it’s rotated towards the camera. As this was not an option for us, we developed a technique involving a custom shader that would approximate a rotation by baking the information we need (such as an object’s origo position) into the generated 3D models.

That pretty much sums up the 2D-billboard side of things. Next was the 3D environments.

We opted for generating the environment meshes in code by using a technique called marching squares. We then use UV projection to calculate our UV maps and bake splat mapping information into the color channels of the mesh.

The result of the splat mapping looks kinda crazy, but when used with a shader and texture array we get a very nice and fluid result with very little texture input.

The actual textures used are small and few. 128x128px and around 16 textures per faction. The transitions between the different materials such as grass, dirt, cliff, seabed are handled by the splat mapping using the textures alpha channels as input (which enables us to add some nice noise).

The last little piece of the puzzle was the lighting. We wanted some pretty advanced looking lighting and a lot of it. This in itself could be a whole article, but to sum things up we opted for a real-time lightmap applied by our shaders using a top-down projection.

A lightmap showing mostly cloud shadows, but also a few scattered light sources.

The lightmap itself is made up by special lighting sprites and rendered by a separate camera. We also add some nice cloud shadows as our lightmap supports both light and darkness (as well as color).

The rendering process is also relying on a couple of post-processing effects. Amongst them are bloom, vignetting and color grading, along with some depth of field for making zoom-ins look cool. It’s actually mostly the color grading, together with light and ambient settings that make up the day/night effect of our game.

All this comes together to create the games esthetics and we’re very happy with the result!

Game Mechanics

Niklas, Lead Programmer: We have two different sets of core mechanics. One set for adventure and one for battle, with joint mechanics to bridge the two.

In adventure mode, you build your town with a specific build order of your choosing as well as controlling the wielders that you use for exploration, picking up stuff and engage in battle. All whilst keeping your economy in check.

In battle, you have a set order on who begins their turn first based on the initiative on a much more confined battlefield.

Here is also where our magic system called “The Essence” plays it’s biggest part. The spells you have when entering the battle is based on the type of troop you brought with you. If you lose those troops, you will also instantly lose the spell that it helped create. So it’s not always the best idea to bring the strongest units into battle.

1 of 2

Technically, the biggest challenge in developing the core mechanics so far has probably been the system to modify statistics on troops and wielders.

In order to create a flexible system, we needed something that could basically change anything from anywhere (with a few restrictions). E.g. let’s say your wielder has boots that give all troops +2 initiative for the first two rounds in the battle. At the same time, another wielder (not in battle) has a helmet that gives strength to all units – regardless of owning wielder. All that has to be accounted for in the current battle and can change dynamically at any point.

To solve this, we created something we call the bacteria system. You attach it to something and it spreads and propagates wherever it wants with help of acyclic graphs. But a couple of rewrites was needed to get where we are, for sure.

We work hard on writing and unit testing most of our code, especially the raw mechanic data and function. It has given us so much freedom when we realized that we have to rewrite or change something. We could just keep the tests since they outline what we want the result to be and just make them pass again, but with the new system.

Distribution

Magnus, CEO: We haven’t set the release date yet, but currently aiming at late 2020 to give us plenty of time to make the game just perfect. If you want to try the game earlier we suggest you sign up for the Alpha at www.songsofconquest.com. We are targeting PC and Mac for the first release, but we are developing the game with Unity so it is not a far stretch to assume that we will release the game for more platforms later on.

Lavapotion Team

Interview conducted by Daria Loginova

 

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more