Devblog 2

So its been another busy week. I have not been able to spend as much time as I would like but there has been some important part achieved. This weeks biggest achievements are:

  • Mining laser
  • Resources gathering and basic inventory
  • New grass object
  • Changes to the Load/Save functions
  • Build bug fixes

Mining Laser

This is the coolest thing added this week. The plan is to have a glove of some king which will emit a laser, currently the laser comes from the palm of the hand so I just been to adjust the hand model.

I wanted a tool like the mining gun in Starbound, something which the player can start with but doesn’t do any damage. At the moment the glove can interact with trees and rock, but I’d like to add more functionality over time.

Getting the laser to interact with different objects was a big of a pain at first but then I managed to get it working. By doing so I did break the build functions which I had to the fingure out and fix. Everything seems to be fine with the laser after this until I built the game as a standalone. It took me ages to figure out a fix, but the laser would not work in the standalone version. I ended up having to create a debug view that could display debug information in the live game. The end result is now I have a cool way of displaying info in-game and the laser now working in the standalone version.

Resource gathering and basic inventory

This is starting to take shape now. Before I could implement resources gathering I had two jobs to do. First, create the mining laser to generate the resources and second, I had to implement the code structure to save the objects. This means now the player has two inventories, the quick select and the main inventory. Now if you collider with a piece of wood or stone it checks to see if it is in either inventory, if so increment the inventory item and if not, create an entry in the inventory.Wood

I’ve also tested this by giving the player a small number of build items. Once they run out it switched to the empty hands.

Next I need to make a UI for this. A UI for the quick select and a UI for the inventory. The straight after that I need to figure out how to craft new items, based on having the correct resources in the inventory. I also need to store the player inventory so that when you load the level you have the same stuff.

New grass

I’ve always thought asset design isn’t my strongest skill but the more I look at the generated worlds using assets I have developed, I start to feel more confident. I’ve been reading tips to become more creative and these have resulted in my grass texture. I know its not that fantastic, but I’m pretty proud of how they have turned out.

Grass

Here you can see the grass with the gate in the background. It is just a simple mesh with the grass texture UV mapped. The reason I am happy is that I made it on my iPad using Adobe Draw, then built the model in Blender and when its in game it just its in.

Changes to the Load/Save functions

This was an important change. Originally each world was saved by saving every object in the world this gave a save file of around 800KB. I want people to explore 1,000’s of world so this file size was just too big. Now the save file only contains changes to the environment, so if you cut a tree down it saves that, if you add a building that gets saved too. The rational is that most people will not mine every tree on every world, therefore overall the saves will take less space.