Tuesday, 26 November 2013

Game Progress

To start off with, I was looking at online tutorials (YouTube and web based). I was trying to follow their code and take parts that i wanted to adapt it into my own game. however, most of these attempts produced an awful lot of these:
I was struggling with unity, getting the main menu working and trying to build the game from the ground up for a mobile device was also proving to be difficult. Therefore, at the start of this week, i pushed back the main menu and android compatibility, as it is not the highest priority. Then i started working on a small game prototype i had thought of while watching one of the tutorials.

 Here is a quick mock up of the idea i had:


The creates at the side will choose a random colour when the game starts, then the truck at the top will ask for colour . The player will then have to drag X number of boxes into the truck in the given time limit. If they move a coloured box that the player is asking for then they gain a point, if the colours do not match they they lose a life.if they lose all lives or the timer runs out, they lose.

To begin with, the crates will stay their respective colours and the player will simply have to drag the boxes into the truck. there will be only 4 colours to begin with.
the second level of the game will have the creates spawn with their colour and a number to go along with the colour. Then when the game starts they will all turn to brown but their number stay remains, so when the truck asks for a colour, the player will have to remember which number represents which colour (ie. all 5s are blue).
the last level will be the same as the second one but the boxes will not have numbers on them. instead there will be a button on the side that will show all the boxes colour when held down. however, when the button is held down, the time remaining will count down faster.

Things that i am looking to iterate with this game:
Should the boxes respawn or be a single use.
How long should the timer be.
How many boxes should the truck request.
Should there be a bonuses for fast success with creates.


=== current game ====

From what i have learned with making the first game, i went back to the main menu and tried building it again. I is not how i imagined it but it works for now and i can improve it at a later date.

Clicking and dragging the mouse left or right, moves the buttons side to side and the closer they are to the middle the bigger they are.

The game at the moment, looks vaguely like my plan and is not very appealing on the eyes. However, it all works, so i am happy at the moment.

I had an idea while building the game, the idea was to have a separate scene to deal with what game should be loaded next. This screen will be used to keep track of what games have been played on what level, how many games have been played and what game and difficulty needs to be loaded next. it uses an empty object that does not get destroyed when the next scene is loaded, so it can keep track from game to game. I might make some loading artwork for it at a later date so it is not just a blank screen.

My knowledge of unity has improved drastically in this last week from working on the game. I now understand so much more then when i started 2 weeks ago. I now understand how scenes work, choosing Public or Private var's is more important and how to edit an object's properties within code. I feel that this project will have a snowball effect, in that i will struggle to get things working early on but later on will be able to create code far quicker as my knowledge and skill with unity and JavaScript grows.

On a side note, i have now found out that one of the books i had planned to heavy use while building this game, is no longer useful to me. 'JavaScript the Definitive Guide' talks about terms that unity does not support. For instance, Math.Random() is not supported in unity but instead unity uses Math.Range(min,Max) for generating random numbers. However, on unity's site, they have a list of everything and how it works.
http://docs.unity3d.com/Documentation/ScriptReference/index.html
I have found this a god send thus far.