Sunday, 13 September 2015

Week 7 continue implementing

In these 3 - 4 day, i've been following the plan.

My working plan:
0. front page
1. grid for player 2 
2. place only one gold on each grid
3. show instruction, game start
4. click on box and check if gold is here or not
5. player1/2 wins

Ive made a front page which consists the title of the game "The Thief" and a play button. I converted the title in symbol(movie clip) and add it on stage at the position that i want. I also converted the play button into button so when hover on it, the mouse will change to pointer. 

Next, i added event listener to the button. By doing that,  users click the play button, they will be directed to the setting page and title and button will be removed from the stage. Where players have to place one gold on their grid, one by one. Gold will hide after 3 second, it gives time for users to memories and confirm where did they place the gold. 


I also added another grid for player 2. Even i'm using the same grid symbol. I duplicated that symbol and named it a different name. By doing that, i was able to create new child class. For that class, i added event listeners to handle hover out and over and click as well. 

After both of the players placed gold, instruction will pop up.


This instruction is actually a button, so players can press anywhere to start the game.
As the instruction mentioned, player 1 starts first. In each round, each player has to click on one square. In order to let players know which square they are pointing to, i add a hover effect. However, both of the grid already have event listeners for placing the gold so i had to remove those listeners. This time i decided to have a slight darker square for hover effect. After i remove listeners, I add new listeners. If the gold wasn't place on that grid, the selected square will change to a darker colour and it cannot be selected again. Finally, the gold will appear if one of the player found the gold and the message box will shown.


Due to the limited time, ability and skills, i had to simplify it and show the very base of the game to peers.


No comments:

Post a Comment