Sedang Disiapkan

Random Click Game

This game needs to be built in HTML and Javascript. We will call the opening page start.html.

The directory that contains the html-pages also contains 100 jpgs, which are called [url removed, login to view], [url removed, login to view] until 100.jpg.

The directory also contains a pic called background.jpg.


The user opens start.html. The webpage show a start button and as background background.jpg.

When the users clicks the start button the user is navigated to a new html page which contains a text field, where the user has to type his/her name, and a button with “continue” on it.

After the user has filled in his/her name, and after the continue button is clicked the game starts.

On a random position on the webpage (with the largest possible resolution fitting the screen) a random pic appears. Random position is obtained by taking both a random number for the x position and for the y position. A random pic is selected by choosing randomly from [url removed, login to view], [url removed, login to view], … , 100.jpg.

The pic appears exactly T1 seconds after the continue button was clicked. The pic will be displayed in principal T2 seconds. The objective of the game is that the user clicks on the pic within T2 seconds. If the user does not succeed in clicking the pic within T2 seconds then the game is over. The score is then 0 points. However, if the user clicks on the pic before T2 seconds then: (1) the user gets 1 point, (2) the pic immediately disappears, (3) a new, random pic appears at a random position on the screen, this time T1*alpha after the previous pic was clicked. Now the user has to click this second pic within T2*beta seconds.

The game goes on until a user does not succeed to click a pic in time.

Every time the users succeeds to click a pic in time then (1) 1 point is added to the score, (2) the time that the next pic appears is multiplied with alpha, in comparison to the time in the previous step, (3) the time limit before which the pic should be clicked is multiplied with beta, in comparison to the time in the previous step.

The parameters T1, T2, alpha and beta should be given in the beginning of the javascript code. For a good gameplay obviously both alpha and beta should be between 0 and 1.

When the user does not succeed to click a pic in time then his score is shown, that is, the total number of pics that he managed to click on time.

When the score is shown, there should also be a button displayed with the text “play again” on it. If this button is clicked then the game starts again, from the beginning.

Kemahiran: Javascript

Lihat lagi: random click game, random clicking game, random click games, javascript click game, good random clicking game, random button game, random button finding games, random button position, random clicking games, random click, random positioning javascript, click game, random button clicking games, random click point games, click random game, random javascript game, javascript random click, n 2 the game, largest number, javascript game code, game in html code, game html code, background for a game, game random click, javascript clicks game

Tentang Majikan:
( 10 ulasan ) Delft, Netherlands

ID Projek: #370821