Game Jam Procedural Generation Part II
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:
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.

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