The game isn't out yet, but you can watch me make it at hyper speed over the course of 48 hours. The game ended up getting a bunch of awards at the game jam, including second place overall which is pretty cool!

Whoops I've totally neglected my blog for the past week or so. I spent last week working on some minor Otter things, as well as getting ready for a local game jam. Then I jammed for 48 hours last weekend!

In the last episode of Game Jam Procedural Generation I talked a lot about generating the base of the platforming level in Starforger II, and carving out rooms into the ground of the level.

So now we have a basic level that with a bunch of empty rooms below the ground. The next step is going to be connecting those rooms together. To do this I built a quick class called a TunnelSnake (tunnel snakes rule) to dig tunnels from any point on the map to any other point. Here's the full source of that class:

A few weeks ago I went to a local game jam in Phoenix! The them was discovery and I set out to make some kind of space exploration procedural thing. The final result was a game I named Starforger II. There is no Starforger I, but maybe I can make a prequel someday.

In the last episode of Game Jam Procedural Generation I talked about the "outer layer" of my procedural generation code for my yet to be released game jam game. After the outer layer of stuff has been generated, that can be used to inform the "inner layer" of the procedural generation. So the outer layer in this case is the galaxy that the player can explore in their ship, and the inner layer is the actual side scrolling platformer level that they will explore.

Where do we even begin? First keep in mind that I'm using Otter for all of this stuff, so if you see functions and code that looks totally unfamiliar, it's probably an Otter thing. Also keep in mind that all of this code was written during a 48 hour game jam, so it ain't pretty. I'm just going to be sharing big snippets of code and hopefully try to explain what is happening in each one.

In the last step I talked about how I create a config object to hold all of the possible fields that will be used to generate the level. Here's what that looks like:

class ScenePlatformingConfig {
public int Width;
public int Height;

public int ShipStartOffset;

public int TreasureDirection;
public int TreasureDistanceOffset;

public int GroundLevelOffset;

public bool Explored;
public bool Pillaged;

public int Jagginess;

public int Platforms;

public int DecaySpots;
public int DecayChance;

public int IslandSpots;
public int IslandSize;

public int Rooms;

public string Name;

public int BreakableChance;

public int CreatureChance;
}

Pretty straight forward. Just a simple class that will hold a bunch of values that can be then passed to the classes that generate the platforming level.
read more

My latest game jam game still isn't quite ready for release, and unfortunately at this point it will have to wait until after PAX, but I can still share some source code from it that will maybe help people out when it comes to procedurally generating things in their games.

The premise of my jam game is that you play as a space explorer type person who is flying a ship around the galaxy searching for planets with shiny ore on them. When the game starts the entire galaxy is procedurally generated. This is a fancy way in saying that a bunch of random things happen and hopefully it works out.

This is my CreatePlanets() function for the map scene in the game. What this does is just creates 99 planets and places them in the scene at random X and Y coordinates. The map scene has a Width and Height defined earlier in the game (in this case I believe its 5000 x 5000 pixels.)

The scene also has a planetSupply field that is defined earlier. Whenever a planet is generated, its size is subtracted from the planetSupply. If the planetSupply is less or equal to 0, all planets created from that point on will be the smallest possible size. This was to control how many huge planets were created in the scene.
read more

about

Hi there, my name is Kyle, and I'm a kid disguised as a grown up. I'm making video games and living the indie game developer life in Tempe, Arizona. Here you will find my thoughts, games, websites, doodles, and other stuff like that. I worked on Snapshot, Offspring Fling, and a whole bunch of other games. I also created and maintain Otter, a 2d game making framework. If you want to get a hold of me use the form on the bottom of the page, leave a comment, or just tweet at me. I try to post three times a week. Thanks for stoppin' by! You're the coolest.

facebook

videos

Do you want to make a Let's Play of one of my games, or a just a video featuring footage of my games? You have my full permission to do so! Even if you are monetizing your videos, you still have my full permission to use any footage from any of my games. Go for it!