• Advertisement
  • entries
  • comments
  • views

About this blog

Ponderings of someone in over their head...

Entries in this blog

My work on making scientifically smart games continues. I have been dabbling with some educational game ideas lately, and happened to notice that an old test-of-concept of mine was still online. Here it is: http://nakskovuniversity.com/

The idea is very simple: Distract the player/student from the educational nature of the game by making the challenge non-educational, and slowly increase the challenge. It's just a set of capitl training sheets, where the player/student gets quizzed on the capitals of countries or states. But it starts with just one question, and every round another question gets added, and the quiz starts over. So every round's question gets repeated in later rounds, enforcing memory. And to reduce the challenge without reducing the educational benefit, the answers to every new question (but not the old) is given at the strt of the round. So let's try African capitals:

Round 1: What is the name of the capital of Republic of Congo? Answer: Brazzaville

It tells me that answer, then asks me the question. Fairly easy to answer.

Round 2: What is the name of the capital of Togo? Answer: Lomé

Two questions get asked, each has both those answer options, Brazzaville or Lomé.

Round 3: What is the name of the capital of Cap Verde? Answer: Praia

Three questions get asked, three answer options each. And so on.

This is a very basic, but very efficient, way of training a fairly rote subject. It is also easy to program. My goal for now is to use this basic philosophy to create some training programs for different things. But most importantly, playing it feels like plying a memory game, not like studying. I hope I can expand that concept.

A bit shor tone this time, I know. But I would like to get back to the grinding stone on this one, and talk less about the work, and do more :)

Gamification. It's a word that has been thrown about a bit this last decade. Most just use it to describe awarding points for trivial or easily ignored tasks, to encourage people to do them. Points for cleaning the house, keeping a score on your pedometer or whatever fancy new fitness-on-my-wrist is popular, workplaces trying to foster ambition with prizes and competition. People are realizing that adding aspects of games to things can easily and cheaply push people to do more. But I have yet to see anything be truly gamified, i.e. turned into an actual game. It's a weird concept to wrap your head around, so let's try to boil it down a bit. Firstly, we focus on something I actually know a bit about, education (I'm a tracher). Not fitness, not work efficiency, just learning academic stuff, like biology and history. Second, rather than trying to add point systems to everything in an attempt to turn it into a progress bar (I love Khan Academy with all my heart, but their scoring system just feels so weird....), let's take an actual game and see if we can use its ideas to bridge the gap. I am avoiding computer games here, simply to keep it a bit, well, simple. To make it an actual effort, let's take something that does not remind us of academia, which sadly games like Trivial Pursuit do. Let's take the surprisingly popular comedy card game (with tons of expansions) Munchkin, from Steve Jackson games.

