Building Viruscraft planetsPosted June 25, 2018 by Dave Griffiths
This blog post is about the Viruscraft world, how we came up with the idea and populated it with host species.
This is a screenshot of the current 'alpha version' of viruscraft we tested with the custom tangible interface (more on that soon) during the second game testing workshop. You can read Amber's report on this workshop here. It took a while to develop this planet, we started with a more conventional system:
his was a planet modelled in blender, the idea being to create islands and regions for different host species to live. We automatically made zones for different species to live (sea and land mainly but also higher terrain is possible) and then populated this with host organisms. There are two problems with this approach, one is that it's a static model - we could have a set of variations on planets but e can't change the terrain. One of the initial obvious references we talked about to the Wellcome Trust was Minecraft - which allows players to modify a procedurally generated terrain. Another problem with this is that if we look at our initial mood board for the project, where we collect artistic references:
There are lots of interesting ideas here, including perhaps using geomtric virus shapes in an interesting way. There is a problem I've seen on many games projects where if there isn't a strong artistic style at the start, a more photorealistic logic takes over and pushes things into less and less interesting territory. So we decided to try something a little stranger and more interesting - could we create worlds built from triangular sections of terrain in the same was as viruses are created from triangular proteins?
There is also a distinct advantage to a procedural technique we can do with modular world building because the shape of the land affects how viruses spread - the number and physical location of population clusters has a big affect on how difficult it is, as a virus - to spread and become successful. The more dynamic and controllable we can make the world, the more interesting the game will be.
We chose a shape called a 'Pentakis icosidodecahedron' - basically an 80 sided sphere built from triangles. One mistake I made with this was to not read the mathematical fine print - it took quite a lot of swearing before I figured out that it's not regular, some of the triangles are equilaterals and others are isosceles. This means we have to squash and stretch the components to fit precisely, otherwise there are gaps between them.
Once we can arrange the triangles in the right places we need to make sure the terrain edges match up. It turns out there are 8 possible arrangements - from all sea, all land to the 6 varieties of crossings that can occur between the edges of the triangles:
We can also control the probability of a triangle of containing land, and use a slider as a sea level setting. Roughly speaking, the more unified the planet - the less, bigger populations possible and the easier it is for your virus to spread. The more fragmented and diverse the populations, the harder it is.
We'll be adding more controls here in the future, so you'll be able to customise your planet quite a bit more. We then made some animated low-poly host creatures to populate the planet. These have receptors for the virus that match the different shaped ligands - they breed and evolve to gain resistance to your virus over time.
In order to place them correctly on the right habitat we created some test 'flat worlds' to make sure everything was lined up correctly. It works by calculating barycentric coordinates in each triangle based on the particular terrain section, so we can generate a random location and check if its land or sea.
Another possibility is to have different themed planets, an ice world, urban planet, etc - perhaps rather than creating them you could explore a galaxy planet by planet. One important idea that came from the feedback would be to use the 'difficulty setting' that we've figured out from the terrain composition to provide tutorial levels that you could work through in increasing difficulty.
Created: 15 Jul 2021 / Updated: 15 Jul 2021