Early Project Stuff


A little over a month ago, this project was just starting. I had moved into a new apartment, and would be without internet for a while. What's a reclusive teenager to do with no YouTube to distract him 24/7? A new distraction. I hadn't done any programming in a while, and it seemed like a good idea to hop back in.

A fascination with procedural worlds drove me to create a grid, and populate it with "tiles" using some kind of noise algorithm.

I chose LOVE (Love2D) as the framework to build the game in. I already had much experience with LOVE, as well as Lua.

At first I was puzzled about how to create structures such as caves, ore veins, and geological layers. Then it hit me, and it seemed so obvious. I was already using noise to generate the terrain, so I could use different variations of noise for everything else.

Next I decided to make the world feel less "static". My first approach was to allow grass to grow and die. So I created tileupdate functions that are called when tiles are changed. Along with this were random tile updates (akin to Minecraft's random ticks). Using random tile updates, grass will die if not exposed to an air tile. If the grass is adjacent to a dirt tile that is exposed to air, it will turn that dirt tile into grass.

Eventually I got bored of looking at flat colors, and decided to try my hand at pixel art.

Not exactly a Michelangelo, but it was good enough for now. Next, I wanted to add trees. I decided to make the trees "fall" if unsupported by a tile below, meaning you could chop the tree down fully. Thankfully my tileupdate system was perfectly suited for the task. I could use it to do so many neat things in my world sandbox.

And so I did.


Trees, grass growth, simplistic explosions (no effects, it just removed tiles in a radius), rope, leaves, and torches as well. I'll talk more about the tileupdate system later, as it's expanded to handle even more of the game logic, such as validating where a player tries to place a tile, liquid mechanics, and so on.

I had created my little world, I was having fun playing god. But you get bored with nobody to bully, so it was time to make a character, instead of omnisciently scrolling around the world. We'll cover all that later on.

Get cavegame

Leave a comment

Log in with itch.io to leave a comment.