The essence of Munchkin is that you have some cards that you can use to give a fictional character abilities. You then flip random cards to find monsters to kill with those abilities, to take stuff that gives you more abilities. The game ends when someone has grown strong enough to have a "level" ability of 10 (20 if you use Epic rules). What is fun about this game? Well, in my experience (and for honesty's sake, in my opinion), there are these funnies of playing Munchkin:

- The content humor: Munchkin is based on cards. Each card has one thing described, like a skill, a weapon, monster or a treasure. These are described and designed with puns and satire of genre gaming like fantasy, pirates, horror etc., mostly rooted in old-school tabletop roleplaying. So you may have to fight a zombie or a dragon. Or you may have the very easy fights against a potted plant or goldfish (yes, those are real monsters in the game). You can use cards to modify yourself and the monsters, like fighting an ancient and undead potted plant with your fancy battleaxe. Cards may seem to contradict each other (ancient and somehow yet young dragons?), but a part of the fun is just the ridiculous situations set up by the mix of cards, easpecially when other players use their cards to influence a fight. Which beings us to...

- Cooperative sabotage: To keep others from becoming overpowered and winning, players can influence fights and alter each other's characters, either helping out or throwing wrenches in the gears of one another's plans. This is probably the most strategic part of the game, figuring out which cards to keep and when to use them on others, or yourself. Allainces are fleeting, enemies are forever!

- Creative overview: Part of the enjoyment of the game is to simply see your character, and the character's arsenal of tools, grow. There is a clear element of hoarding in this, with weapons and armor and magical or techie gadgets accumulating on the table in front of you like a physical character sheet (which I just now realized it actually is). Building your gear and dealing with other players cursing or otherwise messing with it is a whole side-game, with much of the humor and cooperative sabotage from the main game working just the same.

I chose to ignore the purely social aspect of playing a game with friends, because that is a bit harder to quantify and honestly a bit outside the scope of this relatively short piece on the topic.

How could we transfer the fun of such a game to academic studies? The first obstacle might technically be the least important, but it still seems, to me, to matter: Narrative. Munchkin has a simple story: You and your 'friends' (whom you may beat the crap out of in the process) are hunting treasure, and you go kicking down doors in a dungeon/spaceship/haunted house or whatever to find it. Monsters show up, you deal with them. Easy enough, right? So can we do something similarly simple to explain having to deal with mathematical equations and historical eras? And do we make them competitive, or just single-player? Some ideas, off the top of my head:

- You fell asleep while studying for a test. Now your brain is trying to put a ton of stuff together, hunting the knowledge in your head like treasure.

- You are competing against fellow professors for tenure. Hunt down the coolest academia for your next publication to impress your univeristy!

- You are starting a civilization from scratch. Knowledge of the ages is needed to advance, possibly tech-tree or skill-tree style.

There is also the option of not having a narrative at all. Randomly drawn cards of words, chemicals, social movements or the like can be combined Rube Goldberg style into bigger things, and the biggest thing wins.

The next part becomes the rules structure. Essentially, this is easy: Getting certain cards raise or lower some kind of stats, which are used to get more cards. The question is what raises or lwoers what, and how are new cards gained (I am sticking with the card analogy, for simplicity's sake). The simplest model is to just draw randomly, but where does learning come into it? Each card may teach by recognition ("oh, the first punic war, I got that last time, too!"), but the real power of a game is in the use of cards. Combinations can be used to learn how things fit together (words, atoms, historical events, etc.), or cards may be traded for something they contain or cause, or something from a similar category (swap your adjective for one already in play, not only giving you a more useful card but maybe making someone else's played sentence more nonsensical; break a molecule down into atoms, if you have something that lets you do so; swap Pinting Press for one of its consequences, Libraries, to advance your technology score). This is the strategic part of the game, resource acquisition and trade. It also includes the overview, as it means having a lot of things that you can use, if you can keep track of them. Limits to trade or belongings can help define the game, and cards may alter them. This is very basic, non-gamification game design, so I will not go too much into it.

And then there is the goal, how to win the game. Honestly, there are too many options fo rme to list, from reaching certain scores to managing some central task, to wiping out all other players somehow (or making them join you).

It should be clear that this entry is very much a set of questions in my mind, not a set of answers. I have thought about these things for years but never settled on any truly great answers. I am very open fo rinput and would love to get a small discussion going on creating games like this, with education in mind, without making traditional "school games" like Oregon Trail and others that are too much school and not nearly enough game....

Well, I have become a rare guest these last few months, haven't I? Sorry about that. My deep dive into the sciences related to my game ideas has pulled me into a very different "game" project. The people that wanted me to do a presentation are still talking about things, but one of them offered me a small while-we-wait project, designing an education gamification website. As some may have figured out, I have a background in teaching, and I have used games programming in that line of work before. Mixing educational psychology and game programming, I have developed a basic set of challenges (they're too simple to even call games, I feel) that should teach anyone a ton of stuff quick and easy. I did the programming (for a small demo, click here), now I'm collecting a TON of material to fill in it. Currently going through some of the finer details on astrophysics. Got a lot ahead of me!

So the big philosophical debates are not coming from me right this moment. But if you want to learn or brush up on a lot of book knowledge, I will soon have the thing just for you ;)

Little over a month ago, some guy noticed me by my nickname on another website (I use Embassy of Time several places), and asked if I was the one who also posted on GameDev. I said yes. Apparently, he was amongst those reading my scientific ramblings (like this or this) on the site. And he also happened to be a small-time member of a network of personal investors, so-called "business angels". Now, I've run a company before (web TV and 3D animation, not game development), so I know that a lot of people make big claims, and even if those claims are true, you don't win the lottery from just being noticed. But it was an interesting talk.

