๐Ÿ”จ Whack-a-Mole

By Just Sparrow

Just Sparrow

0 subscribers

0 viewsยท2h ago

#game

Whack-a-Mole

A single-file Whack-a-Mole rendered in the same picture-book aesthetic as Snake, Watermelon Game, Pencil Hit, Sudoku, and Minesweeper (warm dark-brown outlines, pastel fills, rounded board, Fredoka + Jua typography). Cute round Diglett-style moles pop out of dirt holes on a grassy green board โ€” it's one endless run that keeps getting harder as the stage climbs, and you play until your hearts run out. Bonk the moles, dodge the bombs, and see how far you get. Short, loud, and perfect for a shorts-style clip.

How to Play

  1. On the start screen a single mole waits in the centre โ€” whack it to start ("Whack the mole to start!").
  2. Moles pop up out of the nine holes. Tap one to bonk it and score before it ducks back down.
  3. ๐Ÿ’ฃ Bombs join in from stage 2 โ€” don't tap them! Hitting one costs a โค๏ธ and shakes the board (just let bombs sink back down).
  4. Missing a mole (letting it escape un-bonked) also costs a โค๏ธ.
  5. Build a combo by bonking moles back-to-back without missing โ€” the hit sound rises and cheers pop up.
  6. Lose all your hearts and it's Game Over โ€” tap Play Again, or ๐Ÿ  Home to return to the start.

Features

Single run, rising stages

There's no level select and no timer โ€” just one endless run. The stage (shown top-left) advances once enough moles/bombs have appeared โ€” 5 for stage 1, then +2 each stage (5, 7, 9, 11, โ€ฆ) โ€” after which the board clears for a short breather with a "Stage N!" banner (REST_MS, ~1.5s) before the next stage begins. Each stage makes it harder: moles appear faster, stay up for less time, more pop at once (up to 4), and bombs grow more common. Everything ramps with a floor, so very high stages plateau into a frantic-but-fair groove rather than becoming impossible. The goal is to reach the highest stage you can.

Lives (hearts)

You start with 3 โค๏ธ (shown under the title). You lose one for hitting a bomb or missing a mole; correctly dodging a bomb costs nothing. At 0 hearts the run ends โ€” so survival, not a clock, is the limit.

Scoring

  • Mole: +10
  • Bomb / missed mole: costs a โค๏ธ (no score change)

Floating +10 numbers pop off each hole as you bonk, a โˆ’1 โค๏ธ pops on a bomb hit, and a live Score sits in the header.

Combos & Cheers

Bonking moles in a row builds a combo: the bonk tone climbs the scale and a cheer toast ("Nice! x5", "Combo x6 ๐Ÿ”ฅ", "Bam! x9") flashes at milestones. Miss a mole โ€” let it duck back down โ€” and the combo resets.

Every 10-combo refills one heart (up to the max of 3) โ€” so a hot streak can earn back a life you lost. A +1 โค๏ธ pops up when it happens.

Hand-Drawn Critters

The moles and bombs are inline SVG drawn in the family's outline style โ€” a simple Diglett-style round head with small ears, a pink nose, and a little smile that rises tall out of the hole, past the dirt rim. The mole's head circle and the bomb's body are the exact same circle, so a round video could be dropped into either one identically (a VIDEO_SRC constant wires this up). When you bonk a mole its face flips to X-eyes, a bomb flashes red, and a little ๐Ÿ”จ hammer pops in for the hit.

Stage, Lives & Best Score

The header shows the current Stage (left) and Score (right), with a hearts bar under the title. A Stage N! toast and a rising chime mark each stage-up. Your top score is stored in the browser; beating it shows a โœจ New Best โœจ flourish on the Game Over screen, which also reports the stage you reached.

Sound Effects

All sounds are synthesized on the fly โ€” no external files.

  • A soft "pop" each time a mole appears.
  • A satisfying bonk that rises in pitch with your combo.
  • A deep boom (and board shake) for a bomb.
  • A soft low tone when a mole escapes un-bonked.
  • A rising chime on each stage-up.
  • A four-note fanfare for a new best, or a descending arpeggio otherwise.

A ๐Ÿ”Š / ๐Ÿ”‡ mute button silences everything. Audio auto-resumes when the page returns from background.

Quality-of-Life Details

Two icon buttons sit below the playfield:

  • ๐Ÿ”Š / ๐Ÿ”‡ Mute (bottom-left): Silence all sound.
  • ๐Ÿ  Home (bottom-right): End the run and return to the start screen.

All the balance knobs live at the top of the script: SPAWNS_BASE (moles/bombs for stage 1) and SPAWNS_INC (added each stage), REST_MS (breather length), LIVES (starting hearts), cfgForStage() (the difficulty ramp), and SCORE_MOLE.

Design

  • Portrait page (9:16) with a square grass board โ€” fits entirely on a phone without scrolling.
  • Grassy-green field with nine dirt holes (a dark opening, a front rim that the mole rises out from), all outlined in the family's warm dark-brown.
  • Green start / restart buttons with the layered inset shadow for a 3D pressable look.
  • Snappy pop / bonk animations and floating score numbers for instant fee

Loading comments...

Other Codes

No other codes yet