Monday, May 9, 2011

Unity Project 2

Link: Unity Project 2

Name:
Fredson Laguna
Timeframe:
(Start Date to End Date): 4.22.2011 - 5.01.2011

Project Detail - What did you do, exactly.

For the "On Your Own" requirements I implemented:

Pickup Items: Life, Shield, Single Shot, Double Shot

All of the pickup items share a script that translates their y coordinates down to avoid being stagnant upon creation. I had stored the pickup prefabs as GameObjects in the bullet script so that when an explosion is created from destroying an asteroid a number from 0-30 (using Random.Range) is generated and depending on what number gets generated one of the 4 pickups will be instantiated or none at all (to avoid having a pickup be created every time an asteroid is destroyed).

All of the pickups were given the tag "PowerUp" and a string variable was created so that when the player collides with a pickup (tagged as PowerUp) the variable will equal to that of the name of the pickup touched allowing unity to differentiate between the different pickups even though they all share the same tag.

for example: (Life pickup)

function OnTriggerEnter (other: Collider)
{
if(other.gameObject.tag == "PowerUp")
{
var powerUpContainer = other.gameObject.name;
if (powerUpContainer == "prefab HealthPowerUp(Clone)")
{
lives += 1;
}
}
}

A boolean variable was created that enables and disables the single and double shot. If a double shot pickup has been touched, the boolean for the single shot will become false while the boolean for the double shot becomes true.

I used two cubes that have a rotation script assigned to it that are parented to the player object as bullet slots. The material renderer is set to false by default until a double shot pickup has been obtained.


Random Variables: Speed and Scale of the asteroids

The scale was generated using Random.Range with the max number being a variable (float) that would change as the player advances to the next level

The speed was determined by the size of the asteroid, the bigger the asteroid the slower it will move.

Flashing effect: Player flashes white upon damage

2 Levels: Each with their own BGM



Software Used:
Unity3D
Final Thoughts - Reflect for moment (Postmortem)

Break down your Time (Research, Art, Design, Coding, Playtesting)
Research: 15+ hrs
Art: 3-4 hrs.
Design: 5 hrs.
Coding: 15+ hrs
Playtesting: 2 hr