Then, about a week ago, he contacted me again. A couple of his colleagues (I have no idea what investors call each other) wanted to see a project suggestion on some of the things we talked about. Part of why they wanted to see this was that they had a look at my blog in here and wanted to know more. So now, I am working on a presentation of some of the things I have worked with on a serious science-based game. I am pretty nervous, and very open to ideas from people in here on how to dazzle these folks!

It's not a big blog entry this time, I know, but I felt like letting people here know, and giving a big thanks to GameDev.net for being a community where some lunatic with a science fetish (me) has a chance to get noticed! If this works out well, I definitely won't forget you ;)

Quick status update for anyone who may be actually following my rants: I still do the kitten orphanage thing and recently took in a homeless and very pregnant one, who gave birth 2 days ago (four tiny kittens, all still alive). Expect.... lowered volume from me these coming days :)

A while back (years, because I'm ooooold), I came across some articles about a "game development language". It was apparently a hotly debated topic at the time. The idea was that there should be a programming language, just like Python, C++, Java, or many others, which was directly designed for making game development in it easy. I never really got the deeper points about structure and features that they made, but the notion stuck with me, mainly because it smelled a lot like the stuff done by modding communities, i.e. creating tools for modding various games. I know modding mostly from Minecraft, and things like Forge (if I remember the name correctly) provided a basis (language) for more easily modding the game. As a, back then, fairly newbie hobby game programmer, I liked the idea of not having to deal with memory structures and screen formats to 'just' create a game.

Fast forward to now. I have set routines for programming most game projects, and like most low-level devs I know or know of, I have libraries of standard methods for getting things done. If I need to do something, there is a 50/50 chance I already have most of it done somewhere, ready for transfer into my project. But once upon a time, I, too, was starting from scratch.

Yesterday, someone in the forums asked about how to start programming games, and there were some suggestions of GameMaker and such. I added OpenGL/C++. Why did I add something that seemingly advanced for what was clearly a question about taking the first babysteps? Because I have built a routine that makes it pretty easy to get moving in OpenGL/C++. It takes a minute to explain, and then the newbie can start putting some things together. And instantly, I started to think back to the whole 'game language' and modding thing. And an old thought struck me. I think it might be time we made a new way of getting into game development.

It's an old thought, as mentioned, which I have been kicking around again lately, trying to update it to where I am now in game development. So please, bear with me, not everything is 100% thought through. But the main point is.

I am a fan of open source. Not that everything open source is amazing, but the concept is, to me, the entry to a whole new worldview. Like many others, I learned OpenGL/C++ from the ancient Neon Helium tutorials (they are now called 'Legacy Articles', I believe). They are basically a set of open code, which does stuff in 3D, and they're great, especially considering their age (many parts are obsolete now, but the main points are still strong). Imagine being a newbie game dev, wanting to get your feet wet, and finding something similar, but with a fully functional game. Good documentation, functions set up for easy use by newcomers, and tutorials for integrating new ideas. All the rough and hyper-technical parts just done.

For a quick example of this idea, I can say that I use wxDev-C++ for programming my games. Not because it's new or snazzy or anything. In fact, it's behind on many, many things. And it's ugly, and a bit buggy. But it has one feature that makes me love it above all others: At the beginning of a project, I can simply select "OpenGL", and it creates the full screen setup for me. And by that I mean it provides the complete code for a very basic OpenGL program (a window with a triangle spinning in it). I can focus on thinking about my game math, and not setting up pixel parsers or llama blasters or soil rotation schedules or whatever. It's like having someone doing your taxes for you. For free. Every time.

Imagine a full game like that, one with a full 3D landscape (2D available at request) provided, with basic asset import and generation, model movement and so forth. One where you have commands like "CreateCreature()" or "AddItemToInventory()", allowing you to define the game content variables, instead of recreating everything that everyone has done a gazillion times before. Essentially, a game designed for modding.

Sure, you may say that this would just be a noob magnet, like the Unity engine has started to become, a tool that lets people with no idea what they're doing make some trash instead of taking the time to make something solid. And that would definitely happen. Paint is cheap, so any idiot can splash some colors on a canvas and proclaim themselves to be an artist. But if paint was still as expensive as a few centuries ago, I bet many new artists would never have risen to put their mark on the craft. Code is the paint of game developers, so the amount of code available for cheap or free defines the field as a whole. By taking the first steps for others, giving them a place to continue from, game development could open up to many more people.

But more than that, the starter-kit game described could open up to others. I started my 3D experience long ago (again, I am old) with 3D Studio Max, and it always had cool features. But Blender 3D caught my eye early on, because it had a batshit insane community creating things for it, and it made use of that. Imagine if Mojang had incorporated Minecraft mods at a similar rate, how would the game look now? If a starter-kit game had, say, all the code for someone to generate a world to walk around in and pick things up, maybe some crafting and basic enemies, someone trying their skills at dabbling with that code might end up adding a physics engine, and future dabblers could dabble on with that. This is, to me, the source of organic, perhaps even chaotic, growth. And future generations of game developers could start from there, just like many today start out making mods for existing games. But this game could grow from every 'mod', adding features and thereby new game concepts to be learned from it.

I'm rambling. This is not one of my most developed ideas, mainly because it seems so bizarre, even to me. But we always preach learning by doing, so why does every new game have to start with the dev-to-be coding up the same screen controllers and input handlers? Hand them the damned things to study and learn from, and let them build on the works of others. We know how the wheel works, if people have to reinvent it, at least let them reinvent it in new and better ways, from looking at the old stuff.

If people like this idea, I will consider doing my game project this way. I will provide full code and documentation for new (or experienced!) devs to get into the game making stuff quicker. And people can rant and rave about how this and that is bad about my work, because that lets me know more about how to make it better. In fact, the more people get in a twist about what should be improved, the happier I would likely be. Especially when people go "look, let me show you what I mean", because then I learn, too!

Is this insane? Has this already been done, perhaps crashing and burning and making the kids cry or worse? Would you want to dabble with it, or is it useless to you? I really have no idea where to go with this from hereon, exactly, so I am just improvising. Any reaction might be the one thing to put me on a more productive track....


I won't even start trying to explain what the image above is*, but it's from my game work. Things are moving forward, slowly but.... forward.

One thing the game has is a work-in-progress name: "No Mine's Spore". Most readers have probably already figured out what the name builds on. If not, it's a reference to the games No Man's Sky, Minecraft and Spore. All these three games, and many others, have been presented with amazing promises. Of the three, only Minecraft really lived up to some key promises, but those key promises were mainly "be fun and sell a lot of copies". That in itself is a smashing success in this day and age, but like the other two, the game early on had promises that inspired a lot of fans, but that were not delivered upon, or delivered upon in far less impressive ways than hoped for.

Again, for reference, here are a few of the things that people expressed hope for about those games early on, typically during their alpha or beta, but in some cases also just from unreleased presentations:

No Man's Sky: This was supposed to be the big space exploration game. Gazillions of worlds, each with possible beasts and fauna and geographies, even some traces of civilization. What we got were worlds that looked cookie-cutter, mainly just with different shapes of rocks, inhabited by weird some-assembly-required creatures and retextured plants, and fairly basic space stations with similarly assembled creatures inside. If we forget about the two big issues (multiplayer and some sort of interesting goal/gameplay), the twinkle in the eyes of hopeful fans was to go planet-hoping and experience weird worlds, made by a computer doing procedural generation like never before. But the PG was so limited and flat, and so many things got cut to reach the deadline, that it seemed, in many ways, more like a student project or outright scam than the gaming revolution that many feel was marketed to us.

Minecraft: Yes, it feels weird slamming on the (financially) biggest game ever. But go back a few years, before everything went bills and bling, back when it was Notch and a core team of people trying to push a small, succesful idea to the limits. Or better yet, go look at the difference between mods from early on and mods now, because Minecraft's biggest strength was something people had always been keen to ignore: Fan creativity. My pet peeve revolves around a mod that was made early on, called Cubic Chunks. For those who do not know, in Minecraft, there is a very clear limit to how high up or deep down you can place blocks. Bedrock, a nigh undestructable type of block, is found at the lower limit. At the upper, blocks just stop. You can go higher, but blocks cannot. I don't know the limit now, but I remember when it was 256 blocks, and even when it was 128. CC changed that. It made up/down just another direction, on par with left/right, meaning you could build millions of blocks high. I won't explain how; look it up, it's simple and brilliant. But the concept was never adopted. There were explanations and more, but for unknown reasons, nobody in charge seemed to want or believe in it. Other mods made similar amazing things, like rope bridges, vehicles, highly organized enemy hordes, and so on. But Minecraft never changed much, and these days, mods are mostly "this version of the old tools", or an added dimension that feels a bit like what we have seen before. They are nice, don't get me wrong, but Minecraft showed promise of, again, endless exploration, but this time, with a growth in variety powered by fans, ready to be adopted by the game designers. Minecraft didn't fail in becoming popular, it failed in growing beyond that. Except for a few doodads, players from 2011 can step into the latest version and see nothing different. It's like being handed a thousand LEGO sets and then be told that you have to follow instructions. You cannot draw outside the borders. Minecraft, intentionally or not, promised to be creative freedom. In some ways, it is, but in many, the idea died along the way.

Spore: Like NMS, Spore needs little explanation. It was presented as a gamified simulation of evolution, genetics turned into LEGO-like playthings. It ended up being 5 stages of Pacman and fetch quests, with the last stage (space) being a bit more open, but lacking completely in any kind of game focus; you picked up stuff and dropped it on other planets, in between, again, various fetch quests. The most popular part, which ironically was released as its own 'game' on the side, was the Creature Creator, allowing you to 'draw' living beings and see the game bring them to life, walking around and making noises. Like NMS, it was a promise of immense exploration, only in your creations rather than an expansive universe.

So why do I bring this up? In a way, because I still want all those things. I feel cheated and, perhaps, a little bitter. Spore made me not invest in NMS, because I felt like I had heard the promises before, and I was right. I enjoyed Minecraft for a very long time, longer than any game I have had (unless you count all Civ games as one game), but was frustrated when all the things I saw grow around it were left to wither, even as new things turned up (and later withered, too). I want a big universe to explore, in which both I and the game grow. I want to survive in harsh climates and build something bigger, without arbitrary confinements from developers trying to force their way of playing on me. I want freedom, in a way. And it seems that any time someone presents an idea tha tpromises it, some background politics (to which I count also marketing) ends up screwing my dreams over.

The question is, should we just let promises die, just because those who (intentionally or not) made them never delivered? Should we sit around and wait for whatever game made the promise to be patched and expanded until it, mayyybe, does? Or is it up to those who felt cheated or disappointed to try to keep those promises? Do we wait for delivery, or do we go the DIY route?

The reason I ask this (I assume that "then go do it yourself" is a kneejerk reaction from many, hopefully in a positive, supportive way) is that when you think about it, the DIY route smells a lot like plagiarism. Is it okay to 'steal' someone else's ideas, when they did not carry through on it? A lot of things get developed, and especially presented to investors, as "X, but with Y". Star Wars was famously sold to studios as "an Eroll Flynn (swashbuckling movie star from the early 1900s), but in space". It's a go-to way of making others understand your ideas, and you can see it in a lot of bigger projects. The original Warcraft and Starcraft games were essentially "Dune 2, but with orcs/aliens". Most military shooters are "DOOM, but in [insert historical period]". And half of all movies aimed at older kids or young adults seem to be "Harry Potter/Hunger Games, but with [insert minor twist]". Some succeed, some are too thinly veiled carbon copies. How much has to be your own ideas, and how much can be just you trying to do what you wanted others to do, but they never did?

For those who follow me on this blog, I am clearly struggling with my thoughts on originality, once again. But this adds, in my opinion, a small twist to the issue: It's not just about original versus unoriginal, but also the chaotic expanse in between, where random thoughts and abandoned inspiration have been left to float around, now and then washing up on someone's shore. It's about where ideas can come from without being lazy copy-pasting. My early work on No Mine's Spore has already made a simple(!!) engine for creating literally endless universes of blocks. It is still very clunky and completely boring, basically a test pattern of blocks, but it is the core of what Cubic Chunks promised to be. And along the way, I hope to pick up other unkept promises and realize them. But I do this with the constant thought of "am I even being original, or am I just being creatively unoriginal?".

Of course, the little voice that drives me just answers "who cares? You want it, make it!". I will listen to that voice, and later decide if I trust it...



* Okay, the image is me in the game looking down at a slope of blocks to check that (A) they become more detailed when approached, according to the octree implemented, and (B) that the red ones show up, because they are made red by the blocks around them, meaning very simple block interaction is working. But most of all, it just looks pretty to me!

My still fairly unoriginal work with blocks has reached a benchmark point: I have started shaping the previously random blocks into actual landscapes. Other than the octree level-of-detail thing, it is still just the beginning of a weak Minecraft clone, but way is being made, I swear!

My current struggle is not, however, a bunch of fancy code. Minecraft veterans know that in that game, the world is truly and completely FLAT. Go far enough and it just starts getting weird landscapes, the infamous Far Lands (if they still exist, I have not played the newer versions). At first, this will be similar to my clone. But as soon as it fits my work, I want to break from that strange geography. I want not just worlds, but planets! And that begs the question.... How do you make a round planet with square blocks??

The thing is, sure, I could just make a sphere out of blocks. But if blocks lay flat at the North Pole, they will be edges- or corners-up as you move towards the Equator. Pick a picture from a Google search of a block planet and turn it slowly. Whatever is up is what someone on the surface sees. It is a bitvof a mess in many places...

But I love maps. I have atlas after atlas on my shelves and maps decorate my walls. Loooove that stuff! So it should be easy to find a way to use a flat map, right? Well, no. It is only easy 90% of the way. Sure, going west just means you get to the edge and start over from the eastmost edge. But what about the poles? WHAT ABOUT THE POLES, GARY?!? See, when you get to, say, the northern edge of the map, you need to go... somewhere. The easy solution is just to flip the map over and go from the northern edge and down again. Like putting the tops of two world maps together. But then you get a North Pole as big as the entire world!! Look at flat maps. The Arctic and Antarctic are huuuge. Circling the North Pole is like circling the entire Equator! It works, but...

I went through several options. What I ended on is this: Take a snapshot of the globe from two opposite sides, with the poles at top and bottom. Now, stretch those two pictures into squares. However, the corners of each square are north, south, east and west! So the resulting squares stand at a 45 degree angle, balancing on the South Pole corner. Now slap them together, and you get a two-sided Flat Earth, which is square.

This is the best combination of simple and accurate I have currently found, but I keep having nagging feelinga about how the flat landscape will look when crossing the poles. Who knows, I may just end up using the original flipped world map. I am no cartographer, and it is starting to show! I guess my maps and atlases can only help me so much....

Have any of you had that dilemma?What did you end up doing?

The titles will only get weirder from hereon, people. I apologize, in advance.

Aaaaaanyways... I am sinking my already soaked feet deeper into the murky waters of "maybe original, maybe not". As stated in an earlier entry, I have taken the advice of trying not to be too original with my project, lest I go spinning off into The Void, never to return. As also stated, I am brushing up against unoriginality by doing what I did back when I first got into C++ and OpenGL: Making a Minecraft clone. Except not really. And today's entry is heavy on the "not" part of that!

One thing I like about  lot of games, which Minecraft sorely lacks, is dynamic detail. When things are far away, make them rough. When things are close, make them detailed. So I brushed up on octrees, and I just did the first real test of the results. It's just a sloooow building up of the fundamental functions, but it seems to work. So I can go up to my Borg-cube-like test chunk of blocks, and it looks like this:


Aaaaand one step closer, and it looks like this:


There is no correlation between any of the cubes inside, it's all just random. But the idea of one big thing breaking into a lot of smaller things is now planted. Now it just has to grow. And be optimized, because this stuff is.... whew....

What this means for my "original or not" struggle is that I am still following a well-known, established model: A Minecraft clone. However, I am already moving away from the strict Minecraft format, and staking out something of my very own. This is a balance I would like to keep for a long while on this project, the balance between "I'll just do like others" and "I'll do my own thing, dammit". It seems a good way to have my cake (i.e. follow the advice not to be too original) and eat it, too (i.e. be somewhat original).

Let me know if any of that makes sense and/or seems interesting, in the comments!

I still remember the weird feeling of "I was there" that struck me the first time someone reminded me that "First Person Shooters" or FPS used to be called "DOOM clones", because DOOM was seen as the "original" FPS. It's a weird transition, going from one product-linked title to another openly classifying title. At some point, for some reason, DOOM was no longer the end-all and be-all of shooting games from a first person perspective. Well, I was more a Wolfenstein guy, anyway, but still....

And today, we have tons of FPS games. We even have some variation, other than "what guns are there?" and "are the enemies AI or real people online?". Player Unknown's Battleground (PUBG) is not even being called a FPS, but has seemingly launched the subgenre of "Battle royals", while "Arena shooters" run from Overwatch to the insanely high-speed Tribes: Ascend, not to mention all the more DOOMish games like the Deus Ex series and Mass Effect. And even they are diversifying; unlike Deus Ex games, DOOM really wasn't into the whole "stealth" thing.

I need to think about these things right now, because I still struggle with my recent issues on originality. A commenter in one of my earlier blog entries even commented that I should stop trying to do all kinds of weird things, that I had a sort of responsibility to focus my work around what a game needed in order to be fun, rather than my own needs to dabble with new and original concepts. That comment really bugged me, because I ENJOY doing fruitless but original / challenging stuff! But it's not the easiest way to get something solid from your efforts. Or something good, for that matter. People often enjoy things they can easily understand, such as things that are genre-obedient enough that they do not take a 48 hour course to start playing. Originality is a double-edged sword, you might say.

So I was advised to do something less original, and more concrete, identifiable and most of all, simple to imagine and produce. I did a small game inspired by my efforts to clean up after a bunch of kittens I took care of for a few weeks (i.e. a game that involved cleaning up a mess that just... kept... GROWING), and it was an enjoyable two-day challenge. The result was even a bit entertaining, though mostly because of the OCD aspect of cleaning rooms and keeping the mess (identified by a simple blue color) from spreading back in there. Gave some ideas for future games, too! But I feel a need to get back into something more fulfilling again. Something a bit more heavy, so to speak. And yet, something that is not TOO original, just to stick to my "responsibilities".

Personally, I started programming when I was a small kid. My dad and I would enter code from books on our family ZX Spectrum and watch little symbols act like race cars and stuff. But I only really got into games programming back in 2011, after I got very into, and then later got very frustrated by, Minecraft. I wanted that game to take community (read: Modder) ideas more serious, and even did some modding at some point (I gave up when new Minecraft versions made everything I did incompatible for the umpteenth time). So if I am meant to try myself at something not too original, but still new, I thought I would have another shot at that. It all starts with a Minecraft clone, which I am making now. But then, hopefully, I will take that in completely new directions, the kind I felt the original Minecraft cast aside, foolishly.

So once upon a time, an FPS was known as a DOOM clone. Nowadays, people like myself fiddle with Minecraft clones. I can't help but wonder what Minecraft clones will be called in a couple of years, when and if a vibrant genre evolves around the concept....

Just for kicks, here are some questions you can answer in the comments, if you want to impress me or be my friend: What alternate name would you suggest for the genre "Minecraft clones"? Or what game would you like to make, but change some very specific things in? Tell me in the comments, let's make this more than me rambling into the cloud!

Quick, what is the one thing you don't want your work to be called?

Likely answers (I am just guessing, my mindreading is on the fritz these days) include boring, ugly, and a series of other detractors. But one thing that a lot of passionate people really do not want ot hear is the word "unoriginal". I know, I'm one of them! I struggle with every project of mine to avoid it looking like just another rehash of something popular (or something unpopular I feel has been misjudged or overlooked). I want to do my own thing, and I want it to be MY... OWN.... THING. Originality. Creative new ideas. It's where my passion, and likely the passion of many others, comes from.

I am not programming these days, simply because LIFE. But I am just spending that much more time thinking about programming, then. Not long ago, a friend of mine made me promise to talk to a friend of his who does fancy consulting, the kind that costs a lot of money for people who have that kind of money and the will to spend it. I would get some consultation for free, because friendship and favors and such. So I agreed (hey, free stuff, right?).

Yesterday, I had the first little chat, and it sort of messed with my head. Mind you, this is not a GAME consultant, but a more general business consultant, so we were not talking algorithms and graphic specs. Instead, we talked about project planning, and what came up.... I honestly have to say, it annoys the living hell out of me. Mostly because I have the nagging feeling that he is right, and I don't like his suggestions, on a very personal level.

If you haven't read any of my other stuff, it can be summmed up as "I like complexity", or "I like lots of (meaningful) details". I like to look at things from weird angles, and I also have big thing with science, possibly because it has a lot of small moving parts and such. The talk went a bit into that, but quickly had everything turned on its head with the question (and I paraphrase) "what if you did everything the other way around?". The other way around? For me, that would mean, basically, to superficially copy another idea. Take something that someone else has done and do it in a very simplistic way. Needless to say, that rubs me the wrong way. Like, a lot!

But once I got over my personal feelings for the initial idea, some points came up that made a bit more sense. I, and likely many others, want to think up an original idea and go for it. I am still toying with my ADIPAX idea, a first person 4X strategy game that includes time travel. But that (I believe) original idea is more unwieldy the closer I get to building it, and maybe it's better to approach it from a completely new perspective. That perspective might just as well be to start out with something banal and somewhat unoriginal, and then slowly expand it until it becomes more original, or something else that I have yet to really think up!

I don't know about you, dear reader, but it is a massive hurdle for me to have to think up something simple and unoriginal. It sounds easy (heck, the first real "game" I programmed was a stripped-down Minecraft clone), but as a planning task, it is extremely counterintuitive and frustrating. I think I have the basic idea, strong emphasis on BASIC, but while I still try to make time to get to the actual coding, my brain keeps yelling at me in foul language, wanting me to throw out anything that isn't the next big, original idea. Unoriginal simplicity, that's for chumps.... right?

And then he went and poured another drink...... :-p

Holy.... mother.... of.... god....

Well, that was a learning experience. The kitten orphanage is on hold for now. After a few weeks, I was handed two feral cats and their four kittens to care for. It did not go well. They basically destroyed my home office in disgusting ways (the kittens were innocent, their two mothers did the destruction), and when I asked the people I volunteered for to take them back, they lambasted me for being a liar and worse, because I had offered to take in cats, so I had to take care of those, and now shut up. It escalated and they retaliated by taking all cats back and blacklisting me. I would say "unprofessional", but in their defense, they never claimed to be professional. It became clear to me, too late, that they had nooo idea what they were doing, and were just winging it. And as a side effect, the last two weeks have involved me trying to get rid of fleas, which EVERY SINGLE CAT had when they handed them over to me. I had nightmares about fleas... and then the nightmares came true. Literally, I remember a dream about standing in my house and watching fleas swarm up my legs, and the next day, I found that two-week old fleas were hatching... when they swarmed on me and crawled up my legs!!!

I am still in flea-hunter mode. My own Dylan just got sterilized and my Charlie is pretty old, so I worry about their constant reactions to fleas. It's getting better, but it requires me turning my house inside out to scrub everything down. For once, I wish I had only my old 30 square meter (300sqft) apartment in the city.

Also, my dad was diagnosed with early signs of ALS and Dementia. He's taking it a bit better than the rest of us. Except he got swindled out of 30,000 Kroner (about US$5000), which I luckily managed to track down and get back for him.

So yeah, my life is a bit of a mess right now. Still got plans to help kittens, because goddamn does this place need someone to do that stuff right. The whole "every science must be conquered" thing is on hold, and my making games strictly based on my own enjoyment of scientific simulation is equally paused. Once I get back into game development, it's going to be more focused. I am lucky enough to have some friends in the production consulting field, and they are giving me some of their time to see if this game dev stuff can be done better for me. But right now, my head is just spinning. Just when you think things cannot get more insane.....

So anyway.... how are you doing??

Yes, I am being quiet, and if you follow my stuff, sorry about that. I recently made my house available to local animal shelter assstance, and am now living in a "kitten orphanage", caring for 13 abandoned kittens (in addition to my own 2 cats) until they get adopted or move on through the 'system'. Rewardung work, but it leaves very little time for blogging or programming :)


I'll be back again soon!

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).


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!

(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...


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.


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.


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 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.

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.

(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...)


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!!


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.


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...!

(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...


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.


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.


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..!

(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...


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...


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!


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...

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.


(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)....

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..!

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 :)

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.

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)

  • Advertisement