Module Client Side
Module Client Side
CONTENTS
This module has the following files:
MODULE_CLIENT_SIDE.doc
MODULE_CLIENT_SIDE_MEDIA.zip
INTRODUCTION
In recent years, the internet has become an integral part of our daily lives, enabling the dissemination of
information in an inexhaustible source of content and interaction. Every day the use of games has gained a
prominent role in this universe, allowing millions of people to get access to fun and entertainment quickly and
free.
You should design a game called Wild 512, develop the layout using HTML and CSS and develop client-side
programming using JavaScript. Some media files are available to you in a zip file. You can create more
media and modify anything in the media if you want.
Your game needs to be developed in a tablet resolution (480x720 pixels). In bigger resolution, the game
must be centered in the screen both horizontally and vertically.
GAME FUNCTIONALITIES:
1. When the layout is accessed the game is presented to the user with the game instructions and the
button “Start Game”. The instructions must be presented in an animated way.
2. “Start Game” buttons must have active and hover effects. The background of the buttons in hover state
must be: #007bff. The active state button background must be: #0069d9.
3. The HTML and CSS code must be valid in the W3C standards for HTML 5 and CSS 3 rules.
4. Pressing the “Start Game” button in the initial screen will random the position of initial node of value 2
and 4 inside the 4x4 board.
5. The game will show the high score and current score as long as the game is played.
7. W or Arrow Up will move all node upwards and combine all node with same value or with wild node.
8. S or Arrow Down will move all node downwards and combine all node with same value or with wild node.
9. A or Arrow Left will move all node to the left side and combine all node with same value or with wild
node.
10. D or Arrow Right will move all node to the right side and combine all node with same value or with wild
node.
11. Every time the player move, the game will spawn new node of value 2 or 4 in any empty space inside the
4x4 board.
12. Every 8 move the player the new node that is spawned will pop up as wild node that can be combined
with any node.
13. For each combined node, the score will be added with the value of the new combined node. For example
if there is a configuration like this (0 4 0 4) and player move to the left, the result will be (8 0 0 0) with 8
points given to the player score.
14. Every node can only combined once every move. For example if there is a configuration like this (8 4 4
0) and player move to the right, the result will be (0 0 8 8) not (0 0 0 16). Because the right 8 node is
recently combined.
15. Combining wild node with any other node will result in the wild node copying the destination node, and
the player will get twice the combined normal node value. For example if there is a configuration like this
(0 0 W 8) and player move to the right, the result will be (0 0 0 16) with 32 points given to the player
score.
16. Every time the player success combining node show an animation to show the player which node is
combined and how many points the player got.
17. Player will lose if the player cannot move in any of the 4 direction, cannot move means that anything the
player press will not change the state of the board because there is no nodes that can be combined
anymore.
18. Show a popup that tells the player that he/she loses when the game over condition fulfilled.
19. Player will win the game if there is at least one node with value of 512.
20. Show a popup that tells the player that he/she won when the win condition fulfilled.
21. When the game is over (whether the player won or lose) with higher score than the current score, save
the current score as high score in the local storage.
22. To increase the game interaction, please use the “background.mp3” sound.
23. Use your talent to increase the usability of the game as much as possible to permit a better experience
for the user.
24. There must be an option to disable/enable game sounds. If the sound is disabled, none of sounds should
be played. If sound is enabled all sounds must be played.
25. Your game should work without JavaScript errors or messages shown in the browser console.
26. Maintain your HTML/CSS and JavaScript code organized and clean to facilitate future maintenance. Use
correct indentation and comments. Use meaningful variable names and document your code as much as
possible so another developer would be able to modify your work in the future