Friday 4 April 2014

Slightly polishing off the first tutorial level

What I plan on doing:

With the first tutorial level, I decided to implement a new feature (just on an aesthetics point, not mechanically). As mentioned in the previous blog post, many players suggested I decrease the size of a planet when it's being mined because it adds some slight realism (not that I intend of my game being hyper realistic).

Implementation:

When I implemented this into the game, I had to find out how to readjust the size of an object on a local basis thought code. I found out I had to use transform.localScale -= Vector3() to do this since this is part of unity's transform vector properties. I used a boolean to activate the shrinking planet feature, so when the player is mining a planet, it set's the miningSize boolean property to true, and the localScale decreases by value "x" and when the planet has been drained of it's resources, the function stops.

Running into a few walls:

When I tested out this feature, it initially worked well, however I noticed, that a trigger for part of the tutorial would some times not run and I wondered why this was occurring. I spent some time looking through my code wonder what was going on, incase I had miss typed something. After a short break I discovered, the OnTriggerStay function for the planet was nut running, and I looked at the scene as I was playing the game. Because I had the model of the planet as the parent (the pretty visual part) and the trigger that does all of the interaction and transactions between the planet and the player was attached to an isTrigger object was the child of the planet, the trigger was shrinking relative to the parent, thus causing the bug.

To fix this I created an empty game object and called it "planetHolder" and made the collider and the planet model children of that game object side, and making them both equal in the hierarchy. This fixed everything in the tutorial. Just after this, when I created the new game level (new actual in game level) I recreated each planet in the scene in this way to avoid future headache like this.

Play Testing:

During play testing, the first level and the new "Level 1", many players liked how the planet's glow changed colour and the size of the planet changes when it's being mined. Player's said it helped them understand what was going on in the game because each transactions was happening visually. Also they said the planet shrinking when being mined was a nice touch since it fitted in with the theme and so when they tried to mine another planet they could easily se which planet to mine by it's aura and size very quickly.

For the next iteration of the game I will try implementing a goal into the game. Because I have improved the design bringing out the current mechanic, I think I can now go progress with the game's creation itself. I will try going slightly down the shooter rout, meaning the player will mine mass, to upgrade their ship, so they can shoot more ships to improve their score. When I last tested this on a few people, some said they wanted more of a goal and they would like to upgrade the ship they control. I will give this a try and see how people will react to it but I will not drill down so I can get a general idea of what direction should take the game in.

No comments:

Post a Comment