Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐝 HexaHive — a different kind of Tetris

A playful single-page stacking game set in a honeycomb. Hex pieces tumble into the hive; fill a full row to pop it — and watch same-colour honey explode in chain reactions.

🍯 How it's different from Tetris

Tetris HexaHive
Board 10×20 grid of squares 9×12 honeycomb lattice
Rotation 90° 60°, on a hex grid
Clear rule fill a row fill a row plus every touching hex of the same colour pops too
Strategy stack flat build same-colour neighbourhoods → bigger honey-pop cascades
Bonus honey bonds: land a piece next to matching colours for points

The honeycomb's staggered rows mean gravity follows a zig-zag path, and pieces rotate in six orientations instead of four.

🎮 Controls

Key Action
/ move
/ X spin (60°)
Z spin back
(hold) fast drop
Space smash drop
P pause
R restart
M mute

On-screen buttons provide the same controls for touch screens (press-and-hold to repeat).

🏃 Run it

No build step, no dependencies — just open index.html, or serve the folder:

python3 -m http.server 4173
# then open http://127.0.0.1:4173/

📁 Files

  • index.html — the single page: shell, overlays, touch controls
  • style.css — the warm honey look
  • logic.js — the pure game rules (hex lattice, pieces, cascades, gravity); no DOM, so it runs in the browser and in Node
  • game.js — the view layer: rendering, particles, bees, sound, input
  • test-logic.js — a Node test suite for the rules

🧪 Testing the rules

The game logic is separated from the rendering so it can be tested headless:

node test-logic.js

This checks piece placement, 60° rotations, wall kicks, the 7-bag randomizer, honey-pop cascades, gravity compaction, game-over conditions, and runs hundreds of randomized games plus a "lookahead player" to confirm the game is actually winnable (it clears lines and levels up).

🔧 Little details

  • 7 pieces with names (Caterpillar 🐛, Snail 🐌, Diamond 💎, Tri 🍯, Hockey 🏒, Slinky 🌀, Stinger 🐝), drawn from a 7-bag randomizer
  • Ghost piece, lock flash, screen shake, honey droplets, floating score text
  • Bees and pollen drift across the board
  • All sounds are synthesized live with WebAudio — no audio files
  • Streak counter, cascade multipliers, level speed curve

✨ Ideas for later

  • Royal Jelly power-up that pops one colour
  • Daily challenges ("clear 3 rows in one drop")
  • Local high-score table

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages