Tuesday, February 24, 2015

Barbarians have arrived in Medieval Engineers!

Today we have released our first official "Tuesday" update for Medieval Engineers, and it brings you Barbarians.

Barbarians are the first prototype of artificial intelligence (AI) in our engineering games. Please don’t confuse this with our other super-secret AI project - that’s a completely different thing and it’s being developed by a different team and we will announce it later this year.

From the change log: This is our first A.I. prototype and is still a work-in-progress. Barbarians will wander around the map seeking King Statues to destroy. Currently, since only creative mode is available, the player cannot be killed by them, so barbarians will just follow the character around the map. When they're close to a King Statue - which is automatically spawned in the world or can be placed by the player - they will destroy it; they will also destroy any building that is blocking their way. Barbarians can be killed by setting traps; for example when a tower falls on them, when they fall from a cliff, or when a catapult ball hits them, etc. We've also added a few more types of catch blocks and round timber blocks. The new catch blocks should be more user-friendly as until now it was hard to attach something to them; there is also a variant which can be safely attached to walls.

The barbarian’s AI in its current state isn't very complex, they just have a basic level of behavior; the path-finding still doesn't recognize complex paths (e.g. it completely avoids compound blocks because they are geometrically much harder to describe than the regular blocks); and the path-finding doesn't search over long distances as that would stress out our terrain LOD algorithm (which would require calculating the highest LOD levels over the entire map). These are some of the things we will be solving in the next couple of weeks.

Space Engineers will receive an AI system later. The reason for this is that the environment in Space Engineers is much more complex. It’s probably the most AI unfriendly environment you can imagine (completely dynamic; gravity vector can change at any time and location; the AI is supposed to use a jet-pack as well as walking; the AI should be able to navigate through ship corridors then jump onto another ship, pilot it, etc.). I am not promising this all will get implemented; I am just trying to illustrate the difficulties involved.

The actual development of Medieval Engineers at the moment is focusing mostly on stabilizing hard-ware (HW) compatibility issues. Unfortunately the first version wasn't 100% flawless even after we tested it on all possible HW configurations, hired a dedicated testing facility to test it on even more configurations and then let players to “beta-test” it during 24-hour pre-launch window).

Once the things above are solved, we will jump right on to the two most important areas: multi-player and survival mode for Medieval Engineers.

BTW, the simple version of survival mode will be released sooner than full survival mode and it will include: death/re-spawn, slow construction, and no-levitation. Full survival will add:  resource management and inventory, material harvesting and processing, and tools using.

More details about today’s update: http://forums.keenswh.com/post?id=7310951

It’s really great to see all the stuff that people have already created in Medieval Engineers:

Thank you for reading this! For the latest news on our games, follow us on Facebook or on Twitter.

Website: http://www.MedievalEngineers.com
Medieval Engineers on Facebook: https://www.facebook.com/MedievalEngineers
Medieval Engineers on Twitter: https://twitter.com/MedievalEng
Space Engineers on Facebook: https://www.facebook.com/SpaceEngineers
Space Engineers on Twitter: https://twitter.com/SpaceEngineersG

Sunday, February 22, 2015

Guest post by Karel Antonin: Making the music for Medieval Engineers

This blog post was written by Karel Antonin, who co-composed the music for Miner Wars 2081, which was also later used in Space Engineers. Last year, Karel started to work on music for Medieval Engineers.

Karel: “The first notes and ideas started to form half a year ago when Marek invited me into Keen Software House to take a look at our new project. He had showed me a rough outline of the game and almost immediately the first ideas started to emerge in my mind. In that first meeting we decided that the score in the game should be theme driven, contemporary, with its roots in traditional music from around the world.

We also decided right from the beginning to divide in-game music into multiple categories based on the instruments and style of each track. Those categories were: folk and traditional songs of Ireland, Bohemia, Japan and China. For each specific category we selected a few of the key instruments from each region that we would later incorporate in the score – from Irish flutes, bagpipes, cimbal, koto to shakuhachi, duduk, didjeridoo and many more.

Then the process of composing the score started. The first step was to compose the main theme that can be heard throughout the whole soundtrack and in its purest form in the main menu. Because Medieval Engineers is inherently a game in which players tend to spend a lot of time, there had to be enough variety and length in the score to accommodate this. At the end, 3.5 hours of score were created over the period of four months. At first, the score was created using synthetic mockups in my studio (I used Cubase and several terabytes of virtual instruments) – these were exchanged every day between Marek and me multiple times until we finalized every aspect. Each track was firstly created in its shorter form, approved and then extended into its final length of around 3.5 minutes.

There were two exceptions to this rule. Because I did not feel my sampled vocals were nearly as expressive as I needed, right from the beginning I enlisted help of Agnieszka "Agu" Kapuscinska – a singer, musician and songwriter from Poland. During the recording, I at first muted the synth vocals completely, and told her the settings of the game and mood of each specific track. Then I let her improvise freely to the rest of the synthetic orchestra. In the end, most of vocals that you can hear in the finished score are a result of a few days’ worth of genuine improvisation.

The second exception came in the beginning of December with the scoring of the announcement trailer. That process was different from the rest in multiple aspects – at first I composed the trailer suite (a 2 minute long piece which featured all the key musical parts that were later used in the trailer) which then got extended to its full length in the beginning of January, once I got the final cut of the trailer. As soon as that was done, we sent it over to France to the orchestrator, Guillaume Tristant. He then took care of the orchestration, edited sheets and sent them the musicians. The next step was to produce the recording session (build a team, choose a date, and give musical intentions...). The next person in line was Samy Cheboub, whose task was to mix all the recorded material (strings section in this case) with the synthetic elements (percussion, horns) into one seamless mix. After that the final result was sent back to KSH where it was added to the trailer footage and (later that day) published.

The final piece in the production of the score was the recording of the in-game music – the moment which brought it to life. The music was recorded in multiple countries. First we recorded the orchestra in France, after which came the time to record additional soloists – violin, flute and guitar. Those instruments were recorded in a separate studio in the Czech Republic over the course of four days.

Medieval Engineers is one of the greatest and most intriguing projects I've worked on so far – in those four months  there was something new every day. One day I felt the weight and grandeur of the majestic castles that players will be building, the next day it was the breath of a barbaric army trying to destroy them – and I enjoyed every moment of that process.

You can hear the final result both in the game itself and on the OST, which includes musical highlights from the entire score.

Karel's brief bio:
Karel Antonin has composed scores for over 50 projects, including short films, features, drama series, commercials and video games of various genres. In 2009 he won the award for the best score on Game Developers Session. In 2011 he won "The Best Score" award at the Underground Cinema Awards in Ireland. http://www.karelantonin.com/

Medieval Engineers - The Official Soundtrack Demo:



Thank you for reading this! For the latest news on our games, follow us on Facebook or on Twitter.

Website: www.MedievalEngineers.com
Medieval Engineers on Facebook: https://www.facebook.com/MedievalEngineers
Medieval Engineers on Twitter: https://twitter.com/MedievalEng
Space Engineers on Facebook: https://www.facebook.com/SpaceEngineers
Space Engineers on Twitter: https://twitter.com/SpaceEngineersG

Wednesday, February 18, 2015

Space Engineers: Planets, oxygen, DirectX 11, optimizations and multi-player

People keep asking us "what is the next big feature to be added to Space Engineers".  As at the moment the major part of our plan focuses on long-term goals (which will take months to finish), and we don’t want to keep people in the dark, we’ve decided to reveal some of them.

Before I continue, let me emphasize that everything I say in this blog post is subject to change. The process of game development at our studio goes through multiple stages (idea, concept, development, testing, feedback, more development…) and during the later stages it’s likely that some of the earlier stages get changed due to feedback and the experience that we gain later.

Planets and oxygen

When we started working on Space Engineers we were not sure whether we wanted to add oxygen and planets. We didn’t know if people wanted us to go this direction and we also didn’t know how challenging it would be to develop. But now we see that it’s one of the most requested features and we are also confident that we can deliver it.

First we will focus on oxygen in space ships (grids). The algorithm will traverse through the volumetric grid, check if there’s a closed or open area, and if the oxygen can expand or stay contained. We may use solutions already developed for conveyors (it’s an obvious graph traversal / flood-fill algorithm).

The next stage will be planets, which will basically be asteroids ranging in sizes from tens to hundreds of kilometers across. We need to be careful with the expensive procedural generator here and the simplest optimization is to avoid generating terrain for volumes that are too far from the planetary surface (because they are almost always full or almost always empty and there’s no need to run the generator there).

Then we will need to add some sort of terraforming: oxygen generator, trees, grass, etc.

One of the open questions we haven’t decided yet is how to place station blocks on planets. If we keep our axis-aligned approach and the player starts building a station at some place on the planet and then keep adding blocks to it, soon the blocks will deviate from planet’s spherical surface. One idea is to allow rotation of the base block and so the player could align the station with the spherical planetary surface. The other idea is to add a new type of block grid: one based on spherical coordinates.

Also, we still don’t know if oxygen will just be an aesthetical function. We need to come up with the advantages that players without helmets or suits would have - something that can only be done if the character has no space suit. Otherwise nobody will take off their helmet and the whole point of air in spaceships will be lost. On the other hand, we can’t penalize players in suits because that’s how almost everyone plays the game now.

A natural landscape generator, trees, grass and sky are already finished - thanks to Medieval Engineers.

DirectX 11 and optimizations

During the development of Medieval Engineers we created a brand new DirectX 11 renderer. Its main feature is PBR (physically based rendering) that allows us to define surface textures with very realistic appearances.

EDIT: Older DX9 renderer will stay in place (for those who don't have DX11 hardware)

Additional benefits:
  • multi-threaded rendering
  • more efficient processing of generated geometry (e.g. grass)
  • smooth LOD (level of detail) transitions based on screen-space object dithering (no popping)

This new renderer will soon come to Space Engineers. Our artists have already started work on finishing our 3D models up to their final quality (you may have noticed that most of the models in Space Engineers are just temporary concepts, low-poly, no textures).

We are keeping the original art style and just making the models prettier. During this change we will also reduce unnecessary polygons and add multiple models for LOD optimizations (LOD means that objects in the distance are rendered in a lower quality). The positive thing is that we can keep working on this iteratively, block after block.

Multi-core physics and optimizations

Havok is a physics engine developed by Intel and we use it in Space Engineers and Medieval Engineers.

Havok is able to utilize multiple CPU cores for its physics calculations. At present our games don’t support this and some work on our side is required to rectify this.

We will need to handle callbacks from Havok to our game, so that when they are triggered from different threads they will not cause any problems. For example, when Havok detects any contact between two physical bodies, it sends a message to our game so that it can play a sound or render a particle effect.

The other big piece of work will be extending thread safety in voxel polygonization and procedural generation. Right now this runs asynchronously (so the game doesn’t lag when large terrains are requested), which can be a problem in situations where Havok needs real geometry to calculate potential collisions between objects that suddenly approach each other.

Benefits of multi-core physics:
  • faster calculations = less lag in critical situations
  • ability to compute more objects in a world, e.g. massive count of debris during structural integrity collapse in Medieval Engineers


The bottom layer of our networking engine relies heavily on Steam networking and we can’t use this on the Xbox One port of Space Engineers.

The new networking library we chose allows us to better control message and channel priorities and reduce multiplayer lag and waiting periods.

This upgrade comes thanks to our decision to port Space Engineers to Xbox One and in future will lead to increased platform independency of our game engine.


Thank you for reading this!

For the latest news on our games, follow us on Facebook or on Twitter.

Space Engineers on Facebook: https://www.facebook.com/SpaceEngineers
Space Engineers on Twitter: https://twitter.com/SpaceEngineersG
Medieval Engineers on Facebook: https://www.facebook.com/MedievalEngineers
Medieval Engineers on Twitter: https://twitter.com/MedievalEng