One Game Per Day – Day 2

Second day in this personal challenge and second game made! In the morning of day2, I had a weird bug when I tried to build the webplayer. It took a while to debug and I started this second game kinda late. Considering this, I’m  pretty happy with the results even if I hoped to add more feature! It seems that someone liked how you controlled the ship in Day1’s game, 3DRunner,  because they decided to give you a robot-miner for today’s game. Make good use of it and gather lots of cash, it might come useful for Day3’s game!

Day 2 – DigDeep

DigDeep Game

Dig down, Gather Ressources, Sell them and Upgrade your miner!

Play DigDeep!! – WebPlayer

Idea :

I wanted to make some kind of 2D miner game. Along the way, the project started to look like an old classic, Motherload.

How I did it :

I started this project by creating a class for GroundGeneration. When the scene is loaded, an array is filled with number representing the type of tile to be displayed.  The map is then iterated to create all sprite one by one in the scene. Each sprite has its one GameObject for now. It would have been more efficient to create Chunk that contains many sprites. However, for rapid prototyping sake, I took the first option and I’m glad I did. The detection/destruction of each tile has been really simple to implement. When the player is moving in a direction, Physics2D.OverlapCircle() is created in the player’s moving direction. If it collide with a tile, the tile is destroyed and added to the player inventory.

Lesson learned :

  • I’m starting to have a good grasp of Unity2D workflow. I haven’t used 2dCollided and Collision2D a lot so I learn that on the way.
  • This was the first time I created procedurally generated content for 2D. The instantiation of sprite was a bit tricky at first but everything came along nicely.

What’s Left :

I would have like to add the option to buy upgrade for the miner in the shop. I also wanted to be able to buy new, bigger and more valuable land from the shop . Lastly, I wanted to use animation for the player’s miner but I haven’t took the time to do it. There is just so much you can do in a 10h period!

Conclusion :

The coding of this second game went pretty well. It took more time than I thought to setup the world generation but it went fine. I’m getting a good idea on how I want to start and structure my projects as I’m starting project over and over. I already have day3 game setup in my mind. I’ll get to it right now because it will be pretty UI-Heavy, and interface is a good place to lose a lot of time.

Advertisements

2 thoughts on “One Game Per Day – Day 2

  1. This game has a nice idea, I can see it can be lots of fun once you can upgrade and buy more things!

    A few suggestions for your prototypes: implement a restart for each game; just makes it a little easier to play again.

    One way is to make a ResetButton that extends from MonoBehaviour, and has a GameObject as a field. Define an interface IResetable, with a Reset method. The OnClick method then looks for a component of type IResetable (you have to use GetComponent(typeof(…)), the generic version won’t work on interfaces) and calls the Reset method. You can then make a prefab, and use it in every game. Simply let your main game class implement IResetsable, and drop it into your ResetButton’s field.

    The second tip has to do with controls. Controls take a long time to tweak, and glitchy controls can destract you during development, and your players afterwards. After your prototypes, spend some time work out how to implement a few standard, nicely polished control schemes. You can then reuse these for other projects, and the knowledge you will gain will help you when you implement new ones. (I am doing this too, since controls is my own weakness).

    Look forward to Game 3

    • Hey!

      Thanks for the feedback. While I agree your suggestions, I’ll try to explain some decisions that where taken (in this particular game) and leads to the point you mentioned in your comment.

      I agree that no reset button sucks for the player. The “Save and Refresh map” button from the shop was originally permanently available to the player. However, I realized player could use it to get back at the surface with their resources without using fuel. I then decided to put the save button as part of the shop around the end of the project. Looking back, it definitely miss some way for the player to start again if they, for example, miss fuel while being in the ground. I think a good way would be to add 2 permanent button : New Game(Delete Save and start again) and Load last save(currently what happened if you just refresh the page). The reset mechanic you suggest is interesting. I think I saw it in some of your Grids example and I’ll consider it when making new games.

      As you say, control are really important and hard to tweak perfectly. Creating my own 2D controller that I would reuse in different game is actually a really good idea that I haven’t thought about. In this particular game, there are 2 concrete place where I see control as being glitchy. First, when moving in a straight direction at the surface, the controller sometime 100% stop moving. I haven’t had the time to figure why it happened and I let it that way. I can see how it could be frustrating to the player. Second, the flying control sometime stick to walls. At first, it was possible to dig laterally while flying or falling down. This was pretty bothersome because it was pretty much impossible to navigate while flying without digging all around. I then cancelled any mining if the player has a vertical velocity. I think it was a good solution but it leads to glitchy control.

      Thanks for the feedback. I will keep all of this in mind with my future games.
      I posted Game 3 on the blog earlier. I’m now heading to work on Game 4!

      Eric

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s