• entries
    22
  • comments
    118
  • views
    29531

About this blog

Ponderings of someone in over their head...

Entries in this blog

Embassy of Time

I recently had a very fulfilling conversation with an old buddy of mine. It was about an idea I have had for a while now about how to create artificial life for my game. For those who do not know it, most other procedural generation of life is basically like those cardboard faces some of us made as kids (y'know, before kids were basically born with internet access. Those were desperate times, I tells ya): You have a set of long, thin cardboard 'boxes', one for each of hair, eyes, nose, mouth, and chin/beard, and then on each of the long thin thing's sides, you draw a different kind of hair/eyes/nose/mouth/chin. Then you can flip them over to mix and match and create new faces. In much the same way, a game like No Man's Sky mainly takes heads, body types, legs, maybe tails and horns and such, and mix a bunch of standard premade ones together into a new creature. Add random color for fun. Anyone who has followed NMS let's plays on YouTube know that after a little while, the creatures start to look closely related in pretty dumb ways ("hey, that guy has the same antlers as the one on the other planet, but why does he only have two legs??"). This is not, in my book, truly procedural creation.

As with most other things in the game, I like to take the scientific approach to things. That includes life. Although I hope to soon write an entry in my SCIENCE (biatch) series about this, I thought I'd throw the basics of the idea into public and see if someone has interesting comments on it. It is based on something called chemotaxis, which basically translates into "chemical movement". In super-short, very early life on Earth (just single cells, long before animals and plants) developed from little blobs of fat with DNA inside them, and the DNA changed every now and then when a new blob was born (we call it mutation). The blobs that survived and made new blobs were the ones that had changes that made them act in useful ways. One such way was surprisingly simple: Spaz out when things aren't going your way! Yes, the origins of complex life can be tracked back to blobs of fat having a temper tantrum. Puts modern life into perspective, doesn't it?

The reason is that when a blob spazzes out, it ends up moving around a lot. If it spazzes out due to toxic stuff in the water (early life was NOT on land), that means a greater chance that it gets away from the toxic water. So blobs that spaz out from toxic water survive. But the real prize is an even more human-like tantrum: Spazzing out when there is no food around! That means a blob does not stay long in places with little food, and stays longer (i.e. does not spaz out) in places with more food. That's good for surviving.

It seems insanely simple: Spazzing out to get away from dumb places makes you stay alive longer, and make more baby blobs that do the same. But that's one of the very first keys to life. And that makes it seem like a good place to start creating artificial life, too! So here is the idea: Scatter thousands of dots around an area. Give them some basic attributes: Move, turn, make a new dot, or die. Oh, and one vital ability: Create some other random dot, which can't really do anything, it just has a number. The dots with all the abilities we call "cells". The ones without any actual abilities we call "chemicals". And when a cell meets a chemical, it reacts in a random way, either raising or lowering an ability, or creating a new chemical.

The trick here is that every time a new cell is created, it has the same abilities and reactions as its 'parent'. So if a cell's parent reacted to chemical #7184 by spinning slowly clockwise, then the new cell does the same. Every now and then, a cell has a tiny difference (maybe it spins counter-clockwise, or slower or faster, or not at all). That is mutation; you do roughly the same as your parent, but with your own little twist on it. So now, let's think how these cells may start acting. And note that this is only guesswork, as the tests have not been programmed yet (I'm still on creating mountains procedurally, and valleys and erosion and maybe even atmospheres are next on my list).

HOW THEY MAY ACT

You've created your thousand cells and let them create new cells and probably die for a few minutes, and a few mutations have shown up. Some cells react to a chemical by dying slower (and thus having more time to make new cells). Others die faster from another chemical. Others move slower around certain chemicals, not unlike in chemotaxis. Over time, the ones with the better mutations will get around to making more copies of themselves, thus filling up the place with themselves and pushing weaker ones out. Survival of the fittest.

But this was not what made the conversation between myself and my friend intersting. What did that was thinking about possible activity further down the road! Imagine a cell that turns one chemical into another chemical, which is lethal to certain other cells. That 'killer cell' would be able to smite any opponent that died from the chemical! If the killer cell turned chemical #2084 into chemical #5339, and its rivals died from #5339, the killer cell would survive best in places with a lot of #2084 floating around. That means that the killer cells would lurk in certain areas, near cells that produced #2084. Like a lion lurking in the bushes, ready to strike at those #5339-sensitives foolish enough to wander near. That would leave more food for the killer cells. And one idea was to have all cells contain chemicals for a bit before using them, releasing the unused chemicals on death. That means killer cells could evolve to kill other cells for their chemicals. And you have predators! Not the alien kind, though, just simulated cells.

Let's imagine more. What if cells of type A produced chemicals that were really good for cells of type B? B would survive best if it evolved (i.e. its children cells mutated) to follow A around. This is just chemotaxis over again, with the exception that the source of the good stuff is moving around. So now you have 'parasites', so to speak, following another type of cell around to snack off whatever it leaves behind, like seagulls after a ferry snacking on dropped food. But let's push it further: What if cells of type B produced something that cells of type A could use? This is symbiosis, where different species live together because they help each other unintentionally, like those birds living off what they find in a crocodile's teeth, and the croc thus getting free dental care (yes, those birds exist). Clusters of A and B would likely end up roaming together, because those that behaved in ways that kept them together would survive better.

Or maybe let's combine these ideas: What if A produced something that B used to kill its rivals with? And what if those rivals were also the rivals of A? That would basically be cell type A using cell type B as a 'living weapon' to kill its enemies! Or maybe B makes chemicals that attract other cells for A to kill and eat. Or maybe B attracts cells of type C, which are the ones that A can actually benefit from! That makes the symbiosis a bigger system, with different cell type depending more and more on others, to the point where you no longer even think of them as individual cells, but as little cell systems surviving together. Even with thousands of cells in the simuation, you may end up with a few dozen actual 'cell systems' moving around almost like living beings of their own. And what do you know, that's almost(!) how bigger creatures evolved, by cells sticking together to benefit each other! Have a single cell type evolve to produce a safe environment for the other types to thrive inside, and you basically have the very first multi-cellular organisms...

This is a simple idea taken to extreme possible conclusions. But the point isn't whether or not the results will be exactly like described; the point is that it's a simple system. It's a very simple thing (a 'cell' dot that can move, turn, copy itself (with the occassional mutation), die, and react to the 'chemical' dots) that may or may not evolve on its own into something more interesting, one little change at a time. Even if cells only react to half a dozen chemicals, the results can be insanely complex, creating weird patterns and relations between cell types.

It's definitely not just swapping a goat's head onto a horse and giving it afunny tail and painting it bright yellow.

CanA,t wait to try it out!

Embassy of Time

(other entries in the series: 1 2 3 4 5 )

I am about to reenter one of the most difficult thinking challenges I have ever dealt with. The work I did in an earlier version of the game actually surprised me in how far I got. Now, I am going to have to repeat that, and afterwards, I'll have to go farther. We're talking about geology, the shaping of worlds.

What you see in the picture is the comparatively simple prelude to that. I have spent the last few days making craters work, and now, they look fairly good. You're looking at a star above a rocky crater world, not unlike Mercury. Not amazing by far, but good enough for me to accept for this version. Craters actually handle a lot of what you will find in space, since most planets have limited geological activity, but when things get more complicated, they get a lot more complicated...

GEOLOGY

Because it is a topic I have already done a fair bit of work on, I will be going deeper into geology than other topics. Basically, the word means "talking about the earth", as in the earth beneath our feet, not the planet Earth (geo = earth, logia = talking, explaining). But in daily terms, geology takes more interest in the wde variety of materials you might find the ground to made of, not just earth; sand, rock, clay, even lava and magma. Soil is studied more in boilogy, or the soil-specific field of 'pedology'. For our purposes, it's going to be mostly about rock, and the planet Earth.

What we know as the Earth is actually a tiny, tiny part of the planet. The solid surface is often described as "the skin of an apple", the apple meat inside being very different things (incidentally, yes, that's also how many scientists describe the atmosphere around the Earth; the solid surface and the air covering it (the 'atmosphere' we know is mainly the low 'toposphere') form roughly the same thickness of layers, each about 10 km thick). Beneath it, heat, mostly from decaying radioactive atoms trapped inside the Earth, helps keep the rocky masses of the planet in a semi-liquid state, often described as 'gum-like'. It moves about, slowly, because the hottest parts deep down rise up, forcing the cooler upper parts down, where they are then heated and in turn rise. This constant circulation of rocky material is called convection, and the flows of material up or down convection cells, or simply convection currents. Something similar is used to make lava lamps do their gooey job.

Deep down, about halfway to the center of the planet (the Earth has a radius of about 6000km, so we're a little over 3000km down now), we find the Earth's molten core. My apologies to hollow-earthers, but you're all a bunch of deluded morons. The core is made mainly of iron, because the biggest stars stopped fusing atoms when they reached iron, and scattered all that iron in their supernovae. The immense heat keeps the iron liquid as it spins around along with the rotation of the Earth, but inside the core is a solid second core; the pressure of all that rock and molten iron on top of it pressed the iron atoms together until, in defiance of the heat, they become solid iron. The liquid outer core and solid inner core do not spin exactly the same speed as the planet, though; the inner core spins a bit faster than the planet, and the outer core spins a bit slower. When you stand on the Earth, imagining the cores beneath you, the inner core would thus seem to spin a bit eastward (the Earth spins eastward, which is why the Sun rises in the east, and the inner core does the same, just faster), and the outer core seems to spin slowly westward (the Earth is spinning a bit faster, and thus seems to 'pass it by', making the outer core seem to go backward, i.e. spin westward). All this spinning makes the cores act like huge magnets, their component atoms spinning like electrons in coiled wires. This magnetic field makes up the Earth's magnetosphere, which is what magnets in compasses can detect. Also, it keeps particles from the Sun from scorching us, because those particles get magnetically sucked to the magnetic poles of the planet, where they either zip past us or crash into the atmosphere as aurora, like the Northern Lights.

Stuff like this seems very background-ish, but in a full space game, it really isn't. Without a magnetosphere, life has some hefty challenges, as dangerous particles keep beaming down on the surface, easily killing living cells. mars may have once lost a magnetosphere when its core slowed down, causing possible past life there to die out, at least on the surface. Sun particles blasting a planet can also change its surface chemistry, leaving atoms that would not otherwise be found there, millions every year, for millions of years.Electrical gear will be greatly affected, as might even weather. To create realistic planets, these contemplations are not the most important, but they are important, depending on the realism! But to us, a big part of their importance is in what other effects they have on a planet's development.

GEOCHEMISTRY

We already talked about molecules. Atoms snap together to form practically everything we see (except the light that lets us see it, ironically; that's made from photons, which atoms merely emit). So do they make rock, too? Yes. Rocks are basically oxygen and silicon atoms put together in huge grids, looking a bit like the hexagonal cells of beehives. Because the structure keeps being copied in all directions, it's called a crystal lattice. Rocks made mainly from silicon and oxygen are also called silicates. The purest kind, with only silicon and oxygen, in a perfect crystal lattice, is actually quartz, and the way the atoms are put together can be seen in the shape of the quartz, which hints at the hexagonal structure of the crystal lattice. Other crystal lattices found in rocks (any of which would be called a mineral by geologists, but not like the minerals you see in nutritional values on food) may have other atoms in the mix, such as aluminium (that is the correct spelling, thank you very much), magnesium and so on. Quartz with iron in it, for example, can become the purple amethyst, or the yellowish citrine, or with some magnesium, the green olivine. Other minerals have a broken up crystal structure, the hexagonal grid becomeing single or double chains, or even rings or scattered bits of silicon and oxygen held together by clinging to other atoms mixed in.

Today, those and other original minerals share the world with minerals from living creatures, now long dead. Shells and bones and such from tiny sea creatures have been crushed together to form such things as limestone on ancient sea floors, and then risen above ground through forces we will soon look at. Crystal structures have been altered by heat and pressure beneath the surface; rocks formed from molten rock cooling are called igneous rock, literally meaning "from fire", either intrusive igneous rocks (if they manage to cool while deep inside the planet, where the molten rock is called magma) or extrusive igneous rocks (if they cool after being spewed out as lava), while rock created from bits and pieces gathering in layers on the surface and being pressed together by massive rock layers over milions of years are known as seidmentary rock. If sedimentary rock gets heated greatly without completely melting, it hardens into metamorphic rock.

We can sometimes see the results of all this with our naked eyes. Different kinds of rock may end up in layers, after which the whole mass gets pushed up or has part of it scraped away over millions of years by water, weather or the like. In the end, we get walls of striped rock, each stripe its own kind of rock. And each rock is made of its own mix of minerals, which in turn give it a lot of different properties, the simplest of which include strength, durability against water, wind, acid, etc., weight, how it flakes (does it become sharp?), and so on. Next time you look at a stone slab, such as in an expensive kitchen table top, all those little bits of color are various minerals mixed by nature (or humans) to become that exact kind of stone.

GEOPHYSICS

On the big scale, things work differently. And then again, there are some similar points. Eons ago, when the planet was still a molten ball of lava (or magma, as we call it when it's not on the surface), the first solid bits of the surface we know today began to form. Two types of rock played the main roles: Basalt and granite. Basalt is very mafic, meaning it has a lot of magnesium and iron atoms in it. That makes it heavier than granite, making it likelier to sink into the depths of the molten rock again. But it also withstands heat a bit better, so basalt early on formed some solid 'ground' on the molten Earth, even if it was low ground and liekly to sink again. Granite is non-mafic (a.k.a. felsic) and thus lighter, but also easier to melt (basalt melts around 1100 Celsius, granite around 950), so it formed the higher layers. The first real land was probably the cratons, huge and mainly granite rocks floating about on the molten rock, just barely surviving. They bumped together and stuck together through molten rock on their surface, and new rock cooled on their edges or fell as dust and sprays of lava on them, becoming sedimentary rock over time. In the end, the cratons became large slabs of rock on top of the molten planet. And then, they began bumping into each other again. but rather than just sticking, these huge, slow, heavy plates, called tectonic plates, mashed each other's edge into new shapes, or simply bumped and shook the edges. Two plates grinding against each other without pushing too hard or pulling away will create such bad shaking that we see it as an earthquake. Plates moving away from one another (diverging) leave gaps that magma beneath can rush up through, while plates moving aginst each other (converging) force each other's edges up and down, creating mountain ranges (the process is called orogeny, if you were wondering). In some cases, typically when a low basalt plate meets a high granite plate, the upper plate edge rises as mountains, while the lower gets pushed down into the deep to melt again, a proces called subduction. Basalt plates typically form ocean floor, being low and all, while granite ones form continents. Other rock gets mixed in or layered on over time, of course.

The way tectonic plates shape the Earth have been studied for only some decades, because it took a long time for people to accept that the world was not just made as one piece, but as huge puzzle pieces that move too slow for us to truly see (except not really; in Iceland, two plates are pulling apart, ripping the island slowly in two. You can stick a rope into either side and leave it slack, only to find it taut hard a few months after, because the two sides are pulling apart. If you know your stuff, you can do similar observations on other plates). Since then, a lot of study has gone into simulating exactly how the features of the Earth's surface are formed and warped by these forces.

AS FOR THE GAME...

As stated, I am working with these things right now! I have simulated very basic tectonic land formations before, and soon will again. The principles of how these forces work are better known every day, and my main job is to translate them into math, and then game graphics. This is not, however, as easy as it sounds, even if it doesn't sound easy at all. But the principles are there, and that is half the battle.

What this kind of procedural generation does is add a sort of personality to the landscape. Regular procedural generation usually uses 'perlin noise' and fractal concepts, which just means it creates a pattern of randomness that it uses over and over again, at different scales, merging the results together. A bit like taking a photo of yourself and overlaying it with four smaller copies, then doing that again for each copy, and so on. This is why in many games, you can look at a landscape from a distance and get the distinct feeling that it has a repeating pattern. But more annoyingly than repeating patterns, it also means that everything is more or less just a fluent mix. Patches of mountain show up here and there and then plains or sea or something else takes over again. Mountain ranges, winding valleys, coastal cliffs and the like do not form well with this method, if at all. Traditional procedural generation is, to sum it up rather crudely, patches of bumps.

A simulation more true to the scientific principles described (and other principles not described) has a better chance of making the landscape distinct. You do not just find a patch of tall bumps (or dips, if the bumps are turned on their head, which is a common way to make quick canyons and valleys), instead you find ranges of mountains running across the landscape where plates meet (the Alps, the Himalayas), likely not far from a coastline that they roughly follow (the Rocky Mountains, the Andes). They play a role in the shape of the world, but they also stretch. Patches of mountains are more like a blob, they rarely stretch out. Mountain ranges stretch. That's the difference between a parking lot and a highway; the highway stretches, the parking lot is just there.

The geochemistry is another interesting matter. In our last journey, we talked about how a 'chemistry engine' would allow new materials to be made in game, without the tacit approval of a game creator. The things are defined by how they get put together, not by what some designer wanted to exist. Geochemistry is the other side of the coin, the side where things are found. Remember those stripes on the side of cliffs, canyons, valleys and mountains? Those minerals are where we get a lot of our modern raw materials from. Red stripes (they are technically called bands, but googling 'rock band' is just not productive when doing geology) are usually iron oxide, as in rust, as in where we get some of our actual iron from. Good mineral ores are valuable in the modern market, and were valuable to those who knew how to use them in the past. Such minerals are used in everything from drywall to toothpaste, and when metal is extracted, in even more things. The aluminium (correct spelling!) in your car or aluminium foil comes from rock dug up from the ground (often bauxite). Most copper today comes from chalcopyrite, although cuprite is a way prettier rock. And you would not be reading this if nobody was extracting tons of silicon every year, of course!

For a game with a very limited scope, none of this has much value. For a single world that looks much like our own, a 'bumpy slab' of various mountains and simple valleys work great. In fact, few people notice that almost all big games use just that: A flat area with bumps and dips added semi-randomly. Unless everything is in buildings or cities, of course. But for variation, that is a risky method. No Man's Sky has gazillions of worlds.... or, as one critic put it, six worlds, which are mainly color swaps, and then tons of each, with a few hills looking different here and there. That's what the old method gives you: Blandness. Mountain ranges, coastlines, cascading canyons and other things made by tectonic activity and the differences in how quickly or slowly various rock gets worn away create real and interesting landscapes.

Oh, and one thing to ponder: If a world is so cold it is mostly made of ice or other frozen materials, the forces that shape rock will instead shape that ice, forming ice valleys, ice mountains, even ice volcanoes (yes, that is a thing) and rivers of chunky, semi-molten ice. Worlds made from other things will have other landscapes. Maybe a planet has such a massive iron core that molten iron runs like lava, forming islands and continents. Maybe the crystals are not ground down into bits of minerals, but amethysts rise from the ground to form true purple mountain majesty; caverns like that have already been found... on Earth. This would take ages to design on purpose. With good procedural generation and a clear grip of geochemistry and geophysics, it might just be yours far quicker.

Embassy of Time

This was not an entry I had planned on making, but I am in a weird state of mind right now. Bad weird. I just buried my kitten, Egon. I live near a road, and that road is a bit infamous for killing cats. Back in january '16, a friend of the family gifted me with a lovely black cat, named Bastian, and just having the little guy around lit up my life. But as months passed, he became more playful and impatient than I could put aside time for, so I decided to get him a few playmates. At the time, I saw no other cats around, so I figured he was lonely. That would turn out to be somewhat ironic, but more on that later. I found someone who had three kittens they could not handle, and took them off their hands. All females, and I named them Alex, Charlie and Dylan, from the movie Charlie's Angels (except Natalie was too weird for a cat, so one was just Charlie). Bastian was not that fond of them, to be honest. I, however, instantly fell in love with the little things, as I had with Bastian. Keeping things cool between the three and him was a chore, but there was nothing to compare with the feeling of those little furballs tugging their noses into your side at night and purring away as they fell asleep. I have not been that happy in a long, long time.

The first warning signs were probably when I went off to work one day. The three girls suddenly insisted on running after me, having been introduced to the outside a few days before. I shooed them home, and they went, but as the bus began rolling, I suddenly saw them running around on the road behind it. It was a horrible day, and when I got home, I spent two hours walking the road, trying to find them. I did, luckily. They were on the wrong side of the small road, afraid to cross. I got them to safety, and started being very careful about their freedom. But in time, I had to let them outside. I live in the countryside, so there is not that much danger, and they wanted to catch mice. Besides, Bastian had never had any problems. I was naive, I know that now. I was stupid, and I fully deserved what I got. Only they deserved better.

Alex never came in for food one morning. I found her by the road, in pieces, spread across a sizeable area. It took me two hours to find most pieces, just to bury her, and I only found half her jaw the next day. That was ten days before last Christmas. I was not worth much on Christmas. I found out that we have illegal streetracers in the area, which explained what had done such horrible damage to her, and I began keeping them in during the night. In the morning, they would jump at the window to get out and play and chase mice. Streetracers never raced at that time, so I let them. I was naive, and deserved what I got. Again, they deserved better. I found Charlie by the road only a month after losing Alex. She was in one piece. A regular hit. I found out that the streetlights are pretty pathetic here, with long dark stretches between them. She had been hit right in the middle of such a stretch. From then on, Dylan and Bastian were not allowed outside during any dark hours, not even in heavy fog. Bastian objected heavily, and finally won the right. Dylan did not. Around that time, a small kitten looking a lot like Bastian was found following people about a mile down the road. I thought he might be his kid, and adopted the fellow. On my way home with him, an exact copy of Bastian crossed the road, proving me wrong. But the kitten, Egon, became part of the family. I loved him like the rest. Little over a month ago, Bastian never came back. He was not dead in the street. We had had a stray cat enter through the cat door and mark (yes, pee) all over the furniture, and Bastian had not been pleased. It had been the proverbial drop (no pun intended), and I have not seen him since, dead or alive. Some say they have seen him in the nearby woods, but I have not found him.

Egon got hit in bright daylight, no obstructions to sight, no nothing. Some jerk just had to get home a bit too fast and/or was on the phone. There is not much traffic out here, but I did note that people drove like idiots in the after-work hours that day. I went out to get Dylan and Egon early. He was still warm and soft when I found him. He only started bleeding minutes after I had carried him inside. A few minutes, maybe even seconds, was all the difference, and he was gone. I still have Dylan. She is never going outside again, unless in a harness. She is not pleased about it, but I will be damned if I lose more to that road. I edited out a lot of F-words from that sentence.

These last few months I have lost a lot. The kittens, and my dad has been diagnosed with ALS, so I still have him, but not for long. I lost my mom in '13 to cancer. I know my best childhood friend died from AIDS a few years back, and family and friends have been dropping like flies. I would be lying if I claimed to be a happy fellow these days. Even smiling is becoming a work out regiment for me.

I once saw a video of someone playing The Last Of Us, talking about how the emotional contents of the writing are powerful, especially Ellie, the girl character in the game. I never played the game myself, but while I understand the notion, I have a problem with it: She is not real. Sure, I can get emotional about movies, even songs or short online videos, if they hit a nerve. Games, too! But a game character is written and designed. If done well, something emotes inside you. But that's not the issue. The issue is that you cannot truly lose a character like that. She is always there. Just restart the game, and she is there. The story may hit you hard, but there is never a real loss, I would argue, because nothing is ever truly gone. A lot of the time, even the loss is not 'real', because it was designed as a part of the story. In the original StarCraft game, a soldier is lost in a battle, and she returns to the story as an alien queen. I loved this story when I played through it, but it lost a LOT of impact when a friend showed me how he played the level where she was supposed to be lost. He was a clever player, and he managed to make it impossible for her to die. The game finally had to force the issue by just cutting away and declaring her lost. Game characters cannot, in my mind, be truly lost.

But what if that just says a mile about current games, and not an inch about future ones? Procedural generation is still in its infancy. It creates generic-looking worlds and quick, disposable items and, more importantly, characters. Those characters are extremely simple, barely even worth calling AI at all. We all know the "arrow to the knee" meme from Skyrim. Procedural characters are never "well written". But what happens when someone figures out how to create deep characters through procedural generation? You meet someone in the game, and they have a background story, an interesting personality, seemingly unique and even somewhat believable. Not true sci-fi AI by a mile, but a well-written character that nobody really wrote. How will we feel about such a character? More to the point, how will we feel about the loss of such a character? You could argue that none of my kittens were really advanced. They had their own little oddities (I buried Egon in my old pants, because he loved to sleep inside them at the foot of my bed. Both Alex and Charlie were buried in boxes they loved to play in), like favorite toys and foods. They even had a kind of simple personalities; Alex was a fighter, who killed birds as big as herself even when she was just a month old, Charlie was a sneaky one, stealing the food of others, Egon was ADHD all over, constantly playing in my papers and any piles he could find and spread throughout the house. And as stated, Bastian refused to accept being locked inside the house, even if just for a few hours. Dylan, meanwhile, is twitchy and loves to burrow (if I raise my knees while under covers, she will dart in and hide beneath them). Those are not advanced traits, but they are/were their traits, their personalities. Any pet owner knows that you cannot help but spot such things after a little while, and they mean a lot to you. So what happens when procedural, essentially unique, game characters become compelling enough to show such basic personalities, or even more? Will the loss of an artificial pet, ally, or other mean the same to us? Will we keep backups of not just save points, but of individual 'loved ones', to load into safe worlds to meet again, long after they die or are lost in the main game?

Anyone who watched the old Arnold Schwarzenegger movie "Sixth Day" may have pondered some of this. The movie deals with cloning, but a lot of it transfers to this, easily. One example is the scientist whose wife has a terminal disease, so he clones her again and again. Is the clone still the one he loved, or just a carbon copy? Can we tell the difference, emotionally? If a game generates a truly unique character that you become as invested in as in Ellie, will you be able to emotionally distance yourself from it? How will it feel to lose a friend that never physically existed?

I don't know. But Dylan just complained that I will not let her out. All I can think is what I would give to have the ability to reload Alex, Charlie, and Egon. I hope every day that Bastian suddenly shows up. Would reloading a loved one feel like that? "Hey, I was lost, but now, I'm found"?

I miss them.

Embassy of Time

(other entries in the series: 1 2 3 4 5 )

No picture today. I'm doing some heavy updating to the movement of objects on scales ranging from galaxy-wide to dirt-under-your-feet wide, and it's moving forward.... with significant resistance. It, too, will soon bow to me! But trudging through 0s and 1s to make things look not dumb is a tedious enough job to let my mind wander, and that is a great way to think over our next step in making a universe from SCIENCE. So... come on, lets get chemical, chemical, I wanna get chemical, chemical....

(my apologies to readers too young to understand that reference. I suffer from being not-young...)

CHEMISTRY

First off, I'm a teacher, and as a teacher, I would like to let you know that everything school tells you is lies!!! Hideous, meanspirited lies, dictated by dark creatures in secret bunkers, who loathe you. There. With that out of the way, here's a few raw facts about chemistry: It's not that difficult, you don't need math to understand it (but you do to use it properly), and you'll gain mental superpowers from it. Seriously, understanding even the basics of actual, well-described chemistry lets you see the world from weird perspectives. Sadly, schools prefer the "avalanche of useless factoids" approach to teaching it, so please allow me to undo what they have done so wrong to you. Forget everything about chemistry you learned in school, and just focus on what I now tell you:

Atoms. They have positive protons in the core (the nucleus). These protons repel each other but attract the negative electrons around them. Even if another atom is already holding on to an electron, another atom might grab it. And when atoms grab electrons, chemistry happens. That's basically it: All chemistry is just atoms fighting over electrons. When things heat up, it's usually because electrons are getting ripped from one atom to another, and anything in the way gets knocked about by the electron as it moves. Atoms that are excited (i.e. atoms that have been knocked about, yes, there are S&M implications in this part of science) are what we feel as 'heat'. More excited, more hot. Less excited, less hot.

The big deal about this is that different atoms have different strengths to pull on electrons with. See, if an atom gets a certain number of electrons around it, they clutter up the space there, and getting new ones becomes difficult (remember, these negative electrons also repel other negative electrons, so they don't fit neatly around the atom). In fact, we have SCIENCE to work out how many electrons that fit nicely around atoms. The strength of an atom drops sharply after it's 2nd, 10th, 18th and 36th electron, just to keep it simple. And after a drop, the next size in atom has a little strength, the next has more, and so on. So atom number 9 has a lot of strength to grab electrons with, but number 10 fills that level of clutter up and can't grab onto anything through it. 11 then has a tiny bit of strength again, 12 has more, 13 even more, and so on. This strength is called electro-negativity, and it's really the one thing you need to understand to easily get the rest of chemistry. Yeah, if you understand "different kinds of atoms try to grab electrons with different strength", you're basically golden. Congratulations: You are now a chemistritician*.

(* - there is no such thing as a 'chemistritician', do not use this made-up word on any job applications. Or, if you do, please let us know the results!)

Everything beyond that is the result of using this to some advantage. A battery is just two materials, where one has higher electronegativity than the other, so it keeps stealing electrons. Except it steals them through a long wire, making electrons flow through the wire from one material to the other. Those flowing electrons are electricity. Or how about them acids, eh? To make an acid, just take a bunch of hydrogen atoms and use a stronger atom to rip away their electrons. Then, the hydrogen ions (any ion is an atom that is missing electrons, or has too many because it stole some from others) go around trying to steal electrons from other atoms, which can damage whatever those other atoms are part of. A 'base' or 'alkali' (they're not the exact same thing, but close enough) is something that likes to attach to those hydrogen ions. Sadly, it also like to take normal hydrogen atoms from other stuff, which can damage the other stuff. Or how about explosions, huh?? Same deal. If something yanks enough electrons from something else fast enough, it makes a lot of heat as the electrons go from one to the other. A lot of heat fast, trapped inside something, explodes. Powerful explosives (except nuclear bombs, which do not use this) are about making something that can very quickly steal many electrons from something else. One school lab favorite is to drop 'sodium', a dull, soft metal, into water. Sodium is made entirely from sodium atoms, which are pretty weak. So weak, in fact, that atoms in the water would rather steal electrons from it than from each other. And when a sodium atom has lost an electron, it becomes an ion, in this case a positive ion (it lost an electron, so it lost some negative charge, leaving it more positive). Just like protons, positive ions repel each other, so the damaged sodium atoms push each other away, exposing fresh ones behind htem, and atoms in the water go to steal electrons from the fresh ones. This happens so fast that yes, sodium explodes in water!

Materials that are not made from just one kind of atom use the fact that many atoms cling to their electrons, even when other atoms steal them (or try to). Like two dogs fighting over a sandwich, they get stuck together. Unlike the dogs, many atoms can stick together in big groups, called molecules. Glass, plastic, gasoline, and many other materials are just made from certain molecules, all stuck together. That's why acid or electricity or even fire/explosions can change materials: They tamper with the atoms inside the material's molecules! Tamper with enough, and the material is affected as a whole. Chemists know how to use this to change materials in useful ways, of course. Even in ancient time, people knew how to make tiny bits of electricity (you can make a battery from a lemon, or a potato, and a few bits of metal. It is just a very crappy battery), and they figured out that using metals for this made one of the metals fall apart, and then the tiny bits (individual atoms, we now know) would stick to the other metal. So they made tiny bits of gold stick to other metals, making the other metals look like gold. We still do that today, with many metals; it's called electroplating. Or they could dissolve stuff with the right materials. Because water is made from molecules with 2 hydrogen and 1 oxygen atom (that's why they call it 'H2O', hydrogen 2, oxygen 1, but you don't mention just the number 1), and oxygen is much stronger than hydrogen, the oxygen atom tends to kind of hoard the electrons. The two hydrogen atoms still hold on, but just barely. So with electrons staying mostly around the oxygen atom, they make it seem negative, and the hydrogen atoms get a bit positive because the electrons don't stay there much. That's why water sticks together so well, that you can pour a full glass and get that little 'bubble-edge' on top, which you always think should start to run over. That's because the positive side of water molecules stick to the negative side, like tiny magnets. Molecules with positive and negative parts are called polar molecules. But they don't stick to molecules that are neither positive nor negative (non-polar molecules), and most fat and grease and oil is made from non-polar molecules, which is why water is bad at washing that stuff off. You use soap. Because soap contains bigger molecules, which actually have parts that are positive or negative, but other parts that are neither! So grease sticks to the non-polar parts and water sticks to the polar parts of the soap molecules, and thus the water can finally pull away the grease as it washes over it! Chemistry!!

THERMODYNAMICS

A quick aside, related to chemistry. Thermodynamics ('heat movement') is about how, basically, hot things expand and cold things contract, and how hot and cold things change each other's temperature. Materials that don't hold too hard onto their electrons can transfer heat quickly, because the heat (which is just movement in the atoms, remember?) jumps from electron to electron better. That's why metal that is the same temperature as everything around it can still feel cold: Your body heat can escape faster through it than, say, the air.

One reason thermodynamics are worth a notice is that things that get pressed together heat up. All the moving molecules inside it get mashed together and hammer on each other, unless they can hammer on something else and let some of that extra heat escape. If something expands, of course, it gets colder, because suddenly the molecules don't hit each other that much. So pressure can control temperature: Push something hard together quick, and it gets hot (if you go nuts on a bike pump, it heats up, and you can even get special little pumps that can use pressure to set flammable stuff like wool on fire!). And if you press soemthing together and let the heat escape, and then let it expand, it tries to suck that heat back in. That's how your fridge works; a compressor on its back compresses some material and lets the heat escape, then lets the material expand and steal heat from (i.e. cool) your food. Or just blow a balloon up and put it in the oven or fridge. In heat, the air inside expands and the balloon expands. In cold, the air contracts and the balloon shrivels up.

But even moreso, thermodynamics are important because materials usually get solid in low temperatures or high pressure. Cold makes molecules move less (heat is how much molecules move, remember!), so they fit better together like puzzle pieces. High pressure just forces them together, whether they want to or not. Or heat and pressure can make something liquid, or a gas. So whether you are walking on solid gasoline or sailing on a river of liquid aluminium (yes, that's the proper way to spell it, 'aluminum' was a discarded spelling that a newspaper once used by mistake) is in great part up to how heat from something like a planet's star gets to the world, and how heat moves around tht world. And to make things even weirder, if you have something filled with low-pressure air and high-pressure air outside, the dense high-pressure air (there are more molecules, because they are pressed more together) is heavier, so the low-pressure air can make whatever it's in float. On air. Scientists are seriously discussing the option of floating cities on Venus, because Venus has air 90 times as dense as on Earth.

Or you could, you know, melt and freeze stuff to make something.

AS FOR THE GAME...

Come oooon, don't make me say this.You already figured it out. okay, then... chemistry is basically crafting for materials. Figure out how to swap atoms around between molecules (like mixing the right things at the right pressure and temperature) lets you make new materials. Whatever is naturally there on a planet just got mixed by gravity and the star's heat and other things. Even in our Solar system, there are freaky things, like oceans of natural gas on one of Saturn's moons, or volcanoes that spew water and ice ('cryo-volcanoes') on many moons around both Jupiter and, again, Saturn. You can spend weeks creating a handful of new materials, or you can design a chemistry engine that will create thousands of materials for every new world, based on what is there and how the world is situated. And when you figure out how to use this to make things burn or explode, things get exciting!

That's seriously it. Some basic chemistry, a lot(!!!) of math, and a game can design a ton of materials, all on its own. It's chaotic, and it's messy, but it should be interesting...!

Embassy of Time

(other entries in the series: 1 2 3 4 5 )

You know what's really neat to have? A universe. It gives you a place to put your stuff, and you can look at it whenever the boss isn't breathing down your neck. I really like having a universe, and I don't even mind sharing it with other people. That's just the kind of guy I am.

What you see in the above image is my latest venture into galaxy design. I updated the entire method of generating galaxies, to make it both more scientifically literate and a bit more user-friendly for future changes. It's still far, far too blurry and stars are much to close together, but I'll go back and work on that some time in the future. Which leads us conveniently into a talk about...

ASTROPHYSICS

The way galaxies form is not entirely mapped out by the Smart People, but when it comes to Big Stuff in the universe, there is one thing we always go back to: Gravity. After our last venture, we ended up with a universe filled with big exploding stars and the heavy atoms their, well, corpses spat out and scattered. Everything that is not hydrogen and helium was made from that. But how did that proces get from A to B?

The deal with the four fundamental forces described in the last entry (gravity, SI, WI, and EM) is that they vary mainly in two ways: Strength and reach. SI (Strong Interaction) is immensely powerful, able to bind things together in ways that may never be undone. But its reach is so tiny that it can't even touch anything outside its own atom, so you're not going to suddenly find atoms around you attaching themselves to your nice clothes. Or, essentially, compressing you into a dense lump of particles no bigger than a speck of dust (most of an atom's content is just emptiness, so compressing ti together would, well...). WI isn't much better, and while EM is pretty powerful, it doesn't have an insane reach. SI and WI are impossible to see with the naked eye, but if you want to understand how gravity and EM measure up in strength and reach, it's laughably easy: Put a small piece of iron on the floor and stand up, holding a magnet in your hand. Slowly lower the magnet towards the metal. At some point, it gets close enough that the metal gets sucked up. Congratulations, you just used the EM from the magnet (remember, EM means ElectroMagnetism because it makes magnets work) to defy gravity! Gravity is pretty weak; even the gravity of the entire Earth couldn't pull the metal away from your comparatively sad little magnet. But the magnet had to get real close to do it, while the Earth can hold onto the Moon like it wasn't even no thing (I'm very white, I apologize in advance for all my attempts at cool-speak).

Out amongst the stars, back when the universe was young, that made gravity the king of the hill. True, hills didn't exist yet, but gravity helped create the asrtonomical equivalent of hills: Nebulae. A nebula is basically a big cloud of gas and dust, with the original hydrogen and helium (there was, and is, still plenty of that left out there) mixed with the stuff made in supernovae. Gravity slowly draws the stuff together into clouds, and bigger clouds draw more powerfully on gas and dust out around them, increasing the effect. Some nebulae are also called star nurseries, because stars are born in there and spend a good part of their early life there. Our Sun likely did, too. In fact, projects have recently started appearing to track the bloodlines of stars. Not Hollywood stars, but real stars in space! Stars born in the same nebula have very similar stuff inside them, and astronomers can measure the contents of stars. How? Well, remember how light is just electrons releasing energy when they move closer to an atom's nucleus? And how each kind of atom has its own set of colors of light it emits? Astronomers use a prism to split up the light from a star and then check out the colors contained in it to see what's inside the star. The more two stars match up, the more likely they came from the same star nursery!

It would make sense to think that stars would just get sucked farther into their respective nebulae and collide, forming bigger and bigger masses inside. But gravity isn't that simple, and much of astrophysics is just a big puzzle to figure out how gravity affects things. Once stars form, they basically hold a lot of the nebula's gravity in one spot. That causes other stars to get pulled around weirdly, causing them to circle each other or whip around, or, yes, get sucked together and collide into bigger things. When things get crazy enough, one or more stars get whipped right out of the nebula, like losing your grip on that baby you were swinging around (shame on you). So stars fly out of their nebulae here and there, all the time. Again, our Sun likely did, too!

As noted, some stars get flung out along with their brethren. Some stars may also attract other stars later, as they pass by close enough. Binary systems are what we call stars that are close enough to hold onto each other and spin around one another (they orbit each other). The word 'binary' means 'made of two', but in reality, we use the term to refer to stars that orbit each other in packs of three, four, five or even more, as well. At some point, though, there are so many stars, orbiting each other at such a distance, that it seems less like a few close friends and relatives, and a bit more like a house party. Thousands of stars can mutually attract each other, every star adding more gravity to the whole group. They have enough distance between them to not collide; in fact, any star in the group might be barely even visible from any other! But the gravity keeps them together.

This is the point where that swung baby becomes important. Let's talk about centripetal force.

People often talk about centrifugal forces, and this annoys physicists to no end. The idea is, that when you spin something around, it starts pushing outwards. You can check that out with any small object tied on a string. But fact is, if you let go of that baby you've been swinging around, the baby will not fly straight away from you! There is nothing 'pushing the baby outward'. What is really going on is that at any point, the baby is going in a straight line. Except you keep pulling on it. That's why it feels like it would fly outward; you're pulling inward! You are keeping the baby form flying in a straight line in the direction it's already going. You are the centripetal, not centrifugal, force! If you let go (DON'T!!), the baby won't fly straight away from you, it will simply continue in the direction it was going. If you draw the whole thing seen from above, the baby would go in a circle, but then suddenly just continue in a straight line. It will never change direction on its own and just go straight away from you. It just continues the line you're drawing when making the circle, in a straight line.

This is how stars orbit one another. Gravity is the centripetal force that holds them together. Anything moving too fast will start moving out of the group, because the centripetal force isn't strong enough. Anything moving too slow will sink inwards towards the group center. And because gravity is stronger the closer to its source you are (or everything would be pulled together in the entire universe; most stuff is too far apart to pull hard on each other, luckily!), anything closer to the center of gravity that the entire group essentially orbits (the barycenter). Remember 'bary'? It means 'heavy'? The center of heavy stuff, get it?) will have to move much faster than stars out on the edge of the group. Such a group, by the way, is called a cluster. In this case, a star cluster. And as some star clusters continue to grow, stars pull on each other, making the cluster change shape. There are many shapes that it can become, but one of the more familiar is when stars pull their orbits together bit by bit, until they sync up nicely. That leaves the cluster in the shape of a disc, the shape most of us associate with a galaxy. Incidentally, the word 'galaxy' comes from the name of our own galaxy, the Milky Way. When we look up at our galaxy from our place inside it, we see the disc edge-on, making the billions of stars in it look like a long streak of white on the night sky (if you're in a place where you can even see it clearly; that was easier before artificial light made stars harder to see). That white looked like milk, so millenia ago, that gave the galaxy its name. 'Milk' in ancient Greek is 'galaxias', so...

But this is just the beginning. Inside galaxies, stars still found themselves gathering into clusters here and there. But just as in clusters, stars near the center of a galaxy must move faster, or they fall into the center. So a cluster in a galaxy might see the stars closer to the center go faster than those farther out, stretching the cluster out along the paths of the stars. Had that path been a straight line, the cluster would have just been stretched out. But star orbits are round. So the stretched out cluster got wrapped around the center of the galaxy, forming a spiral. Our own Milky Way is one such spiral galaxy, with huge spiral arms, made from millions or billions of stars. Our Sun is in the arm called Orion, from the Greek myth.

And of course, all of this also ended up happening on a smaller scale. Smaller than galaxies, that is; we're still talking huge stuff, here! New stars would gather gas and dust from inside galaxies, or even drag gas and dust along from their star nursery as they traveled through the universe. Gas and dust that moved too fast got away, and gas and dust moving too slow fell into the star. But a small amount of it struck the right speed and path to start orbiting the star as a disc of gas and dust. This is called an accretion disc, which means a disc that stuff is gathered (accreted) in or from. And within that disc, just like amongst the stars in the galaxy, things clump together. Gravity is not strong enough in specks of gas and dust to pull it together when it's going around a star like that, but remember how positive particles attract negative particles? Yeah, they don't care what atoms those particles are part of. An electron around one atomic nucleus will still be attracted to the protons in another, nearby atomic nucleus, too. There is no honor amongst thieves, here! So the subatomic particles of various atoms will pull the entire batch of atoms together, until it gets big and dense enough for gravity to start taking over. Clumps of atoms get mashed more and more together, and pull in more and more new atoms, until you get small rocks. Those rocks pull in other rocks, growing and growing, occassinally smashing together and strewing debris of rock around them, while the rest clumps together to form a new and likely bigger rock. Given time, they will become planetoids, which in turn may even merge together to become planets. And those planets may have their own, much smaller accretion discs, which form moons. Or they just happen to grab one of the smaller rocks floating about and get it into a nice orbit and call it a moon.

So where does that leave us? It brought us from the scattered gas and dust after the first stars exploded, and formed our galaxies, and star systems like our very own Solar system (the proper name for the Sun is Sol, hence 'solar' this and that). Mainly through gravity, a featureless universe became what we know and love. In what we can therefore live. But that part about living is for another time.

ASTRONOMY

Look... science is not always an exact science. Subjects overlap, like, a lot. But to put it in very crude terms (forgive me, any scientific academics reading), astrophysics is about how things behave out in space, while astronomy is about seeing what's out there and describing those things. It's a bit like describing a TV show or movie: Astrophysics is the plot, astronomy is the characters involved. Kind of.

Fact is, things do not just progress nicely from hydrogen and helium to stars and planets. It's a mess out there. A mess with weird stuff that can kill you in an instant. We are very sheltered here on Earth, for reasons we'll look at later, but out there, in space... It's a freaking horror show.

Most people already know how a supernova doesn't just leave gas and dust behind. Supernovae are so violent and fast that anything deep inside the dying star cannot possibly get out in time. So it gets smashed together, as the star collapses and everything comes pounding down on the core. When the gas and dust clears (which can actually look really pretty), the core is left as... somethng else. If the star is big enough to go supernova, but not insanely big, the core is left behind as a big lump of neutronium. This is a kind of matter created when atoms are compacted so hard that electrons merge with protons to form neutrons. Neutrons usually die quickly (they split into protons and electrons), but when compacted enough, they form a hideously dense object with so much gravity that they simply cannot fall apart, a bit like sitting on an overstuffed suitcase to keep it from popping open. And because neutrons don't repel each other, they all essentially form one big atom, an atom the size of a planet. It has insane gravity, because there is just so much inside of it. We call this neutronium lump a neutron star. And because iron is th elast thing a star produces before going supernova, this ball of neutronium is covered in it. So when the neutron star spins, it's like having electricity run in circles, which, as stated, creates a magnet. A magnet the size of a planet, weighing as much as a star! Because light is electromagnetism (it's all about the photons, baby), a neutron star can sometimes bend light so that it only truly shines out where the big magnet has its north and south poles, creating two powerful beams of light. If the neutron star wobbles, the beam spins around like a lighthouse light, and if the beam hits you, it seems to pulsate, hitting you in steady blips. You now have a pulsating star, also called a pulsar. If it's the magnetic effect that starts bothering you, you have a magnetar. And if the neutron star is heavy enough, it doesn't even ebcome a neutron star! It just keeps compacting itself, with gravity getting stronger and stronger as the star gets denser and denser, until it sucks in even light, and you have a black hole. Black holes do not have 'stronger gravity' than anything else; if the Earth was compacted enough, it would become a black hole, with the same gravity as always. But the black hole is so small that all gravity is in a single point, and when you get close enough to the point (closer than the size the black hole was as a star, called the Schwarzchild Radius), you get to the event horizon. We cannot see anything deeper inside than that, because the black hole eats everything, even light, inside that horizon. But anyway, you'd get ripped apart if you got that close to it.

All of that is pretty nice on its own. But match it up with some of the other things we talked about, and things get insane. Black holes suck stuff in, you say? Well, how about black holes constantly eating other black holes and nearby stars until they grow millions of times more massive than any star? That would be a supermassive black hole, and most galaxies have one at its center; that's where the slow stars go when they 'fall in'! It also helps keep the galaxy together. Yes, the effect of the Milky Way's own supermassive black hole reaches us, we just move too fast to fall in. You're welcome.

Or you're proud of your pretty pretty pulsar, you say? Well, how about having that spin make a magnetic field to concentrate light from an entire freaking galaxy? Say hello to your friendly neighbourhood quasar, some of the (if not the) brightest objects in the universe. Then again, you don't need a galaxy to impress. That whole spinning thing has a funny effect, you see: When things get pulled in by gravity, they still move just as fast, even if the circle they are making is much smaller. That's why figure skaters pull in their arms, it makes the arms go the same speed in a smaller circle, thus going around the skater faster, and pulling the rest of the skater along, making him or her spin much faster. Remember how a supernova is a star that collapses after dying? As in, 'things moving around it drop down to move just as fast, but in a smaller circle'? So all that stuff inside a supernova spins around like crazy, and if it spins fast enough, you get the same effect as with a pulsar. Except the energy is the energy of an entire supernova, concentrated into two freaking beams! Yes, this is worth shouting, because it's basically like me pulling a gun on you that fires half a supernova straight in your face (the other half goes the opposite way). It's called a hypernova, and it earns its name, every time it happens!

Then again, we can go a bit more mellow. Stars that are too small to go supernova either just collapse into a tiny star, which has no internal fusion but still has enough of its old heat to shine for millions of years, called a white dwarf. Or they first puff up, because as they collapse, some of the hydrogen near their surface falls in near the core and starts more fusion, but because it's near the core and not in the core, the hot matter swells up like steam from boiling water. It becomes a red giant. Once the star burns through this second round of fusion, it, too, shrinks into a white dwarf. The universe is not old enough for any white dwarfs to have lost all their energy yet, but when they do, they become black dwarfs, just dead, cold stars in the void of space. Except... what if a white dwarf is part of a binary system? If it orbits close enough to its partner, and that partner has plenty of hydrogen at the surface, the white dwarf can suck new fuel from the partner. And when it gets enough new fuel, it can re-ignite as a new star! This is what we call a regular nova. It shows up as a new (ironically, an old reborn) star in the sky, but without all the messy supernova exploding. Unless the white dwarf sucks too hard (stop giggling) and becomes too big too fast. Then its new rebirth runs amok and it burns through all the new fuel at once. This is called a supernova, too, but a special kind, called a 1a supernova.

And there are plenty more weird objects out there, even without talking about distant planets. Astronomers usually classify objects with snazzy names; an O9 Blue Hypergiant is a huuuge star that shines brightly with a touch of blue (stars never have any clearly distinct color other than white, because so much light gets mixed inside them). Smaller stars have smaller number, going from 9 down to 0. Below that, the letter changes and the numbers go from 9 to 0 again. The letters, from hottest to coolest star, are O, B, A, F, G, K, and M, or "Oh, Be A Fine Girl/Guy, Kiss Me!". Colors go blue, white, yellow, orange and red, and sizes go hypergiant, supergiant, giant, subgiant, and dwarf. Our Sun is about a G7 yellow dwarf. But as noted, stars change throughout life, and one day, our Sun will run out of fuel, become a red giant and swallow the innermost planets (or at least boil away anything on them as it swells), before dying as a white dwarf. So while big stars tend to be blue hotties and small stars red and cool (for a star, anyway), there are red supergiants and maybe even a blue dwarf here and there.

AS FOR THE GAME...

The game is, in part, about having a whole universe as your playground, and what you do with that. It's perfectly possible to jusy place stars at random, or according to a fractal pattern that has little variations from place to place. But for it to be really impressive, it seems only logical to try to incorporate how stuff in the universe actually forms. Instead of just having a template galaxy and some variations on it, algorithms can simulate how stars are brought together and may form a nice disc, maybe with spiral arms. Or maybe the galaxy has been twisted around into a strange form by gravitational effects, like the pull from other galaxies or not having a very big supermassive black hole. Different stars can just be made from a random list of templates, too, like different sizes and colors, and the weird ones added for flavor. But there are so many strange effects that cannot possibly be entered into a list without spending decades. I never even listed a favorite of mine, a binary system of a big star with a small star orbiting so close the small star is basically rolling on the big star's surface, like the big star has a huge bump zipping around on it!

For serious procedural generation, we need to start out with some basic "gas and dust scattered" universe, likely generated from a map of the original hydrogen and helium clouds, then the first stars formed, and then how they scattered heavier matter throughout the universe. This is not as insane as it sounds; it's just mapmaking in space. The key is to simulate how gravity pulls things together, and what happens to them. That part is basically a regular physics engine, tracking where things go bouncing around in space. Except that everything is pulling on everything else, too. And when you have that, each star can be run through a simulation based mainly on how heavy it is, to get its life path. It's a lot of back and forth, seeing how things affect each other, but the end product is a universe of strangeness that might rival a whole 1% of the crazy stuff in our own! To me, that sounds a lot better than "this star is small and red and has five planets".

And as for the planets... What makes a planet? We'll go into some details next time, but in essence, it's about the kind of atoms it's made of, and how it moves relative to its star. The Earth goes around our Sun once a year (hence the length of a year), and spins once around itself once per day (hence the length of a day). Easy enough, right? But hwat if days were longer or shorter? Things get cold at night. Even a warm planet could turn into a frozen wasteland each night, if it had long day/night cycles. Or what if it moved around its star faster or slower. That's what seasons are made of, after all; the Earth is tilted, so half the year the northern part gets more light, the other half the southern part does. What if the tilt was different? The Earth is tilted about 23.4 degrees. Uranus is about 82.2, which means it's almost on its side! The seasons must be insane. But they change slowly, because Uranus is far from the Sun and thus moves around it slowly (it takes 84 years for one Uranus-year). And that distance also means everything is colder in general. All those things affect a planet greatly, deciding what is solid, liquid or gas, and when, for example. And when we go into details, it affects how landmasses form, volcanic activity, weather, and more. And that's not even counting what it all means for life on a planet, be it native or visitors from space.

In essence, astrophysics shape a universe, and its results affect planets in it, making otherwise similar worlds possibly widely different. Variation is the spice of life. And the spice must flow..!

Embassy of Time

(other entries to this series: 1 2 3 4 5 )

The reboot is coming along nicely. What you see in the picture is the basic space full of stars that is now being generated seemingly correctly. I will be porting and improving the code for galaxy formation, superclusters and cosmic filaments in the next few days.

But where is the science?

Before I even started on this project, I did a massive research project to get the overview of how everything (yes, everything) works. I want it to be at the very least based in real science, even if 100% accuracy is impossible on a human-made computer. The research was for a teaching project, but it has infected my mind and transfered over to this project, so let's see what the science behind existence can tell us, shall we? And to start at the root of it all, let's start with...

QUANTUM MECHANICS

Look, I'll be the first to admit that this is a level of detail that miiiiight just be going too far. What game would need to have subatomic particle (or waves, uhhhh) programmed into it?? In truth, my own project is not in dire need of this, and it will be a good while before I even start poking this slumbering beast. But there are aspects of quantum mechanics (or QM, for the pros) which, in the long run, may in fact be worth the effort.

Let's start at the beginning: 13.8 billion years ago, the universe was born into a completely, truly empty void. It started as a tiny, tiny point, smaller than an atom, full of all energy that would ever exist. It was held together by, no kidding, the Superforce. But that broke apart and energy flooded out. The 'pieces' of the Superforce became new forces, first Gravity, then Strong Interaction (SI), and finally Weak Interaction (WI) and Electro-Magnetism (EM). These forces caused the energy to sort of coagulate into lumps that we call particles. Those particles would go on to become everything we know. This initial event is called the Big Bang.

The fact of the matter is, make a program that simulates these particles closely enough, and it will build your universe for you. Problem: It will take every computer that will ever exist to run the simulation this way, and oh, we don't know exactly how these particles behave, we only got about 90% of the puzzle, if even that. One particle was discovered as late as 2012. So we need shortcuts. But even without this magical simulation, understanding these particles is like a physics engine for, well, actual particle physics. This will allow materials and effects to be simulated from scratch, like simulating oceans of unusual chemicals on a distant planet and knowing how they look (including color) and act. It's late-stage concepts, but they can do a lot.

So, in that spirit, here's the Quick'n'Dirty guide to QM:

Gravity: We don't know how it really works. Mass attracts mass, but beyond that, we're lost. The particle discovered in 2012 was the Higgs boson, which is the closest thing we got. It works like people in a crowd: When you want to move in a different direction than the crowd, you need to amke an effort. Except with Higgs, the crowd will follow your lead, once you push through. This is why heavy things are hard to change the course of; turn your car to sharply, and it will tumble in the direction it was going. In other words, momentum. But why things get pulled towards other things with mass, we're not sure yet.

Strong Interaction: Two kinds of particles make up what we call 'matter': Leptons (meaning 'small') and quarks (uhm, a word from the James Joyce poem Finnegan's Wake, for some reason. No kidding). They are very alike, but a small difference makes all the, uhm, difference: Leptons have an electrical charge that we define as "while e's", either 1, 0, or -1 e. Quarks have a fractional charge; 2/3, 1/3, -1/3 or -2/3. Only whole charges can exist, so quarks bond together in more or less stable groups called hadrons (meaning 'big', and yes, that's why that huge thing in Europe is called the Large Hadron Collider, it smashes hadrons together). Groups of 2 hadrons are called mesons ('medium'), groups of 3 are called baryons ('heavy'). The only really stable group we know is 2/3, 2/3 and -1/3. They form the baryon hadron we call a proton ('the first'). Hadrons are held together by tiny particles called gluons ('glue particles', no kidding). In veeery short, gluons pop up and disappear all over the place, all the time. They have an energy called, for no real reason, color. And like aprticles can be 1 or -1, or 2/3 or -2/3, gluons can have the 'color' red, blue or green, or the anti-colors anti-red, anti-blue or anti-green (again, no kidding; science is weird). A gluon always appears with its anti-version, and they destroy each other immediately, unless they swap partners with another color; red and anti-red can swap with green/anti-green, leaving a red/anti-green pair and a green/anti-red pair. When they swap like that, they pull on each other, and quarks have color as well, so gluons can swap with them and pull on them. Get the right gluons and quarks together in one spot, and they will pull on each other enough to stick together. Protons, if you were wondering, have a red, green and blue quark all the time, swapping colors with gluons and each other to maintain that balance. And that, kids, is how babies are made. Because babies are made from atoms, which are made of these particles.

Weak Interaction: A bit easier than SI is WI. Although leptons and quarks are very similar, they act very differently when WI enters the picture. See, particles can be needlessly heavy, lugging around mass/energy they don't need. WI lets them shed that mass/energy (on a QM level, mass and energy are basically the same; heavy stuff has more energy, so to speak). Leptons do it by shooting out a lepton with a charge of 0, a so-called neutrino ('little neutral one', awww); your lepton too fat? Fire off a neutrino, drop the weight, deed done. Quarks have it weirder, though. They fire off a W boson (W for 'weak', and bosons are all particles that help one of these four forces work, like gluons, W bosons, Higgs bosons, and later, photons). W bosons steal the charge from the quark. But a W can only hold a full 1 or -1 charge, so if a 2/3 quark fires of a W+ (W with charge of 1), the quark drops to a charge of -1/3. It becomes a different quark. That matters, a lot!

Electro-Magnetism: Oh boy. This is a big one. It does a looot of stuff, but let's try and keep this as simple as possible. EM works by leptons and quarks (and hence also hadrons, made of quarks) constantly emitting and absorbing bosons called photons. Yes, 'light particles'. When you see light, it's photons hitting something in your eye (a protein, but that's for a later debate). This works by an atom (which is a bunch of protons in the middle with -1 leptons (electrons) zipping around them) constantly trying to pull its electrons closer. The electrons need to drop energy to do that, and they emit photons to get rid of that energy. They can gain energy by absorbing the same energy photons. But they can only emit photons of specific energies, which is why things have color; different energy photons, different color. Things glow when hot because they are emitting photons of high energy, to shed the heat. It's also why glass works like it does: The atoms in glass can't absorb photons we see. But they absorb high-energy photons, like ultraviolet light, which is why you won't get a tan beneath glass (if you could only see ultraviolet colors, glass would look pitch black). But they do other things, too. For one, they create that whole 'electrical charge' thing. No photons, no charge. They also create magnetism (you may have noticed the name), since photons leave ripples behind them as they move, and if you fire a lepton or hadron in some direction, those ripples straighten out like shockwaves behind a supersonic jet. Depending on the charge of the lepton or hadron, those ripples actually have a clockwise or counterclockwise pull (imagine them as circles around the lepton or hadron when you see it coming right at you), and if two sets of ripples line up right (leptons or hadrons going the same way), the ripples will pull together like drops of water merging, and pull leptons and hadrons that follow together, too. Run two naked wires next to each other, and you can see them attract each other. Run the wires (and the leptons that are zooming through, which we call electricity) in a coil and those ripples form a donut shape that is strongest in the middle, and hence pulls stuff in there. Congrats, you got a magnet. So it's electro because electricity is just electrons streaming through something (like a wire. Or you, if you screwed up), and magnetism because the ripples can form magnetic materials. And photons because it's light (photo means light; a photo-graph means a light-drawing). Science!!

So we got that down. What difference does it make, then? Well...

NUCLEAR PHYSICS

Compared to QM, nuclear physics is kind of simple. The atom is made from protons (baryon hadrons of 2/3, 2/3 and -1/3 quarks, equalling 1), usually some neutrons ('neutral ones', made from 2/3, -1/3 and -1/3 quarks, equalling 0), both in the core (a.k.a. the nucleus), and around the nucleus, electrons (leptons with charge -1) fly. Or at tleast they began flying around nuclei (plural of nucleus) about 380,000 years after the Big Bang, when things cooled enough that protons could use their positive charge to catch the negatively charged electrons. See, positive attracts negative in these matters. Positive repels positive, and negative repels negative, but two opposites will attract (neutral does squat). And when things finally cooled enough that protons could catch electrons, all the first atoms formed. That allowed electrons to shed energy and smooch in closer to the protons, creating the first real light. This was a millenia long insane flood of light, so powerful we can still see faint images with the right equipment (including an old radio. A small part of the static you hear in one of those, or see on an old TV screen, is from that faint light). Scientists call it CMBR, Cosmic Microwave Background Radiation. Or 'the baby picture of the universe', because it shows roughly how things looked 13.4 billion years ago.

The first atoms were almost entirely the type with just 1 or 2 protons in the nucleus, because bigger were hard or impossible to form. The positive protons push each other apart, and can only be held together by packing some neutrons in between them (the gluons swap between protons/neutrons and hold them together, but they lack the strength to hold two protons together without neutrons to cling to). That's a pretty big deal, because the first atoms just floated around as thin gases. Gravity slowly bundled them together into clouds, and in the middle of such a cloud, gravity compacted everything harder and harder. In a big enough cloud, the core became so dense that atoms got smooshed together. Two atoms with a single proton each would become a two-proton atom, but that doesn't work, so the energy of pressure and repelling protons supercharged a 2/3 quark in one of them, making it shed a W+ and become a -1/3 quark. That means a proton (a hadron with 2/3, 2/3 and -1/3 quarks) became a neutron (a hadron with 2/3, -1/3 and -1/3 quarks). The proton and neutron did not repel each other, and formed a new nucleus. And more neutrons were made that way, allowing protons to fit in better, and thus, in big clouds of gas, atoms fused into bigger and bigger atoms. This is therefore called fusion. It produces a lot of energy, which causes nearby atoms to also fuse, causing a chain reaction of tremendous energy, which caused the clouds to ignite into the first stars.

Atoms can thus fuse all the way up to 26 protons in a nucleus, which is iron atoms. Heavier atoms are made when a star has only atoms too heavy to fuse more left. Then it dies, and the heat inside it disappears. When something hot goes cold, it shrinks, and when the core of a star shrinks fast, everything collapses violently. In big enough stars, it is so violent that the star explodes. We call that a supernova ('nova' means new, because it looks like a new star in the sky, and 'super' is because it can outshine every other star). In supernovae (plural), the explosion can smash atoms together harder than graivty could, and in a few minutes a billion-years old star can create atoms as big as 92 protons (uranium). Every atom heavier than iron comes from a supernova somewhere.

All this is why some scientists say that "we are all made from stardust". Atoms heavier than one or two protons (hydrogen and helium, respectively) were made in stars, and we are made of those atoms, as is nearly everything around you. And most of the hydrogen and helium atoms still around have existed for all those 13.4 billion years.

But even atoms fall apart, especially big ones. Stars can only make up to 26 proton atoms (iron) because in bigger ones, Strong Interaction (which holds them together with gluons) stars losing the fight with EM (which gives protons the positive charge that makes them repel each other). SI is stronger, but EM has a greater reach, so on the edges of an atom bigger than 26 protons, EM starts pushing too hard, and pieces break off. The typical piece contains two protons and two neutrons, and is called an alpha particle ('alpha' being just 'a' in Greek). Atoms sending out alpha particles are said to produce alpha radiation. But this is when there are too many protons packed in too tight. What if there are too many neutrons? Well, neutrons are not as stable as protons. A free neutron only lasts about 10 minutes before one of its -1/3 quarks sheds a W- boson and becomes a 2/3 quark (-1/3 quarks are just a bit heavier than 2/3 quarks, so it's just trying to shed some weight. We all know that feeling, right?). Protons prevent this from happening, but if there are too many neutrons, one is going to transform. As it does, the W- flies out of the atom, becoming an electron (also -1 charge, remember?). This is a beta particle ('beta' for 'b'), or beta radiation. So a neutron can become a proton and an electron, and protons can get ejected. Big atoms can therefore change their number of protons back and forth wildly. Some do it fast, a million times per second. Others, like uranium (the 92 proton atoms) take about 4.5 billion years for half of them to do it (because it's a matter of chance when an atom 'decays' into another kind of atom by changing its number of protons, you count the time in how long it takes half of them to do it, called the atom's half-life). There is also gamma radiation, which is just insanely high-energy light emitted to shed a lot of energy from an atom. And like fusion, atom decay and its radiation heats stuff around it up. So when atoms decay, they release heat, which is why we use nuclear reactors; we trick big atoms into releasing their energy quicker and drive huge turbines to harness electricity. Incidentally, those turbines create energy by constantly rubbing magnets together to jiggle the electrons inside wires, a reverse of how you made that electro-magnet earlier. So yeah, nuclear power plants are nothing but atoms and QM making electrons wizz through metal wires!

AS FOR THE GAME......

This is enough SCIENCE (biatch) for today. We'll continue on the next entry, but first, how does all this fit into making a game??

We all know physics engines by now. They handle things colliding and falling and flying around and such. Advanced ones even include friction, the amount of movement lost when things scrape along each other. Really advanced ones, usually for lab simulations only, also track heat, which is generated when things smash together or rub on eavh other (clap your hands and then rub them, you'll feel it a little), or can track how things break apart when smashing together, or how explosions tear things apart, etc. And engineers simulate how heat travels through machines and buildings all the time.

QM and nuclear physics are not essential to any game (to my knowledge). But if we are going to do heavy-duty procedural generation (and we are), every kind of procedural simulation is built on rules. And those rules are built on other rules, and so forth. At some point, it can become an advantage to simply define matter according to its smallest components. If a 'chemistry engine' lets us generate chemicals from basic scientific rules (coming up in a later blogpost), what color will those chemicals have? How will they react to heat from light? Will they be radioactive? What if a player creates so much energy from something that it affects matter on the atomic or subatomic level?

None of this is vital to any game I know of. But think about games that have nuclear power plants or fusion engines or particle beams and so on. You can just make up how those things work and put them into the game (which, spoilers, is how it's going to be for quite a while in my project, too). But step by step, you can go into details about how these devices work, so that players can adjust them wildly, change how they are used, or even invent new ones. But to do that, you need some basics about how they work, deep down.

So no, QM and nuclear physics are not a huge priority. However, they give us a foundation for understanding other sciences (coming soon), and when the game gets advanced enough, they provide new ways to give a player creative freedom, for creating or destroying mindbendingly advanced devices. It sometimes helps to be prepared...

Embassy of Time

The project is now three months old, today. That means I have uploaded the current game for anyone to play around with. It's clunky and has a tendency to crash, but as long as it works it's kind of enjoyable!

If you follow my blog (I actually think a couple of people do, which blew me away completely!), you know my habit of tabula rasa, i.e. the clean slate. Today (maybe tomorrow, it is a Saturday, after all) I will be implementing that. I will be archiving all I have made and starting up a clean, untouched project. Using my experiences and lifted code from older versions, I will be putting together a new, sleaker version of the game. I hope. I have made enough structural innovations to my work that I know in my heart that building the code around those concepts, rather than designing the concepts around old code, will make everything better. The sun will come out, I will lose 10 pounds, and someone will offer me 10 million to do the game. Everything will be amazing and happy.

Yaaaaay!!!!!

Embassy of Time

(other entries in the series: 1 2 3 4 5 )

The image atop the entry is from my last game test. Although the polygon style is becoming problematic (it's an optimization issue), it shows an unexpected result of the world generation. I have programmed in mountain ranges along tectonic plates, shield-volcano mounds, simple craters, sea level depicted by vertices turning blue, and a lot of other things. Right now, I'm throwing every science I can grasp at the dart board and seeing what sticks. Fire and forget. Clean up later. Which I guess means you didn't forget, but... Anyway, I did not foresee this particular result, although in hindsight, I should have: It's a mountain ridge that snakes up out of the water and rises to the point that first its top, then the whole thing, become covered in snow. I never saw mountains do that in real life, but I'm not a geologist, I just play one on TV / my blog. It was not deliberately programmed into the game, but in the process of doing a ton of things, it appeared.

This, to me, is the essence of something being 'natural'. It was not designed to exist, it just became the inevitable result of the universe (in this case, my virtual game universe) existing. I love going for nature walks (stop laughing, some of us geeks do), and I love looking at trees or rock formations and trying to spot how they came about without deliberate sculpting. It amazes me. When I started research for my game, it quickly came to involve every science I could find; starting at quantum mechanics and nuclear physics, going up through chemistry, geology and climatology, through biochemistry and larger bological issues like evolution, up to neurology and springboarding it through ethology (the study of instinctive animal behaviors as a biological phenomenon) and psychology to land in sociology, economics and political sciences, rounding out with various engineering disciplines. Study any one of those fields or their subfields, and you have plenty to deal with. But for me, studying any field is just foreplay. The real meat of it is in placing the things you learn in a greater, continual perspective. How did dead chemicals become life and then form brains, and how did those brains get to the point of inventing corporations to build microchips? Each science is a node. My passion is the connections between the nodes, the red thread that runs through it all.

The thing is, just like my snake ridge, reality is a chaotic mess. Believe in whatever god you will or won't, but from the human perspective, it's chaos out there. No clear master plan, just eons of "this apparently works, so it will continue, and the rest won't". In games, it's called "emergent gameplay", the stuff that is made possible by a game without being planned. It's how Minecraft became a tool for homemade parkour courses, and how Halo games became trick shot simulators. It's what happens when people know the rules, but do not care one bit, and make up their own. When we look at nature, or at civilization for that matter, we think we see purpose. That branch grew there because the tree wanted to grow wider. That company wants to make money from this or that idea. The human brain is designed for detecting patterns, so ancient people saw trolls and gods controlling (is the word controlling related to just trolling in some old way? #SuddenTangent) the weather or the earth, and conspiracy theorists see hidden agendas in oatmeal.

That lust for meaning seems to be guiding how modern games are made, and I think it's because we have the tools now to do so. In the early days of video games, you had far less to work with, so you made up crazy things to turn it into a game. Just try to explain Pacman, Donkey Kong, or any similar old games in a way that sounds like a logical backstory, I dares ya! One amazing emergent element of early games was that as there were fewer enemies on screen, machines could process the game faster. Which is why Space Invaders originally sped up as more enemies were destroyed, raising the difficulty in a way that seemed, like genius, to match your skill. Coincidence. Chaos becoming the next big thing. Natural evolution. But today we have every pixel focus grouped and every character checked for realism (mostly visually, but also narratively). It is entirely controlled, entirely artificial. We run it, with no room for chaos.

I'm working on going the other way. Some people ask me why big companies haven't done the things with procedural generation that I'm working on, if it can do what I keep claiming can be done with it. My answer is simple: I do the one thing they will not, which is to work towards relinquishing control. A company must control its product, micromanage every facet of it. I want to create a chaos that works, and 'set it free', so to speak. So I try to implement sciences and let them do their own thing, rather than work towards a strictly defined result.

But considering the massive volumes of science easily available to implement in a game like that, I often have to stop and wonder how far it can be pushed. Elon Musk has (in)famoously spoken about his beliefs that we may live in a simulated reality already, and on some level, his thoughts make sense. The current advances in game technology (and the lingering popularity of The Matrix) seems to guarantee that a game system will come along that can pass for reality. Add some clever medication and people may forget that it's not real.Or the entities being simulated will believe themselves to be real. When we think sentient machines, we think physical robots. But AI is a part of games, too, so why not. Maybe we are those simulated entities... or maybe just you, and you're the only real person, because this is your game. Don't forget to save.

With the math I already have at my disposal, I am convinced that a game can be made that mimics nature to a frightening degree. And that game would then be able to tackle the best argument against the idea of us living in a simulated world: It's so goddamn boring! A game, on the other hand, can focus on the parts of reality that are interesting, the fun stuff. But to do that, to beat nature at its own game (pun totally intended), we first need to dissect nature. We need to know ALL THE SCIENCE and turn it into algorithms and snazzy graphics. I'll try to give my take on that, in the next part(s)....

Embassy of Time

UPDATE: I ran a test with more realistic colors, crudely applied. Before reading, view the results here (click to enlarge)!

Someone recently responded to a post of mine by asking if they could see my code. This sent me into a deep existential conflict! Fact is, I am a huge proponent of open source. I believe it to be the wave of the future and the only way that the digital part of our civilization can progress. But I also don't want to give away all my secrets :(

Instead, I sort of picked a middle ground. It's a bit of a copout, but there are a few reasons why I would rather not just post a thousand lines of code. Firstly.... mine. Mine mine mine mine mine. But seriously, I am a bit protective, because I know how easy it is for someone from the outside to scrounge forums and blogs for code to snatch. I've seen it before, and I bet others in here have horror stories of people presenting copied code as their own. I don't like that. Secondly, the code is a mess right now, and much of it only barely works. I'd rather not spend too much time discussing or, gasp, explaining code that is poorly put together and will soon be obsolete. I don't like to share what I can't defend honorably. And thirdly, I really like to discuss the ideas and science behind it much better, and if people get the code, they want to discuss that code, instead. And IIIIII dun wanna!! In time, though, I hope to open up more. Share my feelings, talk about my dreams and such. *group hug*

And now........... SCIENCE (biatch)!!

The images atop this entry are from the latest test run of the world creation engine. They show mountain ranges, rift canyons, cliffs, and a variety of ways those things interact with each other (the typical one: You run face first into a sudden wall of rock). The entire thing is based on tectonic plates, which is the accepted theory of geology on how continents move over time. To make a long science short, our planet's surface is broken into many distinct 'plates', which are moved by, among other things, molten rock moving around beneath the planet's surface (the semi-liquid 'mantle' under the solid 'crust' that we live on). Where they move into each other, they push their material up to become mountains and other raised features. Where they pull apart, 'rifts', deep cracks in the surface, form, until molten rock from beneath it rise up and cool to become new rock on the edge of the plates. Where they just slip by one another, the plates cause earthquakes due to friction, but this is not simulated here, because this particular bit of world generation creates a static, unchanging planet. For now.

So how does one create a planet of tectonic plates and have them shape the surface? First, let's divide the surface into plates. Simply generate a number of random points on the surface. We call these 'cratons', the name of the first hardened pieces of rock that long ago formed the plates. Whichever craton is closest to a point on the surface, that point is assigned to. The points assigned to a craton make up that one tectonic plate. Easy enough.

Next, how do we make things form along the edges of a tectonic plate? First, we set a maximum distance of the effect. Then we have every point on the surface check not just which craton is the closest, but also which one is the second closest. The closer the distance between the point and the closest craton matches the distance between the point and the second closest craton, the more we raise the point above the surface. That means that points close to mdiways between closest and second closest craton get raised a lot, while points farther away continually get raised less. The result: Basic mountains. The greater the maximum distance of the effect, the flatter (wider, not lower) the mountains become.

But that gives us mountains along all tectonic edges. We want some places to meet as mountains, but others to glide past each other, and others yet to pull apart and create deep rifts! How that??

Firstly, every craton gets a vector that defines its movement over the last millions of years. Once it has that, we can take the dot product of that vector against the vector we get from the closest craton to the point exactly between it and the second closest. In more layman's terms, we check how closely the plate's (craton's) movement matches the direction from it to the point right between the two plates. The greater the result, the more the points on the surface rise (i.e. you multiply the dot product with the amount of rise). And since a craton moving away from the other craton means a negative result, points that used to rise will drop, creating rifts, like valleys.

It took a little while to put all these things together, put for basic tectonics, they seem to work quite nicely. I am now trying to figure out how to make mountains and valleys more interesting, without compromising the simple but scientifically based generation. In real geology, converging plates (plates that move into each other, creating mountains) crack and splinter at the edge, making pieces of them shoot up at different rates, creating not a single straight line of mountain, but jagged ridges and splintered paths of mountain ranges. Rifts, on the other hand, have chunks break off at the edges, forming a kind of 'crumbling stairway' effect, rather than just a clean slope. And where plates slide along each other, they snake up and down against one another, creating weird patterns of rock shooting up and then dropping down, like two rags tangled up in one another. I am hoping all of this can be boiled down to a single, coherent algorithm, much like the stuff above. But science is a cruel mistress, and she will no doubt have her wicked way with me.....

Other than posting long sections of code, I am very open for questions on this, including thoughts on geological effects I have not yet implemented. The practice of converting science to computer algorithms is hard, but amazing to be part of, and I love discussing it and learning the perspectives of other people! I hope before long to have a more solid methodology for converting science into games, but for now, I must take it bit by bit, making each work the best I can. Once it truly clicks, I will let you know..!

Embassy of Time

I thought I'd do something a bit more 'normal' for once and just make an entry about where I am in the development process. I may do this more in the future, since this actually seems to be a place where people read what I write. My daily environment is sooooo annoyingly sane and normal. It's bad for my health.

Anyways, what you see in the top image is a planet. It has been colored according to tectonic plates, each overall color being its own plate. If you don't know what tectonic plates are, they're really cool and you should totally find a couple of online videos on it (who has time to read, seriously...). If not, it goes like this: After forming, the Earth was molten rock, but here and there some large granite chunks ('cratons') solidified and began merging together and gaining size from lava hardening on them. In time, they became large plates that covered the planet surface. They now move slowly, and where they collide, mountains form, while rifts form where they split (and molten rock from deep in the planet rises through the rifts and hardens into new pieces of the plates). Where they just rub, earthquakes happen.

So in order to make a more scientifically appropriate planet, I have the planet form with these plates. The darkened parts are their edges, where they either collide, rub or divide with other plates, creating large terrain features ('macro-topology', I think it's called). The next step is to begin turning those discolorings into actual surfaces features. In our world, places like the Rocky Mountains or Himalayas are made that way, while the East African Rift Valley is an example of plates tearing the surface slowly apart. I love it!

Of course, there is a lot of unseen stuff going on, too. The way the planet forms is designed to make future features easier to implement (this is the fifth version of my planet generation algorithm), from handling massive differences in scale and distance (see hill in front of you, see mountain far away) to angling colors right in the sunlight (as the planet spins and its sun passes in the sky, even). But those things are still 'invisible' so to speak. The tectonic plates, however, are becoming visible.

So hopefully, there will soon be realistically formed world terrain. I look forward to showing it to you :)

Embassy of Time

I never took classes on programming. Back in the Ancient Times, I picked up a ridiculously thin book on programming for the ZX Spectrum my dad had bought for the family. I was maybe 7 at the time, and me and my dad sat down and input the small programs (less than 100 lines, IIRC) that were in the book. I only remember a racing game that used a capitol 'I' as the top-down view of the car (the font gave the letter cross bars, like on a 'T', except both top and bottom. Hey, to a kid in the infancy of the computer revolution, it was a goddamn racing car, and it was amazing). Over time, I experimented and learned. Today I look back and marvel at the important evolution of concepts like the GOTO and especially GOSUB commands. We knew so little back then, but we experimented so damned much.

Programs today tend to be a bit more complex. Sure, you can make little Flash or JavaScript games (and I do, thank you very much!) which have very limited numbers of lines, but my work in C++ OpenGL sure as hell is not keeping a three-figure line count, even though I make an obsessive effort to keep everything streamlined. I need to understand it again after a three-day weekend, after all. With this growth in complexity, new tools need to be learned, and I learned a few the hard way. If ever I was asked for the amount of advice I could give a complete programming rookie in the time between getting on and off an elevator, here are some.

The first thing is "have a system for testing how the program runs". It seems pretty simple, right? Most of us are very familiar with error messages, after all. But I am not satisfied. Too many times has a program crashed and taken the console or whatever along with it, making the error message impossible to read. Also, not all messages are errors. Also, I may want to compare messages from multiple runs of the program. So dear rookie, write a function early on that creates a seperate error log. Not a big revelation to someone with a bit of experience, but going from console error messages to a simple txt file with runtime messages saved in was a freaking miracle my first time! The process of looking for errors or inefficient code structures went from being an art that depended on me looking at a console and having a flash of genius, to being a craft with me flipping through lines and lines of program run statuses and non-crashing error messages. Also, a txt file can be searched! It can be posted online easily! Do it. You will thank yourself later.

But that is just the entry-level stuff. If you do anything more than dabbling, you should know that. The much bigger tool I depend upon now, one that I have very recently used to handle some important work, is modularity.

Tabula rasa, the clean slate method, is the most efficient way (for me) to handle large problems in the code. I know people who still scoff at the idea of extensive back-ups. "I'll just fix it if anything goes wrong, no need filling my harddrive with old versions" and such. Some make the mistake of taking regular back-ups, but deleting all but the most recent. I cannot count the times that I have had to go ten or more versions back to redo some work that got all tangled up, to the point where untangling it would take days. Filing a line of several back-ups as "whoopsie" is embarassing, but it beats having to untangle or redo everything. As they say, real men don't do back-ups. Real men cry a lot.

But tabula rasa is not just for those horrible moments when you realize that half of the code you wrote is essentially screwing up the other half. My latest use of tabula rasa is actually the reason for the image at the top. I 'scrolled back' my versions to a previous back-up to get rid of all code that formed stars and planets, going back to almost only the colored dots (celestial objects at great distances). Why? Because the code for generating landscapes was getting bothersome. It was clunky and hard to improve. Nothing more. Just a petty grievance, a first-world problem, so to speak. But all the progress is still in the scrapped 'line' of backups, and I can lift both basic concepts and entire chunks of code from it, if I so wish. Meanwhile, the core code for forming those spheres (from top left to bottom right, they are a star, its innermost planet, the planet's closest moon, and the planet's farthest moon, which looks bigger because it's closer to the camera) is now getting far more streamlined and flexible. Had a redo of the code been far more troublesome than a mere tabula rasa back to an earlier version, I would have been tempted to avoid it, and slave on with inefficient, clunky, poorly structured code. Now, I can just yank out part of the code and start that part over.

I have done similar things before, on a bigger scale, removing all but a few key components and starting over in a 'scorched earth' kind of way. Usually, that means starting up a new C++ project and transfering key structural parts (the file setup, the main game cycle, etc.), but with the right early back-up, a lot of that time can be better spent. And by tracking the back-ups (I keep a txt file with the main changes to each back-up noted), you can treat everything as a library of code, to copy into your current version and retrofitting.

From some of the thigns I have seen of professional code, people know this perfectly well (this is neither my idea, nor anything new), but it seems like it is considered a very low-key tool. As a result, I see code that is patchwork upon patchwork, with large chunks being little more than fixes to other chunks. I am a solid proponent of tabula rasa. Every now and then, you need to clean the slate and start over, using what you now know to recreate code better and sleeker. It seems like a banal thing, barely worth a blog entry, but if I had those seconds on the elevator, I would gladly pass on that banality to someone who might avoid a lot of wasted effort trying to deal with piled on code in the future.

Stay sharp.

Embassy of Time

I like time travel. The Embassy of Time is a big display of that. It is designed to include books (currently being written), comics (being slowly drafted), movies/animation (storyboards are being revamped from an earlier, failed attempt), and of course, games, like what I have talked about in here. But as is fairly common knowledge by now, games are a very different medium. It's interactive. I can write any number of stories for any number of other media, but games require me to let the player take the helm of the story. And for time travel, that poses a few problems.

Before people rage at me, yes, I know there are plenty of games about time travel out there, and many of them good. But actual time travel games are, to me, another matter entirely, and not something I have ever seen, at least not intentionally. Long story short, I see existing time travel games as basically a hub world and various adjacent worlds. The "time" thing is just a word added. Even a show as off-the-wall daring as Rick and Morty has deliberately been stated to avoid time travel, because of the many problems it causes. Time travel (I may shorten that to TT,as is often done in those circles) becomes a variant of world jumping, the "time" being written into each world as historical references (world history, or personal history like Back to the Future). To me, this is like a racing game: You can pick between X amount of racing tracks, cars, maybe even weather and such, but you can never go truly off the track, or drive from one to another yourself. What I consider 'true' TT games would be along the GTA model: There are a bunch of roads. Drive as you like, an dsuffer the consequences.

For TT, that 'open road' model would be to give the player's character a time machine and say "go wherever/whenever you want". Not specifically designed sub-worlds based on history. Not "pick a year from this list of twenty premade story points". Not tracks. I want the open road.

Several of my real-life friends are a bit perplexed as to why I do all this procedural generation nonsense, instead of just designing a game. I admit, a lot of it is because I recently chewed through just about every major science for a teaching project that never got off the ground, and I like to see what I can use. But when talking goals, there is still a point to it. If I don't want to design a few neat worlds for my game, but instead want a fully accessible timeline (and alternate timelines, of course!), I need to think in different tools. To put it in a fancy way, I can't draw every drawing I need, so I need to create mathematical equations that will draw 95% of each drawing for me, then go touch up and adjust everything by hand to get what I want. I need the proverbial million monkeys with a million typewriters, but I need to train them to do better work.

So far, of course, that's just a fancy twist on the "open world, procedural generation" trend that has its claws in a visible subset of games programmers and designers these days (maybe less so after the No Man's Sky debacles. Or maybe more!). The world extends not just north, south, east, west, up and down, but also back and forth in time. But it's still the same basic notion: Use a ton of math to make the computer design stuff for you. Spend your time instead on creating a new breed of tools to design your world via math. It's a challenge, no doubt, but the TT elements are still sort of vague. In fact, you could easily argue that by that account, even if true TT games do not exist, the feature to turn every game into one does exist: Game saves. Think about it, you save your game, and later, you can go 'back in time' to that point in the 'timeline'. Multiple saves means multiple TT destinations. A sufficiently advanced save system would be indistinguishable from time travel!

Which brings me to the elephant in any TT room: Changing history. In a sense, this is where the 'save system TT' and the procedural generation overlap. Serious TT stories deal with the effects of meddling with the past (or the future, in advanced cases). A true TT game would need to get its feet into those waters, too. So if a game can simulate how, say, a society evolves from barely human tribes into a spacefaring civilization, would saving the game at some point and later going all the way back to that save point and doing things differently allow the player to push the world down a different historical path? In TT terminology, could a player go downtime to seed an alternate timeline?

This is, to me, where the true TT gold is buried. A solid, grand TT game would be one where the notion of changing history, and understanding the dynamics of timeflows (according to the game, that is), would actually matter. Good games in other genres do this on a much smaller scale; if you save your game and play it through, then go back and play differently, the AI in the game would/should react differently the second time around. Enemy units will use different strategies in order to counter your different moves the second time around. Taking on a different target in a FPS means the previous target gets to do stuff that was not done before, while the new target might not, changing the course of the game. This 'fake TT' approach to games will answer one of the questions that many experienced gamers cannot help but wonder, or have already figured out: How much do my choices actually matter in the game?

We saw the massive rise of this, and the disasterous crash, in the Mass Effect series. The idea that any action during any of the games might help shape the final ending was a nearly sensational concept, making players feel like their actions mattered in ways never before imagined in a game. But in the end, it was all dumped for a disappointing "pick a card" ending, one that even had only three real outcomes. In a TT game, that would be like killing Hitler before WWII, and just finding out that history respawned him because he had to take on that role. Actions with no consequences.

I believe firmly that this is one of those challenges that have never been truly tackled, and that succesfully tackling it will rock the games industry as hard as the concept and unexpected success of Minecraft did. Imagine essentially to live as a character inside a perpetual world editor, where you had the option of taking one point in time and going two or more ways, splitting the game into two distinct, even if closely related, versions of the game. One in which you picked up the gun and started a violent revolution, and one in which you non-violently manipulated people into doing your bidding behind the scenes, for example. The latter would see the world go on as expected, only with you pulling some strings behind the scenes. The first one would throw the world into violent upheavel, sending city streets into murderous action-drama. With good and varied enough simulation of consequences, every major saving point would be its own new sub-game; a stealthy game of subterfuge and manipulation, or an urban military action game. Your choices would not only matter, they would create the/a future of the game.

At this point, though, it's all just speculation. I'm still working on having the game create scientifically plausible, yet greatly varied, planets for players to roam and explore. With luck, I can have something like Rodina running before the end of 2017, maybe adding animal life in 2018 and snapping No Man's Sky at the heels a bit. But with time (the irony is duly noted) or if I happen upon that one magic piece of mathematical genius (I seek high and low, I can guarantee you), is it entirely unthinkable that a true TT game could be created? Could your next big challenge be to find the point in your own playing time to go back to in order to alter the game world in just the right way for it to evolve into what you want?

If you ask me...... its about time!


(sorry for the pun. I have a problem)

Embassy of Time

As I am finally coming out of a 5 days (and counting...) long battle with a particularly annoying flu due to wildly shifting weather (go Denmark!), I was beginning to sort in my head the things I have wanted to blog about here when I, instead, was blowing ooze through half my orifices and gasping for air. I'm sorry about any mental images created by that statement, by the way...

The fact is, I feel weird about time. Not just because it's what my game and the entire surrounding project is about, but also because... time, man. Who has it, these days?

In all honesty... I have it. I feel like I have way too much time. I also feel I have way too many things I want to do. Procrastination aside (yes, big aside, I know), I keep feeling that I am doing something very wrong, and that something is planning. I plan, don't get me wrong. I make detailed lists of tasks needing to be handled, and I manage to follow most of them, with only minor changes along the way. I like creating structure, even if I do love the thrill of being surrounded by creative chaos, too. I plan, a lot, for a lot, in many ways. And I follow through to the best of my abilities.

What keeps ringing in my mind is a piece of advice a friend once gave me, though. It was for playing Starcraft, but perhaps without knowing it, he said something that was, to me, endlessly profound: If you have a lot of resources, you're doing something wrong. The point being that it was a waste to have a lot of unspent resources, just laying around. If you got it, you should invest it. Make every bit count. And I feel like that should be true for projects, too, especially projects like game design and creating large fictional universes, like my Embassy of Time.

So the thing bothering me is, why do I have both the feeling of a lot of downtime, and a clear idea of what I want to do with it, but end up spending less than half of it in a useful way? Sure, procrastination, daydreaming, goofing off with some fun thing you made, and posting stuff about what you do to online websites (this blog included) will expend time, but it doesn't feel like that's the problem. It feels like the factory is on and ready to go, but someone (me) keeps forgetting to push the button. Not due to sloth or not wanting to; I want to do these things, to the point of finding other things in life a bit tedious in comparison. But something goes wrong in the planning phase.

Part of the problem is that I have, due to the nature of the project, a lot of balls in the air. I just started writing the main book behind the game's story, a rewrite of some old works of mine. The game itself is moving into new territory that requires me to understand and creatively use a lot of science and math. And there are other, lesser arms of the project that I need to do some research on, including research into managing social network websites (I even have another, dormant, blog, and a Twitter account, and no real idea what to use them for at the moment). But none of it is mysterious. It's stuff I can just do, and stuff that I often, as stated, want to do. Somehow, I just end up screwing up my time management, and get less than half of it done, if even that. And it bothers me.

There is no answer on this one. It's my post-phlegmic brain trying to be constructive and productive again. But I can't help but wonder if I am missing some clever way to get my ducks in a row and push forward like I feel I should be doing. Maybe it's because my cat ran away and something deep in my brain can't concentrate. Maybe I feel guilty for not doing more 'grown-up' things, like earning more money and buying a car or wearing a suit or something. Maybe it's my bloodsugar that's too high or too low and messing with me. Maybe I need to hydrate more. But in the end, I feel I am not living up to my potential. And that bothers me to no end...

EDIT: While proof-reading this entry, it dawned on me that classical motivation, i.e. "the carrot and the stick", may be more involved with this than I suspected. Few things motivate like someone letting you know that you're doing "a good job", that you're going in the right direction, at the right pace. That is, in my experience, nearly impossible to measure when working on your own. Nobody is setting guidelines or putting pressure on you. I just watched someone play Dark Souls and thought a lot about how the point of the game is that the insane trials involved make success feel that much more awesome. I, and I bet most others working completely independently from an employer, have no benchmark to go by in that way. Sure, figuring out a solution to a problem or a bug is great, but it's hard to truly see, and feel, that you're "moving forward". There is no beam of light and a booming voice to tell you that you leveled up, no answers in the back of the book to compare your work to. You don't know if you're even on the right track. I'm thinking that it might pay off to look at some gamification theory and try to set up something, but I doubt that this is even possible in a situation like mine and people like me. Anyone with an insight is highly welcome to tell me how wrong I am about that! Please?!

Embassy of Time

So I was just over at the story forum. I was a bit sad to see it sorely underused, since I am taking a short break from hard scientific programming to focus on my story. The thing is, my story is not exactly a game story, it's a story story. As in, I'm not writing it to explain the game or to provide a strong narrative to the game. It shares the world and sets the stage, but it is a story seperate from the game. And that puts me in some weird territory, I feel...

The story of a game is, in many ways, a new concept. I was a small child when Pacman and Space Invaders could still be found in game arcades, and I grew up with unexplained shooters/scrollers, racing games, assorted platformers and all that jazz. I think the closest I ever got to a game with a real story behind it was my first Transformers game for the Commodore 64, and that was mainly because the story was, like mine, entirely seperate from the game. I don't remember the game explaining what the Transformers were doing in it, they just transformed and ran around shooting stuff. If a game had a story, it was typically a few lines to excuse the game's weird premise. Plumbers could double in size from eating mushrooms and then stomp on evil turtles. Meaningful narratives were not exactly the backbone of those games.

I would argue that this is very much still the case, at least for the vast majority of games. Cinematic cutscenes and mission objectives seem like story elements, but they are rarely more than dressed up quests of the "fetch, protect, or destroy" variety. Like many others, I cheered and laughed at the first sight of the newest Doom game's protagonist just pushing away the screens that told the game story, in order to get to the killing faster. Even in games like Mass Effect and Deus Ex, much of the story seems to just be setpieces plopped in to justify moving the action forward. "This is the enemy, this is the objective, deal with it". Mass Effect more than anything shows how the story is essentially meaningless, with the much critisized "pick a card" ending (Deus Ex: Human Revolution did something similar, but may have gotten better away with it because of fewer promisses about your aactions mattering). So you have to wonder, is the narrative of games in general just a paper-thin excuse for slapping some stylized graphics together and pointing the player at various targets? Does the story really exist as anything more than in-game factoids and exposition?

My game didn't start as a game at all, to be honest. It started as a story. More precisely, it started as a story concept. My name actually says it pretty outright: Embassy of Time. There is an embassy somewhere (and somewhen) for time travelers. Going through time and not exactly sure how to deal with your new home? Check your local embassy branch! Of course, when time travel conflicts send thousands of refugees on the run through time and space, things get a little more dicey. It also brings a lot of other factions to the table, many of them mysterious and shady.

Does that sound like the story for a game? To me, no, and I was having doubts about the entire game angle for a while. It turns out that my worries were for nothing, though, since the game fits a very nice role of "time travel agent training simulator". Agents of The Embassy have to go through training, after all, and when not on actual time travel missions, what better way to train than an artificial simulation? And once the game is advanced enough, it will become the real missions, including setting up new branches, exploring worlds and times, and much more. But the game and the story are related. They are not one and the same.

Does the name Uwe Boll mean anything to you? It should. He is the creator of a fine line of high quality video game to movie adaptations. And when I write "high quality", I mean some of the laziest, most pathetic turdpiles ever imagined by subhuman minds and put onto actual film, with actual, real-world actors, all to exploit a loophole in German tax law. Mr Boll alone is a large part of why the "games cannot be made into movies" meme continues to exist. And that, in turn, is part of the reason why there is often a strained relationship between interactive media (mainly video games) and passive media (movies, books, comics, etc.). How many fictional universes do we have that make it seem hard to answer the question "is this universe made for games or for movies/books/comics/etc.?" Not many. Either the universe is clearly made for games, or it is clearly made for (possibly one of) the other kinds of media. Other media have started to seriously break these walls down. Are Marvel superheroes designed for comics or movies/TV shows? Well, technically..... comics. But in reality, especially the cinematic movies have become as big a part of the foundation as comics are (some would argue a bigger part. Some, like the investors!). Sure, you don't need one to enjoy the other, but when you want to know some deeper background info for, say, Charles Xavier's situation and condition in the new Logan movie, you don't ask a film buff, you ask a comics buff. Similarly, the Lord of the Rings books were used by many to better understand the LotR movies.

Games, not so much. Games are more likely to either be A) tag-on additions that are entirely unimportant for the story as a whole, or B) something to rip off a storyline and known name from to make a quick buck in the direct-to-DVD market. I loved the original Mortal Kombat movie (only the original one), with its colorful kitsch and over-the-top silly fighting. But it was fluff, with nothing to add to the universe made by and for the games. And most other attempts at a game+movie (or +comicbook etc.) universe seem to be even worse. Super Mario movie, anyone? In fact, the only example of a game story truly trying to grow beyond games seems to be the 2016 movie "Warcraft", taking place in the Warcraft / World of Warcraft universe, and doing its best to do a solid story that can stand on its own but also supplement and enhance the game experience, and be enhanced by it (I am not a hardened warcrafter, but I heard many such people discuss the parallels between the movie and game universes). But despite making its budget back over 2.5 times (160m cost, 433m return) and a favorable reception (a pitiful 28% on RottenTomatoes from critics, but 71% from audiences), the chance of a sequel is, well, let's say "uncertain".

I don't know the answers to any of this. It seems that "games don't make good movies" has its merits as a warning, but not as a hard-and-fast truth. I liked the Warcraft movie, maybe because of its awkward, silly campiness (in the script. The production value overall seemed just fine to me). Is there something that makes games bad at meshing with movie/book/comic/etc. universes? Maybe. Games are a very different medium, because they are interactive. But stories are stories. I, for one, would love to see movies based around game universes like Deus Ex or Starcraft, which are deep, interesting narratives in my opinion. But they would need talented people to flesh them out. And just like superhero movies just two decades ago, it looks like there is no chance in Hell of that becoming reality. But then again, it did look that way for superhero movies back then, too!

I am going to make a universe for my game that goes beyond the game. I have characters I love, plots and conflicts, themes and settings, and even the occasional clever line of dialogue or two. I don't want story or game to be haphazardly stuck on with ducttape and a prayer. Like good comics or great books turned into amazing movies, I want them to be reflections of one another, painted into different media. I want Ida Lund, Misha, the blonde, and all the rest to exist between and behind the stories, and not just belong in a single medium.

Wish me luck?

Embassy of Time

As usual, I lead with an image from my latest round of testing. Planets now form hills and valleys, and here the nearby star is seen rising above the horizin of one. Things are moving forward.

But I'm not here to brag (in part because "it makes nice pictures" is not quite worth bragging rights, IMHO). I am here to answer a question no one asked, because dammit, blogging is all about being sufficiently self-absorbed to think people want to know such things about you, and I am to deliver!

The question is simply "what kind of game are you making (you weirdo)?" What am I making... Well, to make a short matter long, let's start with what I like to play. I started back in the late 80s on a ZX Spectrum (48k, y'all!), moving up through Commodores C16 and C64 until snagging an Amiga in the mid-90s. For the youngins out there, games looked different back then. Graphics were often so bad that any game became something more or less abstract, or it was kept simple. Like, really simple. I did have fun with one racing game, but the games that really stick were Elite, Civilization and Dune 2 on the Amiga. In order, those are a vast space exploration and trading game, a turn-based 4X straategy game (more on that, later), and probably the first real RTS, Real-Time-Strategy game ever made (ironically, Dune 1 was a somewhat tedious adventure / mystery game, as far as recall). I like games that involve a lot of thinking, is what I'm saying. Quick bang-bang action is not really my biggest thrill. Except in arcades, which back then had an atmosphere I cannot find anywhere today. There, I enjoyed especially old-school "bullet hell" vertical action scrollers, and certain other action-y games. Alas, the age of arcades is long gone.

I don't think I ever really got into PC gaming, and I never owned a console until 2011 when my parents gave me a Nintendo Wii (yes, I was a grown man, but my parents knew me well). As my Amiga gaming fizzled out, I turned to other things. Some were games, like (pen and paper) RPGs or boardgames, but I traveled a lot, went to college, had a business, became obsessed with movies, and so forth. Every time I tried getting back into games, it kind of felt bland. I did have fun with the old Starcraft game, but mainly because I played with friends, making it more about the social than the game.

About 5 years ago, I decided to finally try out a gaming fad that had been going around. There were some very odd videos online about a game, and they just would not stop making more of the videos. So I tried it. And for the first time, I got something I realized had been sorely lacking in games for me for a very, very long time: Freedom. That game was, of course, Minecraft. And no, I'm not a fanboy. I don't play it anymore. But I got probably a few hundred hours of game out of it, and it made me look into games once more. I found multiple small indie games that had a lot of thinking, both quick and slow (SSuper Hexagon ate so much of my time...). But what i realized I had always wanted, even back in my golden Amiga days, was freedom. Yes, freeeeeeeeeeeedooooooooooooooooom indeed!

Of the old games, Elite had the most open world, hands down. It was a simple and rather ugly game, but it had thousands of planets. and the later version, Elite: Frontier, boosted this by adding complex star systems. I still remember one mission above all others, where I sold my automatic landing system to make room for extra fuel, so that I could make a fortune from a rush package to a five-star system. As in, a system with five suns, not one rated +++++. And I never got through, because without auto-landing, the crazy gravity effects made any landing impossible, for me at least.

Civilization, and even moreso Dune 2 and later RTS (including Starcraft), suffered from some limitations that drove me crazy. Even the long tech tree of the Civ games seems stunted. It only goes to the modern era, it boils a lot of things down artificially to far too simple concepts (you can invent "the chariot", for example, which seems insane to me. A chariot is not an invention, it's a clever use of multiple inventions, and you should be able to make more than one version), and it pretty much pushes you to follow a specific path, with a few deviations of your own choosing. It easily becomes a variant of a point score. "How far along your tech tree are you?" should not be a simple question to answer! But the map was my biggest frustration. I felt cramped in even big maps after inventing a few basic transport technologies. I wanted more room to grow, and more things to build. Needless to say, Dune 2 and later RTS felt even more cramped. Freedom was not part of the deal.

And in the end, even Minecraft ran out of steam (no, not that Steam) for me. Mods promissed more freedom, but they became obsolete with nearly every new version, and support for modding was miserable most of the time. I sought out mods that expanded the tech tree (i.e. added more advanced crafting recipes), but even the best had a hard time really covering the gaps, and many would not work together. But my biggest gripe was with one mod that was made very early on, but the concept was refuted for a bunch of non-reasons by Mojang (the people who published Minecraft). That mod was Cubic Chunks. It's function was simple in theory, though no doubt a nightmare to implement: Minecraft works like a big grid map, with chunks at different X and Y coordinates, like the squares on a piece of graph paper (that's what you 'mericans call it, right?). Each chunk was 128 blocks high back then, though now I think it's 256, and 16 x 16 along X and Y.. But Cubic Chunks blew that away. It kept 16 x 16, but the height was changed to.... 16, as well. What gives?? Well, Cubic Chunks allowed the 'graph paper' to go up and down, too, along the Z axis. Suddenly, even the sky was not the limit, and you could build kilometers up or down!! And some other mods used thaat to make landscapes generate with huge, majestic mountains and deep canyons and caves. It was the next big step for Minecraft, the only logical way for the game to truly grow. And it never happened.

I want freedom. I don't want anyone to tell me how a game should be played. Give me an objective and some tools and stop getting in my way.

What is ADIPAX? It's a literation of 4D1P4X. A 4D first-person 4X game. I don't know if such a game exists, but it's what I want. 4X is the genre popularized by Civilization. The 4X are eXplore, eXpand, eXploit, and eXterminate. Go out into a huge world, grow in power, use whatever you can find to become stronger, and fight back anyone who wants to destroy you (or who has goodies that you want). But it's 1P. It's first-person, like a FPS, or one of those "hold back the waves of enemies" games that I can never remember the actual name of the genre for. Or Minecraft. So you exist, as a character, in your 4X game. You build your empire to whatever you want around you, not in front of you on a map. You walk the streets, the woods, the battlefields. And you develop tools to let you control things farther away, be they good communications, fast transport, or something else.

The 4D was a part that I added not long ago to the idea. Games, even the ones that have some sort of tech tree or other progression chart, are horribly static. Your objectives 1 hour into the game are rarely that different from your objectives 25 hours in (I like long games). I want a game world that can change over time, in part due to my influence. It might be a brutal survival game at first, only to become more Skyrim-like along the way, rising to RTS and later full-on large-scale strategy. Time changes the world, and time changes the game. Grow or fall behind.

If you take that route, of course. As stated, I want freedom in my games. If you want to remain the hermit survivalist from stone axe to cybernetic laser rifle, that's your choice. If you want to use your influence for riches rather than military might, nobody is stopping you. If you want to become the best damned hunter of certain aliens, sworn to bring down an entire race of alien enemies, all power to ya. And the thing is, the more I study how games are designed and made, the less this looks like a big deal. Modern games have a ton of features, but deliberately underplay most of them to focus the game on how the designers want them to be played. Stop telling me how to play. Once I bought the game, it became mine, not yours. If you want me to always go from A to B, pay me to do so. Otherwise, let me jump off your bus and go deep into the jungle to see what's there. My game, my time, my choices. And most games just seem to need to let me. The rest almost(!) takes care of itself.

So that's ADIPAX in a nutshell. A world that goes through changes, like the real world does, perhaps being a magical place of gleaming towers and dragons one day, a dystopian techno-hell the next (okay, maybe not from one day to the next, but...). And you get to walk within it, experiencing its wonders as you see fit, taking up challenges and growing stronger in any of a myriad ways. Build a base or wander. Hone your skills or trade for the best weapon at any time. Be part of a community or take what you want and leave. Your game, your rules.

That is not to say there will be no story, no overarching goals. But those are for another time....

Embassy of Time

I finally got the fundamentals working on star, planet and moon generation in my project to make a procefurally generated universe. Hooray for me! But with the basics out of the way, I am facing the next step: Making it better than 'basic'. And that leads me into some thinking...

It was always my intention to get the basics running, and then start applying real sciences to get the ball moving from there on. Geology for planet formation, astrophysics for stars and orbits and such, eventually biology for life. Even chemistry, at some point, for allowing the generation of substances that I would not think of on my own. But standing here, almost ready to dive into that, I can't help but think... Should I?

Don't get me wrong, I want to. I love science and I studied up on all (aaaaall!!!) the sciences before diving into this project a few months ago. I have notebooks full of scribbles about fault lines and convection cells and more. But there are two issues that have begun to bother me.

The first issue is simply one of time. It will take a lot of time to get proper scientific stuff integrated into the code, not just because there is a lot of science, but because despite all the mathy stuff, there is no predefined way for me to integrate it. Sure, physics engines can give me an idea of how to do basic colission things, and maybe some games or scientific papers can help me on my way to implement other sciences here and there, but overall, this is not territory that others have seemed to bother with. Either they make games and therefore use shortcuts (or just ignore the whole science issue and slap in something weird. Hello, No Man's Sky, funny seeing you here!), or they are running big simulations that only get used to produce a model of some kind, not something that can actually be interacted with like a game. It seems like I need to reinvent the wheel to get rolling (pun kinda intended).

But second and even more importantly, do we want actual science in our games?! Sure, science-y stuff is neat. I love SpaceChem dearly, but let's be honest, that's not how a chemistry course would show it all working. We all know about the Uncanny Valley for how things look, but from various chats with people both online and off, I get the feeling that scientifically accurate (okey, let's be realistic, scientifically approximated) content might be upsetting to some. Games offer a false sense of simplicity, removing a lot of the distractions of the real world. Minecraft takes a lot of flak for how huge slabs of stone can hover in mid-air, becomes only some substances have (very simple) gravity effects. But is it maybe a benefit to have things be this unrealistic? Minecraft sure has not suffered for it, sales-wise.

I want the science in there. I love the idea. But it keeps nagging at me if just making landscapes form at complete random isn't better than designing ways for geological forces to mold worlds. If a few basic animals with some simple variations aren't better than a system for approximating actual evolution.

For once, I really have no extensive rant on the matter (sorry if you like my rants). It's just a thought that keeps bugging me...

Embassy of Time

(a quick note: While I post some WIP images in here along with my blog entries, I have an image gallery of both more WIP and laughable failures here, as well)

So that last entry got the debate going, didn't it! I swear, if good debates were easy to start, we wouldn't even need an education system. I learned a lot, and got a bunch of inspiration. But one thing also cropped up a bit, and I even think some of my commenters held back, to be respectful of me. While I appreciate that immensely (nice people are such an underestimated resource in modern society), I feel a need to tackle one big issue head on. That issue is the almost divine ordained chasm between "art" and "code".

When we hear about triple A studios, we usually hear about people doing the code, people doing the art, and people doing the business stuff. Coders, artists and suits. Some revolutionaries (and some "revolutionaries", in sarcastic air-quotes) do both hardcore coding and business stuff. But the artists are an odd duck in all of this. Maybe it's because art has always been surrounded with an air of "oh, you're getting paid (or not paid...) to doodle/scribble stuff?", under the notion that it's something anyone can do. That is an arrogant idea, of course. My arrogant view of the matter is somewhere between "artists are just slackers" and "art is divine". I personally believe that anyone can do art, even great art. I have learned and taught both traditional drawing and 3D animation, and I feel my experiences with that back me up. But the issue isn't whether you can do great art. The issue is whether you can do art that is both great, useful, and efficient. Being able to paint a marvelous fresco of dragons and unicorns matters little when it takes you three decades and has no purpose. Even the great artists like Michaelangelo and Da Vinci did their great art on commission. True, Van Gogh never earned more than a pittance for his art in his lifetime, but that should make you think twice about wanting to be the next Van Gogh. The ones that really make an impact in their lifetime tend to be not just great artists, but efficient and goal-oriented. If you want to become famous long after you die, I will not hold it against you. But it's pretty damned hard to debate the merits of people in a society, if those people are long dead.

Okay, I'm going to take flak for that one. I don't mean to berate any artistic souls, but we're talking about art within the perview of industry, here. So, yeah.... no hard feelings, okay? I love crazy, unrelated art. But we all need to serve a purpose, society dictates it :(

The point where it starts to get weird is when the border between art and coding starts to get eroded. Art is by many considered an intrinsically human thing, whereas coding is more logical and mechanical. You would probably have a much easier time convincing people that there are computers that can create new software from scratch, on their own, than trying to convince them a computer could do art. Funny enough, both those things are true, even though both are (as far as I know) in their infancy. Long ago, I saw on a science show how a professor had programmed a computer to draw like a child. Not that it was the goal to draw like a child, but that was the level it could work at. Google's Deep Dream project is also creating things that some consider art, even though I believe the project was meant to teach machines to recognize objects more effectively. And while software is writing a lot of your sports, business and similarly "hard fact" articles these days, people are still working hard at making computers do more creative writing. The results are a mixed bag, but if you want something fun on the (very) simple end of things, I always enjoyed Seventh Sanctum.

Which brings me to the title of the entry. No, it's not a typo, I'm not asking if programming is art. I'm asking if art is programming. Crank up your average high-end 3D editing suite, and you won't be met with a ton of bedazzling inspirational imagery and deeply spiritual guidance to getting out your inner muse. You will be met with a lot of tools. Hardcore, mathematically driven tools. Long gone are the days of using lines and circles to do things from the ground up. These days, 'style' is getting more and more quantifiable as a selection of techniques and components that can be crudely reproduced from demand, not inspiration. Free online tools let you turn photos into semi-artistic paintings, using math to reproduce art styles of some of the old masters. Art is not an isolated enclave of crazy visionaries anymore. Art is becoming a science.

The key phrase here is "becoming". It's nothing to publish in galleries yet, and unlike to be for decades. But that's not what interests me, honestly. Take a look at the image at the head of the entry. That's a mosaic of four test screenshots on my game work, showing a sun/star, an Earth-like planet, and a, uhm, Moon-like moon (can we please start calling the Moon Luna in modern parlance, society? Please??), and then a shot of all three seen from the orbit around the moon. It is, and I cannot stretch this enough, a laughably simple test run. Colors are applied according to a random palette algorithm that is about four lines of code. It's the equivalent of a kid learning to color inside the lines. But this was not a great leap of logic to make, and it is, if nothing else, a bit pretty (opinions may freely vary, no offence taken). If this is easy to make, what is hard, then?

I am fairly obsessed with procedural generation. No, not the adorable Spelunky type, or the overhyped, underdeveloped No Man's Sky type. Those, in my opinion, put the emphasis on "generation". As in, "we need to generate some content, stat!". I'm very much on the "procedural" side of the matter. Mix-n-match creature creation like in NMS borders on offensive to me, when someone claims it to be procedural generation (PG). There is no real procedure to that, it's just dice rolls on random tables, and then some digital glue to stick the results together. Again, go to Seventh Sanctum, it's also a lot more funny to read (again, my opinion, yours may vary). PG, to me, is about understanding the complex process of something being brought into existence. Yes, it's about understanding that process with mth and SCIENCE (biatch), but it's about the process. If you want to make PG animals, don't photocopy a horse's head onto a giraffe's body and call it a new thing. You have to understand how creatures evolve and diversify, how they react to their environment and evolve to fit its resources and hazards. Math, yes, but also biology (and arguably chemistry and at least biophysics). Which is where we enter programming territory. When you're sitting there, wanting a computer to "roll you up" a new animal, you don't just need to know programming, or even math, SCIENCE (biatch) and art. You need to know something that seems rare, to the point of non-existant: You need to know how all of them interact!

I won't ramble on too much longer (because dammit, I could). My personal angle on this matter is that yes, art can be programming. But you need to respect it as a child of both worlds. My practical work with PG is coming along nicely, but my theoretical work is fairly insane. In the last entry, I mentioned a developmental model for having computers create entire cities, starting with creating art tools to help create windows and walls, then extending those tools for entire buildings, then city districts, then cities. Carry that onward to its inevitable conclusion, and you'll be creating universes on demand, not unlike what I am trying to accomplish now. But the issue becomes, where does the "art" side of it go, then? To me, art is not about the result. Cave paintings with charcoal and animal blood, Monet's water lilies, Blade Runner's awesome city shots, and the spaceships of Guardians of the Galaxy are all on the same page. They are expressions of ideas, using the tools available to the creators at their time, place and budget. To me, PG, if done right (looking at you, No Man's Sky...), is an artistic expression of coding. Like Michaelangelo trying to undrstand color and Da Vinci trying to understand perspectives, PG is for those who want to understand the deeper structures of expression, be it visual or other. I see PG code as the brushes of the artist, and the code created as the result, rather than what the code itself creates. But this is art beyond an immediate human observation. It is the art behind the canvas. And only if it is good will what is on the canvas be worth any mention.

But that's just me. Let me know your handle on it. And as always...

Cheers, don't be a stranger ;)

Embassy of Time

Whelp.... My last attempt at spurring some conversation was a bit of a bust. Over 1000 views in 24 hours, which is amazing to me, but despite strongly encouraging people to say hello, not a single comment. I'm not angry or sad (okay, a teeny bit sad), but it does seem to indicate that people both here and elsewhere (I have tried the same in other fora) are passive consumers, rather than active participants. To me, that is a bit disheartening, because I love to hear other people's thoughts. Seriously, I would not be able to handle telepathy in a mature, respectful way, no sirree. But alas, I will poke people no more to speak their minds. Well, for now, at least. Cab driver, on to other topics!!

So, you may have noticed the small, discrete image at the entry to this post. That's a test image from my game. The top image is from the surface of a celestial body (technically, a star, but the same code should be able to generate planets, moons, whathaveyou), the bottom one is the same celestial body at a distance. The big deal here is the weird pattern of ever-shrinking polygons on the thing. They are, of course, the product of my new favorite word: Tesselation. Just say the word, feel it, it is goddamn beautiful. For the uninitiated, it simply means that when you close in on a polygon, it becomes more polygons, adding dynamic details as you get closer (and removing them again when you go farther away). Combined with my logarithmic layers of scale, this should allow me to create a graphics engine that can handle anything from subatomic particles in a fly's wing to galactic superclusters in one and the same scene. As stated in a previous blog entry of mine, one use is to create Shadow of the Colossus style kaiju monsters in the game. Or to go one step further and create intergalactic monsters like in Lovecraftian horror or comicbook ultra-supervillains, or even planet-eating mega-robots voiced by Orson Welles, without adding undue strain to the computer (it's running on an 8GB laptop at the moment). The current work-name for the project is the SDNM engine: Size Does Not Matter.

One thing that dawned on me in this was the question of "when does detail actually matter?". I like detail. If I could, I would make everything so detailed you could pick the little hairs off the edge of a blade of grass (go look closely at a big blade of grass, closely. Yes, you'll look like an idiot, but that stuff is complex!!). But that doesn't mean the details actually matter. Minecraft got along fine just on blocks, and retro or fake-retro graphics styles are popping up as a counterweight to the graphics overload of quote-unquote "tripple A" games. Detailed graphics rarely affect story, either. So why have them?

At this point, the argument of "well, it doesn't harm anyone" could be made. True, a game can fail because of overdependence on snazzy graphics and lacking priority on story and gameplay (No Man's Sky, many brown-n-grey shooters, etc.), but if the game is solid, the graphics are no harm, right? Most of the time, true. But there comes a point when details become distractions. Imagine if Super Mario had a busy city in the background, plummers and goombas running around to shop and socialize. The idea might be appealing, it would add a whole new layer of visual mood to an otherwise fairly simplistic game style. But the big advantage of Super Mario is the simplistic game style. You know where to go, when to jump, and anything unusual either sticks out clearly or is so truly hidden that you do not blame yourself for missing it. No distractions, just the game.

Push that to more modern games. Many games have whole towns to walk around, or even city districts (think Deus Ex), but most is just for show. we know, as players, not to expect to interact with much of it, at least not in a meaningful, productive way. But that means that game developers have to counter this level of detail with in-game symbolism to show what can be used, and what is just for show. If we increase that level of detail, at what point do the cardboard setpieces outshine the actual, useful game content? When will half a game involve running through a city of pretty-but-useless background fluff, just to find the one shop or contact that actually has game value?

I'm not at that level yet, not even anywhere near it. But I'm already having similar concerns. My SDNM engine structure lets me create millimeter detail on anything the player can see close enough (technically, it can do it for distant objects, as well, but that is of course pointless). But how much of that would be nothing but distraction? Like the procedural universe of No Man's Sky, how long would it take for that level of detail to become the gimmick that drowns out any work towards creating gameplay? I am sure most of us face a similar problem, in that we let the giddiness of coding something unusual cloud our minds and make us forget to actually make a game. But even if we make the game, with great gameplay, could the level of detail distract players so much that it drowns out the game itself? Where does the line go between level of detail and level of distraction?

I have no answer. Honestly, it bothers me. If anyone has a stance, an argument, some random thought on the matter, please, do let me know (yes, I am trying to make people comment, again, but this is not the same pressure as before). If nothing crashes horrifically for me over the next few weeks, I will most likely be facing the question of "how much detail?" very soon, and having some things to keep in mind might not be all that bad....

Cheers, and don't be a stranger ;)

Embassy of Time

(I technically wrote my last entry the late evening of April 7., so this is still a blog-a-day thing. No, really! Hey, stop chuckling!)

In my first blog post on GameDev, there is a comment from the creator of GameDev, which mentions how common it is for people to read and not comment. I thought little of it at the time. Very few people comment on most blogs I see, so there was nothing unusual about that. I even felt lucky that I got half a dozen comments right from the start of blogging! Then I looked at my number of readers. I average over 900 views, after only aa few days!! My jaw dropped.

See, this is not my first run around the old blogging track. Until about one and a half year ago, I was trying to sharpen my virtual pens with different social media. I grew up with "chatting" meaning to actually talk to someone, face to face, "tweeting" being for birds, and "facebooking" being for, well, really creepy people (imagine a book full of faces, and try not to think of serial killers, I dare you!). But social media is the new thing, and I thought I needed to get my hands dirty if I wanted to do anything beyond fiddling with a hobby. Then life hit, and some things went bad, and I only recently came back into the fray.

The thing is, I never had anything get over 500 views every single time. This is mindblowing to me. I am honestly giddy as a schoolboy about the idea that this many people care to even glance at my ramblings! But it does make me wonder..... why the silence? Half a dozen comments is amazing for a newbie, but newbies tend to get maybe 20-50 views. I don't feel cheated out of comments, I still feel overwhelmed by the attention. But I cannot help but wonder why people are so silent. They may only glance and leave, like modern window shoppers looking for something cool to read (I will do my best to provide it, I promise). They may not really get much from what I write, which is perfectly normal, since I am weird, and ramble, and use odd and disturbing words (I also wear weird clothes, but you don't know that). But it might also be because people just don't feel comfortable sticking their heads out too far.

We live in a world that has never before existed. Talking to someone on the other side of the globe is more common than getting local vegetables. It takes adapting. Right now, on my private Facebook, I am dealing with a bunch of kids who mock me for not seeing that a weird skull on a stick in a field near me was a small deer, not a big dog (the skull turned out to be a bird, actually, just with a deer jawbone on the ground. Yeah, I posted those pictures there for a GODDAMN REASON. I live in a weird place!). They have nothing better to do, and their personal pages are nothing but selfies. We can talk to anyone... but we apparently have little to say. And I think that's a shame.

My dad has been having some financial issues lately, so last birthday, I used it as a reason to ask him for something I've long wanted from him, but never had an excuse to ask for: I wanted to know about his childhood. He never talks about himself, is a bit shy, and thinks he is not interesting. We talked a whole day about all kinds of things he had experienced, and he now is all giddy for when it's warm enough to go visit his birth town to see places he remembers. I talk to people on trains or around my home area about their lives, and they all start out thinking they have nothing to say, and then they turn out to have had crazy artist parents, know about hidden bank vaults in town, or my favorite, an older woman whose dad had been a veterinarian during WWII (I live in Europe) and who knew that if someone called about a pig with a broken leg, a British paratrooper had landed and needed to be smuggled to safety in his trunk. That's stuff from people like those who walk around you every day!!! But everyone thinks they are not interesting. Because, hell, no TV channel has come to interview them, nobody is asking to publish their memoirs, nobody is trailling them on social media wanting to know what they ate this morning or if they had more than one bowel movements today (I kid you not, there are people discussing those things. And no, I never visited this page, and neither should you, I just shiver to know it exists....). And yet, we think we have nothing to add to the conversations around us. And in the worst cases, others make sure to keep that illusion alive, because otherwise we may steal attention from them.

This is a website for people who want to develop games (or else I completely misunderstood the name of the site!). But game development is much, much more than coding, or someone would have made a clever program that produced games nonstop. In one of their freaking awesome videos, Extra Credits suggest game designers to-be should go out and experience the world, because you need to have something other than code and math inside of you to create something stunning. Never watched their stuff? Go do it right now. I am not worthy of your time if you have yet to spend it on them. But the point is, if we want to do more than fiddle with code (which, granted, is damned awesome and makes us totally cool), we need to see stories around us. We need to see stories worth telling and hearing in things, people, places and more that we see every day. Why is that building not in use, when it's placed so nicely and looks so big? Why does that woman sit on the bench every afternoon, reading in a notebook? Why does that coworker always take an inefficient way to the cafeteria, when the building is designed to make it easier for him? But most of all, we need to look for the stories in ourselves.

In my entry yesterday, I asked people to write some silly little story in the comments. It didn't have to be true or interesting, just something, to think about what a story contains. It's my only entry that has absolutely no comments. Do stories intimidate us? Are we afraid of being viewed as boring if our stories cannot rival blockbuster movies? Well, did you like the example stories about pig-leg paratroopers and such that I mentioned? If so, then you most likely have dozens of stories worth telling! But we are trained, these days from birth, to see ourselves as lesser stories, compared to the commercially boosted stories which, seriously, are mostly rehashed and overhyped. We are stories. That includes you. Yes, you. You are stories. Want a true and banal, seemingly uninteresting story? When I was a kid, I once tried the "spin around and try to run straight" thing in a big sandbox at my school, the kind with high wooden walls (modern ones probably have rubber padding and warning lights, but dammit, we were wild kids!). I, of course, ran like a drunk, and smashed right into the wooden wall. I was okay, but I got a little round scar on my elbow. Funny thing was, it healed quick, but it left a round mark for over two years! Then one day, it just disappeared, for no clear reason. Did that hold your interest? Because that was what counts as tedious, banal and unimportant. It's a nothing story. You can top that.

But we keep quiet. Maybe to not look dumb, in a world that loooves judging people. I am trying to get back into social media. I hate the limelight (my random-stuff website is actually named "Limedark"), but I need to get over myself and start interacting, if I want to do more than fiddle with code in the corner. I need to talk about raw ideas and weird little issues. I need to think that I'm worth listening to, even if less than 1 of 100 react. Even if I get next to no views. As a kid, I needed to learn to talk to people, too (I'm technically an Asberger's Autist, only nobody told me as a kid, so I never developed like autists are 'meant to', quite the opposite in many ways). I ended up forcing myself to make smalltalk (the "I have no idea what I'm doing with my words but hey you mind if we swap inane mumblings for a second" of conversation). I said "hi" and smiled to people, for no reason. Freaked a few out, true, but most found it adorable (I think?). I asked dog-walkers their dog's names. I asked people where they got some thing they had, or how to get to some place I knew perfectly well how to get to. It was hard, but it made me break out of my corner. I still do it now. It's how I manage to write this without wetting myself in an existential implosion. I have a whole list of social media that I need to figure out (again) how to make use of, even if it hurts my brain to have to talk to people in this weird, one-sided way. But that's me. What about you?

To round this rant off, I'll take a first step. I'll show you mine, in hopes that you will show me yours. I already had two people nervously (okay, I embellish, they didn't break down crying or anything) show me their blogs on GameDev, blogs they worried were not good enough, in one way or another. And they were perfectly fine blogs, several posts even grabbing me for more than a little while. So I hope that by showing you all my sad, failed attempts at doing social media, you will feel superior enough to show me something that you would like to make interesting (or that already is) in the comments. Like my last entry, I may fail. I may fall flat splat on my stupid ugly crooked-nose face in the mud and have everyone laugh at me. But dammit, nobody is going to care about something they never see! So I'll show you mine. By playground rules, you have to show me yours, or buy me a lollipop (and I expect you to pay for shipping it to me).

Tumblr Facebook Twitter Youtube Vimeo Flickr Instagram Soundcloud Reddit MySpace (stop laughing!) Pinterest DeviantArt (<- my most active, oddly enough) Tapastic Wattpad CGSociety ArtStation

Yeah, it's a mixed bag. The project I'm working on is... complicated.

Your turn. Please don't make me look stupid....? Please?

PS: If anyone wants to, I'd love to start a conversation / mutual help program for getting more attention to the things you post, whatever they may be (except the site that shall not be named!)

Embassy of Time

(Note: Despite my bold start, I will not be able to keep up a post per day, so enjoy it while it lasts. Or enjoy that it won't last)

In my last entry, long-time listener and friend of the show, Cozzie, noted that it seemed implausible for a game to ever use procedural generation (PG, or ProGen for the millenial hipster crowd) to make storyline quests that tapped into the main narrative of the game. I made a lengthy argument about how it mattered how you framed the narrative. I will now pull a Hollywood and reuse my material, in slightly updated form.

At first glance, I agree with the notion. We have all tried a game that had some really slapdash missions/quests/jobs/internships/whatever. Fetch quests are a classic: "Go to there and pick up that thing and go back here". Rinse aaaand repeat, ad nauseum. These are a good example of PG gone wrong (or really lazy writing gone really, really wrong). They involve minimal effort to make, and can be used in many different ways, with difficulty being easily managed through distance to be crossed, obstacles known on the way, number of things to get and places to get them from, and so on. It's a Swiss Army knife of quests. And like those knives, it really does a poor job of most things it's used for. It's just very accessible.

Dungeon runs, IMHO, are not much better. The dungeon may deliver some variety, but on a story level, "go through this dungeon and kill this ting", or even "fetch this in the dungeon", which makes it just another fetch quest, are not a huge drive of story structure. But since so many games are about things done in a dungeon run anyway (killing stuff, mainly), those get a kind of free pass from story structure criticism, at least if they are not done horribly bad.

But when you start to look at it this way, everything in games starts to become a target. With rare exceptions (The Last Of Us springs to mind), games have storylines mostly along the "go there, get/kill/do this" line. They need that, because they are games, not books or movies. Players need a level of freedom, to avoid Mass Effect style story collapse (I'm talking about the ending, of course). But that freedom means you can't really calculate big dramatic spectacles into it. If you want carefully crafted stories, the storyteller needs to step in and take over. Call it the "cut-scene dominion", if you will; even if there is no pre-rendered animation, the game freezes the freedom of the player for a moment, to deliver exposition.

So we have simplistic assignments, or restrictive exposition. How can PG fit into this? Here's my take: Think of Star Wars. What springs to mind? If you're an old geezer like me, or just a young whippersnapper with good, classical sci-fi roots, you probably thought of a young Luke Skywalker, leaving Tatooine and having space adventures (and de-hooding in front of Jabba the Hutt in the beginning of Return of the Jedi, because man was that a cool scene!). Maybe you think of Obiwan's wise(?) words or sacrifice against Vader. Maybe you think of Vader choking snappy officers in hilarious ways. Or maybe you just mellow at the thought of young Harrison Ford being all dashing and slick as Han Solo. What you do not think about, I am betting, is the larger political clashes going on around that galaxy far, far away. Because, let's be honest, once things became about the big picture, a lot of people tuned out. We want lightsaber fights and tricky spaceship maneuvers, not a full briefing of all those funky screens in the war rooms. Those are just there for the pretty colors.

And in that light, PG has very narrow limits. Sure, you can have PG mold stories and insert elements of a larger narrative into them (replace "powerful figure" with Luke or Vader, for example, and just roll those random encounters up, baby), but those are going to be lackluster, and they will only become storyfodder for more cookiecutter quests like fetching or dungeoning. Sure, this can make the game run (heck, World of Warcraft has made billions over the last decade or so almost entrely on that), but it can't make it fun (I stand by my comparison to WoW). So are we back to intricate stories designed by human hands and delivered mostly in cut-scenes? In my opinion.... no.

Go back to those war rooms. Go back to the bigger picture. Forget Luke, Han, Leia, Obiwan, Vader and the rest. Think world before story. If such a world / universe is properly made through good PG, there are plenty of moving pieces in it which need to be adjusted for. Those adjustments can either be a few numbers moved around by the computer in the background, or it can be actual events taking place around player characters! Faction conflicts, embargoes, unpopular (or extremely popular) leaders, crime waves, social turmoil, protection of the status quo, and many other things are ripe for use as quest sources. Maybe the overly rough police force is cracking down on a city district, and some people want their loved ones to get out safe. In a typical game, that might mean someone wrote up the tense police situation and had a few NPCs ask PCs for help. But with PG, it looks very different. The details of the conflict can be elaborate, because it is (presumably) a set of background events that are procedurally generated, based on population algorithms inherent to the game. The conflict is not designed, it emerges on its own. And in its wake follows public reactions, overall a simple faction attribute adjustment (the "Public" faction has no leaders, but it has plenty of resources and goals, not to mention attitudes). What is needed is not a PG engine that creates stories based on this, but one that translates it into stories. PG can be used to set up a basic situation (police conflict) and needs (safety for loved ones) as part of a greater system of population dynamics, no more complicated than your average physics engine. Which is to say "pretty complicated", but not "impossible". It's data reacting to data reacting to data, rinse and repeat.

The key to this is to acknowledge that games are not books or movies. Games don't tell stories. They create stories around the main characters, and let them experience whatever and how ever much the player wants. The new Doom did a fantastic job of poiting this out, with the protagonist throwing away screens that tried to tell the story, because you just want to kill demons, dammit! In that case, the real story was going through the situation (there are demons) and reacting to it (kill them). A PG story/quest/mission/dance-off engine can use the same mentality. Set up the situation, and motivate players to do something. Then maybe, just maybe, have some algorithm mash together words to form some expositional excuse. But let the situation birth the challenges, rather than adhering to a rigid story structure. And that situation, of course, then becomes the backbone narrative to keep things together. The PCs don't run the droid blockade because Luke is fighting the Emperor for control of the galaxy. They run the blockade because people on Bomatalah VII need the medicine they carry, and the droids want to confiscate those. All this just happens because of the conflict that is embodied by Luke and the Emperor clashing somewhere else.

The big problem with this kind of "situational storytelling" over the classic dramatic storytelling might well be that there is a certain kind of drama that a lot of game designers, and even authors of books, movies and especially comicbooks like to promote: The big personal drama. Want to see it in its purest form? Watch a classic soap opera. They overuse it to the point of violating it and leaving it in a ditch on the side of the road. Everything is someone's great emotional outburst, and exposition comes in a steady, nauseating flow. Script writers love this. The feel of writing a grand emotional scene can be a rush. But it's theatrics, and belongs in theater. A complex PG story engine needs to rely on the practical challenges of what might well be day-to-day life. Getting paid for a job, finding good, cheap parts for upgrades, convincing a grumpy wizard to teach you a certain spell, and so on. Game characters don't do grand drama well, at least not outside very well written cut-scenes. Don't fight that, embrace it. Let the grand epic be sewn together from dozens of smaller stories. It's less "university drama class" and more "drinking buddies swapping tall tales over a few brews". And that, that a PG story engine can do.

Today's challenge: Tell me a very short story. The trick is, it can't be a very dramatic, rock-my-world story. Tell about the time you had to find your cat in a really smelly alley, or that time when you tried to find an address in a foreign town and ended up walking around for over an hour. Tell me a small, undramatic story about you having to deal with something. It does not have to be true, or even realistic. Just tell me a small story, and leave the big drama to would-be screenwriters and Mark Hamill's possA(C).

Cheers, don't be a stranger!

Embassy of Time

A comment to my previous blog entry was pretty right on the nose: Stream of consciousness. I do that a lot, thinking as I write and ending up writing my thoughts down more or less as they come to me. I'll try something else this time around, but do go to that entry and see if my thoughts don't happen to align a little with yours. Also, I'm still running a test there, so... can you stand not knowing what kind of test it is? Just asking...

But more constructively: I'm trying to use science to recreate entire universes inside of computers. I work a lot with math, even outside of programming (I teach mathematics), and over the last half to whole decade, I've become rather angry about a certain topic. That topic is procedural generation. Now, I'm not angry that people use it. In fact, it bothers me more when commenters and such start ranting against PG as if "oh, it can't create anything truly interesting *insert arrogant cackle*". Let me make this clear: PG can create anything a person can create. Wanna know why? Because a person created the PG. If you wanted, you can create something cool and then reverse engineer it to make it PG. Design a cool storyline with cool characters inside a really cleverly designed space station or dungeon or city or whatever? Take each piece of it and create alternative pieces that could function in their place just as well. Pick a differently designed gun, a different height of scenary to be traversed, etc., and let the game pick which variation it uses every time. Voila, procedurally generated game, equal to what you could make n your own, because you made it. If PG creates something crappy, it's not because it's PG, it's because the person using it is not good at using PG. A painter has no right to blame the brush, a carpenter no right to blame the hammer.

What I suspect people actually mean is that PG does not create anything truly new. It just takes bits and pieces that humans made and shuffle them together in new ways. And for games like No Man's Sky, Spelunky, and others, that's true. But that's because their PG was designed that way. It's a testimony to humanity's desperate craving for control over its creations, and their resulting stiffling of creativity. We don't want games to create something really new and weird, we want them to create the things we imagined, but to do the work of making it for us. PG is not a creative tool, it's a shortcut. Hollywood would be proud of us wanting to cash in on mixing the same elements again and again and presenting them as something new.

I, on the other hand, am a card-carrying lunatic. I want madness, chaos, and unexpected results. But the First Rule of Procedural Generation is "Never go full random". Truly random results are nothing but meaningless chaos. It's the game equivalent of TV screen static (something that so many young people have never really seen, I suddenly realize. If that's you, google it, and behold the world of the past). So I must decide on what chaos to kill and what chaos to nurture. I make those decisions with my trusty sidekick, SCIENCE! (biatch)

starweb___holy_crap___by_embassyoftime-db1hf0w.png.jpg

That there is an image of my universe during a test. I start with random dots of light, then place invisible points that attract them based on proximity. It's an older version. A slightly newer version is this, a universe screenshot from 9 random angles:

newniverse__big__by_embassyoftime-db3rdr8.png.jpg

Each dot is a 'hypercluster', millions of galaxies seen from such a distance that they resemble just one dot. More up close and personal, the early test galaxies (colorcoded for testing) look like this:

galaxy_shower_by_embassyoftime-db3y5jx.png.jpg

These pictures are from different versions of the program, hence the sudden appearance of a HUD. Other versions have the actual stars and planets, but that is where a lot of my problems currently arise.

seaside_sunrise_by_embassyoftime-db39af2.png.jpg

smooth_sun_by_embassyoftime-db3a964.png.jpg

See, the big problem is not how to create the PG mechanisms to build an entire universe. I did this stuff in little over a month, on the side. No, the problem is how little things grow out of proportion. How a slight rounding of a tiny, tiny number can escalate and throw everything out of whack. Right now, I am rewriting everything to deal, again, with a way that double-precision floating number decimals (a.k.a. 'doubles') are handled in C++, my programming language of choice. The entire core of the matter is that detail is added along the way, based on some complex math (although the math I test it with is a much simpler, boiled down version of that, or madness would ensue). Here is a less realistic screenshot to exemplify that:

Munching%20Nachoes.png

One triangle polygon gets created, and as you approach it, it tesselates, breaking into smaller and smaller parts, for added detail (no detail added here, just the basic tesselation). What happens when something gets rounded just a little bit wrong? Things jump around, that's what! Suddenly, the new, smaller polygons do not line up. And then the next rounding problem makes them act even worse, and so on, until everything goes everywhere. This is my battle. This is the saddening fact of creating a huge universe to fit inside a simple laptop: Your entire work hangs on a few numbers being rounded off. I never had the "three days of work to find a 1 should be a 0", but I did almost have "two days of work to find a 2 should be a 4", so I feel like it counts.

But when it finally succeeds, I intend to reap the whirlwind. Not only can this create a universe of infinite (truly infinite, not this "very big number" hogwash) content, but it can make things in every size. And I mean every size, from subatomic machinery to monsters eating up galaxies (or something less insane, like the kaiju-like creatures of Shadow of the Colossus). The code doesn't care, it just puts in dots and polygons.

And with that level of flexibility, SCIENCE! (biatch) can make its mark on it. PG is not just "take these 18 modular pieces and slap them together randomly, over and over again". Algorithms exist for basic artificial life, for geological processes, for atmospheric phenomena, for stellar debris, for the spread of cultures and technologies, and for more. We are still living in the "I must control my assetts" era, but only because people use that mindset when handling PG. If you give in, chaos may give you more than that. Only you are no longer fully in charge.

All of that hinges on the rounding of small numbers. Ever wonder if even God knows the last digit of Pi??

And today's challenge to you: Write something in the comments that you do not believe procedural generation could ever create, and I will try(!!) to argue you wrong. No exact results ("PG could never recreate Legend of Mario: Vorpal Kombat level 31!"), but things that you might see, or want to see, in a game. Don't worry, I'll be gentle with you!

Embassy of Time

Ahhh... Always start with a decade old Batman quote... Makes you seem uptodate!

At the end of this, I will run a little test. Not of anyone reading it, per se, but of the notion of writing here. See, I grew up in the olden days, and actually had a pen friend. For a few months. As part of a mandatory school project. But still! Now, social media is everywhere, and I have a hard time moving my brain from "every now and then, I will write some short thing to someone far away" to "I must speak constantly about myself to thousands, or I do not exist at all!". It's a huge adjustment for me, one that has failed to truly set in, even after years.

But, to mangle another Batman quote, "why so meta?" It's bad form to ramble on about how blogging is not your thing when you're clearly trying to blog. So why talk about how communication has changed?

The title of this blog is "Creating Complexity". I think hard about titles, again because I am stuck in a mindset where everything has to be done with great care, because there is so little chance to do it. An old mindset. And the title was picked because I have an obsession with complexity, and anything I do will have some sort of complexity in it. Being on GameDev clearly means I want to develop games (that is what GameDev means, I assume? Right??). And the complexity in that is something I struggle with currently. I am creating an engine for future games of mine, and the current (recently rebooted) incarnation has been renamed the "Size Does Not Matter" engine, or SDNM for short (pronounced "Sudden M"). Earlier incarnation already worked.... almost. It's polish and precision this time. But that's not a small task, either...

The name, like the title, means something. I am doing an engine for tailoring endless universes, where size quite literally does not matter. The last incarnation had an octillion (10^27) stars in a vast universe, and you could fly through it down to any star. The incarnation before it even let you go to planets around that star. The detail screwed up, though, and bits of planet (polygons, not cool chunks of dirt and rock) began to get horribly misaligned. Hence, new incarnations. But that's the basics of it: A game that does not limit anything on sizes. From the entire universe down to a grain of sand, it will show it, at any level of detail. Once it's done, of course.

We've all seen similar ideas. A universe sandbox. No Man's Sky fell flat on its face with hype trying to make it work as a game. What will I add that they did not?

Complexity.

See, I'm not a programmer by trade. I teach math. And I am pretty good at math. And science. Both natural and social ones. And languag, history, and all the other stuff found in the reference section. I learned programming a few years ago (well, I learned C++. I'm old enough to have learned raw HTML, BASIC, JavaScript and even COMAL back in the day), and last year I did an overhaul of all the sciences, expecting to teach them as a collected course at some schools. It fell through, but I discovered something odd. Patterns in the noise. An elegant chain of functionality that brought things from subatomic particles up to conscious human beings and the technology they wield. And it dawned on me that all this complexity can be turned into code, and wth some creativity, into a game. We all raged a little when Spore turned out to be just a gimmicky kid's game with a neat creature creation kit attached. No Man's Sky needs no introduction. And people are getting worried about Star Citizen. Some of us even have a grudge against the juggernaut Minecraft, for failing to live up to its full potential, settling on a LEGO worldbuilding kit. It's a feeling I have known ever since I got frustrated about beating Civilization II at the highest level. Why is there no more?? Why can't I develop futuristic technologies, why can't I go to other planets, why does the game just end arbitrarily?

I want my first major goal to be to fix that. Once the scaling system of the engine works, I have math to implement freeform construction systems, chemistry engines, evolution engines (up to simple primate style animals, not true social intelligence... yet). The patterns in the noise, turned into math. Complexity.

But that brings me back to "why so meta?". We all know that creating an engine is nothing. Creating a game is more meaningful, but it is not the real hurdle, either. What you create is just the platform you do the real stuff from: Communicate. Communicating ideas is what wins people over and gets eyes on you and your work. And I still suck at it. The engine is part of my overall project, the Embassy of Time. The website is being remodeled, slowly, as I try to find the right form to present everything, and create some content. I'll go into that another time. Maybe. This is me trying to communicate that I even exist, and that's hard enough for someone like me, who prefers to have his face in books and screens, trying to tear new answers to old mysteries out of everything. I have combed the net for ways to communicate those ideas, and set up accounts on everything I found. Heck, my usual writing grounds are DeviantArt, for no other reason than that some people actually noticed me there for, of all things, some stories I wrote! But social websites for writing, 2D art, 3D art, comics, photos, video, even architecture and more, I'm on all of them. And my accounts are empty, because I obsess about the complexity, and forget the communication. How does one talk about creting complexity, when just the talking is complex enough?

In the end, this is just a mess of stuff about me, scratching the surface of what I do. More will hopefully come, as I straighten my thoughts out into words, and hopefully even get some eyeballs on me. This new world of "shout or wither" is hard for me to deal with. My complexity is in my head, like I bet many others have it.

Which brings me to the test. If you stuck with me this far on this first post, please leave a comment saying what YOU are trying to do. Why are you on GameDev? What thoughts make your brain go into overdrive late at night, when sleep is what you should be doing? Who are you? Do you blog about it, here or elsewhere? Who are you? What are you?

What am I?

I'm Batman.