Tunnels
Mine for resources, build secure bases, explore caves and fight dangerous monsters in the 2d sandbox game.
First Builds
I started with the idea of having a randomly generated level where the player would mine for resources. I did this by having the game engine randomly select between many frames of the rock sprite. I set up a small area for the player to start in.
I also added in darkness that I used in another game I worked on "Hope and Disbear". I gave the player a small light so they can see where they are going. However, it is small and the torches are need to light areas.
I eventually added objects for the player to build. At first, things could be built anywhere. I would later add some code that would allow building in a strict grid pattern. These building options were toggled via several buttons in the UI. The player would click on each button to get a blueprint for each object. It would flash glow yellow when the player was over the button and flash red when toggled.
I originally had every block break as soon as the player hit them. However, after play testing, I notice this made the digging too fast. I added a block health system which decreased the digging speed. I also added a text that would show how much health was left. I would use this for other blocks and enemies later on.
Later Builds
I began to add more randomness into the game by adding randomly generated caves. At the start, the game would choose a group of 'caveSpawners' to delete the rocks in the area and create a cave.
Pink are cave spawners, red are for monster spawners
To add a bit of strategy and combat, I added enemies. The Monster Spider has a simple follow code to come after the player. They would spawn from monster spawners that would spawn in generated caves. I also added a code to destroy the blocks created by the player.
Early Monster Spider
Early Monster Spawner
I slowly added more objects to build and more buttons to go with them. One of these was a bed for healing. This healing became necessary when I added the monsters. Another was an upgrade to the pickaxe for faster digging and more damage to enemies. I also added a delete button to clear unwanted items made by the player.
After most of the mechanics are done, I began to improve the art for the game. I started with the rocks. I created more detailed versions of the rock types and improved the braking animation of the player made blocks. I then improved the buttons and the objects that went with them. I cleaned up the edges and images. However, the deadline for the project was approaching and I had other projects to work on. I finished up by adding to the spider and monster spawner images, improved the game over screen and creating a title page for the game.
old WoodRock sprite
new WoodRock sprite
final spider sprite
final monster spawner
Final Thoughts
I did not have enough time to make everything I wanted to. I had plans on adding a door so the player could shut out spiders. I even created sprites for the door both opened and closed, a 'blue print' for the curser and even a button. However I did not have enough time for the coding. I also wished to make improvements to the enemy AI. I also wished to further improve art for the game. 

However, besides all this, I enjoyed making the game and I am proud of it.
Tunnels
Published:

Tunnels

Published:

Creative Fields