Project Description
I worked on this project over the course of six weeks with three other graduate students at the Academy of Art University for our Prototype Game Development class. We began by pitching game ideas, then voting on our favorites and choosing which project to work on together. While not everyone was familiar with Ron Swanson, his good vibes are universal and the team immediately knew he would look great in low-poly style!
My job was to serve as Creative Director, supervising the three Art team members; as Designer, creating the GDD and deciding on gameplay features; as Developer, creating the actual Unity Project and game build; and as Producer, coordinating all of the above over six weeks in Asana.
Programming Notes
- To save time, I began this game by making a copy of the Random Survival project, then importing Unity’s Third Person Controller Starter Asset.
- I finally formalized my Unity 2021+ Object Pooling + Scriptable Object Type Object Factory framework for this project. I’ll be blogging about that at some point and will update this page to link to that once I do.
- Found I had a PEMDAS issue with the Perlin noise code in the original Random Survival that was preventing each run from actually being random.
- Used this Procedural Generation guide on GameDevAcademy to rework the Biome assignment code in Random Survival using their MatchCondition() and GetDiffValue() functions. Switched over to using a tweaked version of their biome settings.
- The stepping code for the biomes is really neat, in practice:
switch (elevation)
{
case <=.1f: // super sunken
newTile.transform.localScale += Vector3.up;
newTile.transform.localPosition += Vector3.down;
newTile.BiomeHeight = BiomeHeights.Sunken;
if(newTile.BiomeType == BiomeTypes.Water) newTile.Collider.size = new Vector3(1f, .45f, 1f);
break;
case <=.2f: // shallow sunken
newTile.transform.localScale += Vector3.up * .95f;
newTile.transform.localPosition += Vector3.down * .95f;
newTile.BiomeHeight = BiomeHeights.Sunken;
if(newTile.BiomeType == BiomeTypes.Water) newTile.Collider.size = new Vector3(1f, .55f, 1f);
break;
case >= .9f: // super mountain
newTile.transform.localScale += Vector3.up * 9.95f;
newTile.BiomeHeight = BiomeHeights.Mountain;
break;
case >= .825f: // mountain
newTile.transform.localScale += Vector3.up * 6.95f;
newTile.BiomeHeight = BiomeHeights.Mountain;
break;
case >= .75f: // mountain
newTile.transform.localScale += Vector3.up * 3.95f;
newTile.BiomeHeight = BiomeHeights.Mountain;
break;
case >= .6f: // big hill
newTile.transform.localScale += Vector3.up * 1.65f;
newTile.BiomeHeight = BiomeHeights.Hills;
break;
case >= .45f: // hill
newTile.transform.localScale += Vector3.up * 1.25f;
newTile.BiomeHeight = BiomeHeights.Hills;
break;
default:
newTile.BiomeHeight = BiomeHeights.Flat;
break;
}
- Because I don’t want to have to Instantiate more than one Tile for a given x,z coordinate, the solution to simulate hills and valleys is to scale the Tile on the Y to make it take more space. On sunken tiles, the Tile is still made taller, but moved down to compensate, and then its Box Collider is halved vertically so the player can stand waist-deep in the “water”:
