Dropship – a 2D procedurally generated survival game

dropship landing

‘Dropship’ is the temporary name for this project.

Whilst on holiday in South Africa recently, I was playing with a procedural generation library for Unity, and decided to take things further with the extra time I had on my hands. I created a fairly simple 2D survival game drawing inspiration from Minecraft and Starbound, featuring:

  • Procedural terrain generation with differing terrain and minerals based on depth
  • Terrain chunking system
  • Digging and use actions by way of Interface to allow for generic use/dig actions on various items
  • Crafting and inventory system
  • Simple enemies with FSM actions like: idle, roam, pursue, attack
  • Cave plant growth
  • Dynamic weather and day/night / light system
  • Simple water/lava gravity and movement system
  • Basic tree foliage generation with fractals
  • Two layers of terrain – foreground/background (I like the way Starbound does this)
  • Pixel Sprite Generator (randomly generated sprites by using a two dimensional grid mask)

Newly added:

  • JSON Serialization save/load system. Save your progress and quit, then load up your saved world again later
  • Fishing and living fish colonies that are able to breed/multiply in water blocks
  • Cooking with fires + nutrition attributes on food
  • Basic survival stats and UI for health, food, and energy
  • Self-healing blocks – similar to Minecraft where they replenish ‘hits’ if you stop hitting them

 

 

I also ended up porting this Pixel Sprite Generator for web canvas/JavaScript to C# / Unity – I did it initially to randomly generate the shrub/plant sprites scattered along the surface of the terrain in the game. I could now easily use it for other sprites like monsters, rocks, weapons, and other items in game. You can take a look at my port on Github here: //github.com/Shogan/PixelSpriteGenerator-Unity

rain

You can take a peek at some gameplay below, which shows me running around, harvesting some resources, crafting more complex items from the resources, and then building a simple abode for shelter with those resources. 🙂

For fun I also created a dropship landing scene using some simple easing functions and a bit of Unity’s animation system.

To help speed up development, and because I didn’t have my trusty Wacom tablet with me on holiday, I used the following to help hasten development:

  • PEProcGen for Unity v 0.6 (I heavily modified this to be able to dynamically generate during gameplay and to add more of my own features)
  • Unity 2D Character controller
  • Monsters/Pirate pack for some of the monster sprites
  • Random 2D tileset I found online for some of the terrain sprites
  • Pixel Weather FX asset from store
  • 2D tileset for some of the terrain sprites
  • Star Citizen Reclaimer fan 2D artwork sprite from the RSi forums (the dropship)
  • Inventory Master asset from store (modified this quite a bit to add more functionality)

The game is still a work in progress and has a fair few obvious bugs and issues, alongside it’s mishmash of different art styles – this is because I still consider it a prototype. It’s nowhere near complete – I might continue with it some time, but for now I am happy to have created it for fun, and to play around with coding up and creating some ideas in Unity.

Here are some more screenshots:

lava-pit

building