in Game Bytes

Exploring No Mans Sky is a beautiful game of randomness and Algorithms

I’ve always been fascinated with how games and algorithms work together to create fascinating gameplay mechanics. When I heard about E3 with “No Man’s Sky”, I was thinking of another Mass Effect shooter in the works, but then again I was wrong. As I watched the demo, I was surprised that the game is actually a mash-up between Minecraft and Mass Effect. The thought of space exploration with randomly generated worlds or perhaps galaxies is epic beyond imagination.

Massive Exploration

I never believe they could actually create a game so massive without having it to be your typical sandbox type of game where players will have to follow a particular story step by step. In fact, every planet is randomly generated with no two planets are alike. That is a whole lot of calculations to create those worlds if you ask me.


Pretty Fleet of Ships

Players will have to start from scratch, explore new worlds, mine a planet for resources and build new elements to create powerful weapon upgrades or other handy gadgets for your journey. If you do manage to wreak havoc through the planet you are visiting by terminating any native wildlife you see – the game has their own version of a “police force” to stop you by deploying giant robots in the scene. Basically, it has this “Minecraft” touch and feel of the game with tons of possible explorations that you can do.


I believe Hello Games is a huge fan of dinosaurs

I was amaze by this kind of feat that Hello Games manage to pull. In fact, they didn’t have massive resources like those that you can find in Google’s data center that process all of the world’s information in nano-seconds but in fact they only have 10 people onboard to create beautifully crafted worlds.

Humble Beginnings

Which brings me to my curiosity on how they can manage their limited resources in creating a randomly generated universe with just a small team. It reminds me of a British mathematician John Horton Conway with his “Game of Life” that involves cellular automaton. Where players will have to determine “life” by its initial state, and together with the applied rules the player’s input will interact with the grid and be as an observer on how the state will continuously evolve as it progress.


Game of Life, where you just can’t understand how it works without a guide

Credits to:

Whenever I stumble upon randomly generated stuff, I’ve always associate it with large bulky data centers, and super computers to create rough models or simulations. But in fact, you don’t have to have expensive equipment but rather it involves a lot of mathematics to get the job done.

Basic Dungeon Generator

I manage to debunked that myth that you need a powerful computer to get things done by knowing Minecraft, Suduko (ironically don’t usually don’t play that much) and my love of RPG games especially how the “randomness” of each dungeon is built.

Speaking of dungeoun, another algorithm that I found interesting is generating a procedural dungeon crawler. Similar to Conway’s Game of Life, a dungeon creator basically creates pathways, rooms, doors and even better you can have chests and monsters in each room. I can basically explain random generation with a simple diagram below.

It shows having two dungeons with 2 doors interconnected with a single path. This is just a simple random generation that gives you the idea of how generation works.

Going back to No Mans Sky, according to the developer, every time you visit a world, it is randomly created there and once you blast your way back to space it gets dump. The same holds true for Minecraft. The world is not yet created if you are not yet exploring it. Maybe that’s why I’m stuck with my 250MB worth of map in my own creation while others have even reported to gigabytes of blocks on their playthrough.

Minecraft was built by Java, and Notch doesn’t need to have a supercomputer to create a self-replicating beautiful world with creepers, biomes and stuff.


The vast galaxies that players can explore

Another thing worth mentioning is that every time they hear the word “randomly generated” it is often implied that you don’t have control over your creations. However, it doesn’t hold true. In fact you can actually have total control of your creation.

Let’s go back to the simple dungeon generator example.

Suppose you have a 6 x 6 dungeon with a single door and a pathway as shown below.

By having full control of your randomly generated dungeon, you tweak your code to create a dungeon that has monsters or a chest. A simple If statement will do or Class that handles monster generation will suffice to generate monster spawns.

With that simple illustration, you can attest to the fact that there is actual control over randomly generated objects.

Algorithms and mathematics are a good buddies and they actually solve real life problems as well as creating new galaxies with them.No Mans Sky is a testament to that fact that even a 10 man team they are able to develop such a feat without having to worry about resources. Which brings me to say that Indie gamers have so much potential to do great games without having to be greedy with a have baked game and expensive DLC’s.

I just can’t wait to play No Mans Sky….