Building a universe ain’t easy

Originally I wanted to write about a more specific problem, related to how to use the background in a 2D game to view the surrounding explorable universe, but because these things are so bloody interconnected with one system or another or all of them, it’d be a mess to start from there.

So lets start from the basics.

I’m building a universe. Quite literally.

Sure, it may be massively simplified, uses lots of abstraction for performance and gameplay reasons, be intentionally flat in the platformer style 2D side-view sense and maybe use a truck load of illusions to keep it managable for a modern home computer, but its still a proper universe. Its persistent, consistent, dynamic and alive, much like the one we have in real-life.

Its feasible in theory and I’m currently building the design framework on how to construct the actual thing. The components that make it up already exist in the world and have been proved, but appear scattered individually across projects, not together in a single system, which is what I’m trying to do.

Its far from simple however.

While I do have the methods to design such a game, both from a user perspective and from a technical one, I’m dealing with design challenges that involve many interconnected systems, which takes lots of analysis and research in figuring what those systems could be, how would they affect other systems, what is possible with those systems, are there alternatives to those systems, are they even feasible to implement and are they actually good.

Thats a lot of thinking that needs to be done to find the answers to those questions. Finding the answers often require a state of complete concentration where the mind can visualize all the systems at once to be able to see the problems, flaws, strenghts and opportunities, which is a mentally exhausting process, draining all my creative power for a day in a few hours. And thats only granted if I don’t have any major distractions during the day to do so.

Still, back to the universe thing. Whats the point, why make something so complicated?

Because it matters.

As blunt as it may sound, making such a game that simulates a universe is the only thing worth focusing on and doing rather than putting effort towards smaller, more limited projects. The difference here is that a game that simulates a universe is infinite while a game of limited scope is a throwaway product. Making games, especially good ones takes years and lots of work, so the notion for the user to exhaust that work in mere hours or even minutes is absurd, considering the user will want more of it regardless.

A single super game that is basically a universe simulator, a platform for stories to be told, for new stuff to be added and the creativity to be expressed meaningfully outright renders thousands of limited-scope games instantly obsolete. It would be stupid not to make such a game. Think of all the art and game engine work people redo all the time for every new project, just to make yet another throwaway game only to leave a player wanting for more when that could have been achieved from the very start by shifting the design to enable that infinity. I’ve already described about it in detail in a previous blog about infinite games.

Lets clarify what a universe simulation game is.

The idea of a universe simulation at its core, is to build a platform on which stories can be told through gameplay by the players. On this platform, its possible to add new content created by the users either as creative expressions or solutions to dealing with challenges in the universe.

The whole game is not just a meaningless sandbox either, there is a greater overarching goal/theme or something that encourages the player in some direction, giving a coherent direction to go towards while playing the game, but it doesn’t force itself on the player. Its similar to how people in real life have an overarching goal, to find happiness, to which there may be obstacles or challenges that oppose that goal, but there an unlimited ways of reaching and failing that goal, which is what makes it so interesting.

Your not being controlled in anyway and you’re free to do anything, but there is an encouraging endless goal provided to you that can set you on a path. As for where that path takes you, what adventures you get into as a result of that path is the basis for the gameplay and the situation you find yourself, instead of an author putting you on rails with a scripted scenes.

Now lets get technical, what does it take for this to work.

Since the idea is to create a platform that enables situations to happen and stories to occur, we need a universe that behaves like the real life universe does in a broad sense. There needs to be physics, matter, forces and beings that create a living world, where things born and die. The cycle of life that is governed by the properties of the world.

A player is put into this world by giving one the control of a living sentient being, like a human or anything similar capable of thinking and then they are free to do whatever. After that, they first survive, then thrive and then discover the great overarching theme, which will be the instigator for infinite adventures and campaigns within the universe.

The universe needs to be consistent, persistent and dynamic.

Consistency comes from standardization, where the raw materials, the atoms that everything is made from decide what something is, what is its potential, what limits it has and how it behaves. With this, every new piece of content added to the game is automatically compatible and balanced just by defining what its made from. There are no arbitrary values or guesswork when creating a new object. For example: If you take 10kg of wood and make a table out of, then you’ll have a table that weights 10kg and has the properties of wood.

Persistence comes from recording where things were left so we can come back to see them. Whatever you do in the world will have consequences and they can cause something to happen in the future.

The dynamic factor comes from the universe generating events based on its properties. As time passes, there is a chance that an event can occur somewhere that such an event is likely to happen. For example, if you have an atmosphere on a planet with a weather system, there is a chance of rain to occur. Or if you plant a seed somewhere, it has a chance to grow into a forest over time. Or a lifeform may develop on a planet that can sustain it and thus cause a civilization to appear there.

Lets see where to start when building a universe.

To start designing a universe like this and ensure the qualities required for it, you need to start from the very basics of what makes a universe be one at its very core. This means defining the very basic things like forces of nature, atoms, radiation, matter.

Just to clarify: The game does not simulate every single atom in an object, instead it acknowledges their existence along with the forces that govern and influence them, using only their principle idea behind them, but simplifying the actual implementation as much as possible.

For example, instead of simulating thermodynamics on an atomic level, just simplify it by having a temperature variable, a number. Then on the material, define what happens to it at certain temperatures, like if a puddle of water is above 100 temperature, then make it boil and become vapor. Its simple as that, no need to simulate anything more complex here than this. A number is used to measure the status of an object and when those numbers cross a certain value, a reaction defined in that particular material takes place, which can be a change in another status variable or a physical action.

Why is consistency so damn important again?

By the way, I have to point out that the above concept is actually a ready solution to a previous question I had about “how to encourage and ensure consistency with all content?”. I might talk about it in a later post individually, but for now I just wanted to highlight that the above knowledge came to me only after long and hard research by asking thousands of related and unrelated questions to figure out how to create a universe simulation for a game.

Infact, the idea itself of a universe simulation for a game was realized only much later once I had tackled many thousands of question one after another. The process itself started as I was a content developer for Cortex Command and saw the many issues with the system, that if left unsolved would have a wide range of negative effects that would make the game collapse on itself in the long run.

Some of these issues were with consistency, where there was no clear definition of what something is made from, what properties it has. For example, the game features human and robot characters. Along with that, there are a multitude of weapons and other devices of destructions, namely fire-based weapons and EMP-weapons; one is effective towards things made from flesh (humans), while the other was deadly towards electronics-based beings (robots), but if there are no standards that define that things made from flesh are supposed to burn, but be immune to EMP, instead using work-around solutions that check if that character was assigned within its metadata to an arbitrary group called “organic being”, in which case anything that was assigned to that group would then respond to the fire and EMP like it was defined, then not only is that system not flexible enough to accomondate special cases, like cyborgs, requiring exceptions, which further turn the whole thing into a massive bag of mess. When you add modding to the mix and the system does not encourage consistency, things get even more fucked up and ugly, leaving holes in consistency that ruin immersion, limit flexibility or just cause outright bullshit moments ingame.

And thats only the tip of the iceberg of the massive clusterfuck a moddable game without a proper consistency encouraging design can have. It is not sustainable and will ruin the game.

For this reason, I began to look deeper how this could be fixed.

For the consistency problem, I came up with the Molecular System which basically mimics how consistency works in real life, as in everything is made from atoms and these elements give properties to the object that define its behaviour. Ultimately, the modder and the user cannot interfere with such basic values like mass, temperature conductivity, friction and so on because they are automatically defined for them when they choose the raw materials to build an object from.

Similar idea is applied to energy and forces. Modders can use fire and plasma, but they cannot redefine its basic properties, like what is necessary for those chemical reactions to occur by the virtue of setting in stone how certain force works, how it appears and whats required for it to occur.

Constructing a universe is precise work

From here, designing a universe simulation for a game becomes an uphill in complexity as you add more forces to add to the system, besides just gravity and temperature. Aside from more status variables that can significantly change how a game will function, like pressure, electrical conductivity, magnetism, tension and torque to name a few, new forms of forces, like radiation, sound, wind, light, potential energy and many others further add new possibilities to gameplay.

The nasty thing here is that you must include them from the very beginning, meaning a universe simulation needs to be 100% fully designed before its put into production, as otherwise all the content in the game will become ruined if a new force element is introduced later in the production, rather than in the very beginning. It would akward if the universe did not know the concept of temperature and exist for a while, then suddenly get introduced to temperature and its devastating effects suddenly. A game intended to last forever cannot be developed with the agile software development methodology because this, unfortunately. The final product requires a waterfall approach to it.

Now imagine this: All these properties of materials, all these natural forces, basic principles like scale of the world, player optical visibility, universe seamlessness, special conventions like FTL, rendering starsystems, galaxies, planets and maintaining consistency within all that… try to put all that together in a coherent way that makes sense. At a single instance, picture in your head how the final game will look like with all that information loaded in your head at once.

But wait, theres more! Don’t forget to take into account performance and optimization to handle all the above requirements to run on an average modern PC at a decent frames per second rate. And if that wasn’t enough, make sure the design is structured to be infinitely expandable by other people, aka modders in all its aspects, from adding new materials, forces, reactions and objects that use those elements.

Does your head feel like going boom after a few seconds of trying to do this? This is what I go through every day and its both interesting and mentally exhausting at the same time.

Its possible to do if you go slowly and approach the problem little by little, but the overall process is still really hard and its possible to progress only a few hours per day before you need to rest for your brainpower to recover from such an intensive task of trying to contain a universe simulation inside your head to understand how to design it as a playable game.

But hey, building the ultimate game isn’t supposed to be easy, now is it? Besides, its so totally worth it, so fuck the difficulty of the task, we’re doing this anyway.

Carry on!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s