Professional Practice: Unity Roll-a-Ball Tutorial

I once again followed some tutorials on the official unity website, so I could get a better insight into scripting. I followed a tutorial were you have to move a ball with the arrow keys and collect points, when they are all collected, the game ends. In this post it will show the commented code, the steps that I went through and some screens I took along the way.

Steps I took:

Create the ground of the scene.

Create a sphere for the player.

Add a light to the scene with shadows on.

Add a fill light to show the ball is separate from the shadows.

ballprint1

Create a folder hierarchy to keep a neat workspace.

Add a rigid body to the player.

Add a new script to make the player move and follow the code (code at the end )

ballprint2

Make the camera follow the player with a new script code. (code at the end)

ballprint3

Create walls for the scene.

Create pick up objects and rotate them with a new script. (code at the end)

ballprint4

Create a pick up prefab. (a blueprint of an object)

Place pick ups around the scene.

ballprint5

Add code to the player script for collision to pick ups.

Set pick ups to triggers to they can be picked up.

ballprint6

Add text for the code to link with.

Add code to allow a count of pick ups to be displayed through the text.

ballprint7

Another text created to display finish when all the pick ups are collected.

ballprint8

Player Code:

playercode

Camera Code:

cameracode

Rotator Code:

rotatorcode

 

Going through this tutorial I definitely learnt a great deal, from some coding techniques, to keeping the work space tidy and manageable as well as creating preset objects. I will continue to use unity in my future studies as it is a very good piece of software for a game designer to use.

 

References

Unity3d.com. 2013. Unity – Project #00: Roll-a-Ball. [online] Available at: http://unity3d.com/learn/tutorials/projects/roll-a-ball [Accessed: 15 Dec 2013].

Advertisements

~ by reeceharry on December 15, 2013.

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

 
vegetrouble.wordpress.com/

( Project Example)

subjectanomaly.wordpress.com/

The Final Major Project of Matt Lane

Reece Harrison

Year 3 Game Design HSAD Student

Sanctuary Games

David Smith - Games Designer, Gamer and Full Time Geek

Hms Hunter

From the Ashes

shevysupreme

A fine WordPress.com site

AS3 Game Tutorials

Complete Flash game tutorials in ActionScript 3

Kevin Holbrook's Blog

Student at Hull College - BA (Honours) Degree

dalehaughey

I am currently studying games design at the Hull school of art and design and this is the work i have been doing.

%d bloggers like this: