informa
/
Featured Blog

Developer Diaries: the story behind Lords of Discord (№2)

Lords of Discord is a 3D turn-based strategy mobile game rooted in the legacy of the genre’s greatest classics and here is the continuation of the dev story behind it.

The Kaliningrad-based company HeroCraft continues its story of how, despite losing the license to the famous Disciples franchise, it went on to work on the game titled Lords of Discord.

 

As I said in our previous article, the original Disciples game went into development five years ago. The game traveled a long road to reach its AppStore and Google Play launches. This article is about the coding part of the project.

 

Engines.

 

The cross-platform Marmalade SDK was chosen for developing the game on iOS and Android. Ogre 3D was picked as the graphics engine, which is in charge of setting up the 3D scene.

 

Example of 3D scene from Lords of Discord

 

Example of 3D scene from Lords of Discord

 

Why these two engines and not, say, Unity? For one thing, Ogre is open-source, unlike Unity. This obviously gives programmers a lot more wiggle room. The team expanded Ogre’s support for texture compression formats, resulting in higher performance. Secondly, Ogre has some low-level capabilities – i.e. you can control every stage of the rendering process, from the placement of 3D models to working with polygon output and writing vertex and fragment shaders (by the way, it was noticed that on some graphics cards, shaders work in such strange ways that one cannot help questioning one’s disbelief in the supernatural). It should be mentioned that the Ogre community is quite vibrant: a lot of developers are using it, and it’s easy to get your questions answered on the engine’s forum. Also, it’s free. And let’s not forget that this was five years ago.

The server-side part of the game was developed in-house – i.e. it uses the same game server that other HeroCraft games are running on.

A lot of time went into working not on the game proper but on its asset editor. Early on the team did consider using an existing 3D editor that was expandable where they needed additional functionality (such as 3D Max or Blender), but it soon became clear that the degree of flexibility they offered wasn’t enough. And since we were mostly dealing with narrowly specialized tasks, we realized the optimal solution was to write our own editor.

Our in-house editor currently allows to draw landscapes for levels, place characters on them, adjust animation settings, and edit the height and passability maps.

Lords of Discord editor screenshot

 

Lords of Discord editor screenshot

 

Lords of Discord editor screenshot

 

As with every major project, we made use of third-party libraries that added missing functionality: GUI, sound system, particle system. Although this sped up development a lot, the team it still bitterly regretting some of the choices we made. But there’s no turning back now. (Just kidding.)

 

Things that didn’t make it into the game.

Here it’s worth mentioning that in Disciples, the player has a castle and a troop of units that move around the map, discovering new areas. You can, and must, capture enemy buildings and take control of them. There are also single enemies for the player to fight. The enemies behave the same way – that is, they move around the map attacking the player’s buildings and troops and capturing territory. So after we lost our Disciples license, we decided, among other things, to alter the game’s core concept, which was why some of the code had to be removed. A lot of things were rethought and reconsidered. Incidentally, one inside joke of ours was born out of this: when the project’s programmers are talking to the game designer, the expressions all three are wearing on their faces came to be called “The Mugs of Strife.”

For instance, we abandoned a nice-looking terramorphing idea where the landscape would be repainted in the colors of the race that had captured the area.  

 

Terramorphing example

 

Terramorphing example

 

We also had to drop the AI for enemy troops; that no longer fit the concept, either. The changes have also affected capturing enemy buildings: we took that out as well.

 

Complex and interesting tasks.

Our programmers went over a particularly large number of possible solutions while working on a system for rendering the landscape and trees. Among the landscape-drawing options they considered were a fully premade 3D model and a tiled landscape with a special mechanic for splicing tiles. In the end, they settled on a hybrid method involving a variably detailed polygonal mesh, an overall color map, blendable detailed textures, and additional 3D objects. For drawing trees, the programmers and 3D modelers went over a dozen and a half different algorithms to find the nicest-looking and most efficient one. The approach they chose allowed them to draw shrubbery and trees and show them being swayed by the wind. Incidentally, while working on the trees, they concluded that firs are preferable, since they have a simpler structure and can be rendered more quickly. Part of this code was written in a couchette car on the train from Kaliningrad to Moscow by one of our programmers, as he was admiring the endless snowy forests of Belarus just outside :)


Fir trees from Lords of Discord

Fir trees from Lords of Discord

A lot of time was spent plugging in various advertising and analytical SDKs; these are choices in which our managers and analysts have the final say. And since the team use Marmalade, they also had to custom-adapt some of the plugins.

 

The optimization problem – doubling the frame rate, halving the size of data, those “needed yesterday” moments – is a challenge all developers face, and our team is no exception. In the winter, as work on the game entered its final and most intense stage, our division manager would put his tea mug next to the fan grill of his laptop, and the tea would always stay hot.

 

The same can be said for the differences between working with iOS and Android: whilst iOS is thoroughly standardized from a technical standpoint, Android is famous for having an entire zoo of devices and screen resolutions, and steps sometimes need to be taken just to ensure support for a single specific device.


Conclusion.

 

Although the developers of Marmalade SDK are about to discontinue support for it, we're prepared to put our effort into making the changes we need. Our team has a lot of plans for further development: implementing a guild system, adding new races, and adding synchronized online battles.

Latest Jobs

Sucker Punch Productions

Bellevue, Washington
08.27.21
Combat Designer

Xbox Graphics

Redmond, Washington
08.27.21
Senior Software Engineer: GPU Compilers

Insomniac Games

Burbank, California
08.27.21
Systems Designer

Deep Silver Volition

Champaign, Illinois
08.27.21
Senior Environment Artist
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more