A fun browser based Whack-a-Mole game built using HTML, CSS, and JavaScript.
The game features multiple difficulty levels including a timed mode, complete with sound effects, animations, and separate high scores per difficulty.
A fun browser based Whack-a-Mole game built using HTML, CSS, and JavaScript.
The game features multiple difficulty levels including a timed mode, complete with sound effects, animations, and separate high scores per difficulty.
Uploaded the game files to github and hosted the game on github pages. Also adjusted all the css to rescale according to the screen size so it is playable on smaller screens like phones. It is also responsive to browser rescaling (as shown in attached images). Ready to ship now.
Added a timed mode. I set it to 15 secs for recording the demo video, otherwise the timed mode is 60 seconds. The game ends when the timer hits zero or if you click on a plant. Also a warning plays once the timer is below 5 secs.
Log in to leave a comment
Fixed a bug that in hard mode there was a slight lag due to which some clicks were not registered.
Before I was loading and deleting the mole and plant images every time which caused the lag. Now I load up the images once and just move them around the board which reduces the time needed and thus also the lag.
Log in to leave a comment
Added difficulty levels. The previously default game is now easy mode, medium is a bit faster while hard is faster and has 2 plants. The highscores are tracked separately for each difficulty level and maintained even on changing the difficulty.
Unless you click on the “change difficulty” button, clicking anywhere else on the screen restarts the game in the same difficulty.
Also added sound effects on hitting/missing the mole.
Log in to leave a comment
Updated the game so that now 10 points are deducted for a wrong click (empty tile) and now you lose by clicking on the piranha plant instead. Also added keeping track of highscores.
The game over text now shows as a popup overlay and you can play again by clicking anywhere on the screen. You also lose if your score becomes negative.
Log in to leave a comment
Created a whack a mole game. You get 10 points for every correct click and you lose if you click on an empty hole. Click again to replay!
Log in to leave a comment