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.


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 )


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


Create walls for the scene.

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


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

Place pick ups around the scene.


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

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


Add text for the code to link with.

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


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


Player Code:


Camera Code:


Rotator Code:



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 2013. Unity – Project #00: Roll-a-Ball. [online] Available at: [Accessed: 15 Dec 2013].


~ by reeceharry on December 15, 2013.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

( Project Example)

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


A fine site

AS3 Game Tutorials

Complete Flash game tutorials in ActionScript 3

Kevin Holbrook's Blog

Student at Hull College - BA (Honours) Degree


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: