Skip to content

donkasun/aliyata-aha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ˜ Aliyata Aha

Aliyata Aha (เถ‡เถฝเท’เถบเทเถง เถ‡เท„) is a Sri Lankan Avurudu party game where you try to place an elephant's eye from memory โ€” think Pin the Tail on the Donkey, but festive, digital, and scored.

๐ŸŽฎ Play now โ†’ aliyata-aha.web.app


How to Play

  1. The elephant appears on screen โ€” memorise where the eye is
  2. The elephant hides
  3. Move your cursor (or finger via camera) to where you think the eye was
  4. Drop it โ€” and see how close you were!

Two input modes are supported:

Mode How to start How to drop
๐Ÿ–ฑ๏ธ Mouse Press M or click [M] Mouse Click or press Space
๐Ÿ“ท Camera Press C or click [C] Camera Pinch your index finger and thumb

Your best score goes on the leaderboard. Higher score = closer to the eye, faster.


Scoring

Component Max Details
Accuracy 1000 max(0, 1000 โˆ’ distance ร— 5)
Speed bonus 100 Full bonus at โ‰ค 0 s, scales down to 10 s
Total 1100

Tech Stack

  • Vanilla JS (ES Modules) + HTML5 Canvas โ€” no build step
  • MediaPipe Hands โ€” camera/gesture input
  • Firebase โ€” anonymous auth, Firestore leaderboard, Hosting

Running Locally

python3 -m http.server 8080
# open http://localhost:8080

No install needed. Firebase features (leaderboard, score saving) are skipped on localhost automatically.


Project Structure

โ”œโ”€โ”€ index.html          # Entry point
โ”œโ”€โ”€ style.css
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ game.js         # Main loop & state machine
โ”‚   โ”œโ”€โ”€ render.js       # Canvas drawing
โ”‚   โ”œโ”€โ”€ board.js        # Seed-based elephant placement
โ”‚   โ”œโ”€โ”€ input-mouse.js  # Mouse / keyboard input
โ”‚   โ”œโ”€โ”€ input-hand.js   # MediaPipe camera input
โ”‚   โ”œโ”€โ”€ audio.js        # Music player
โ”‚   โ”œโ”€โ”€ score.js        # Scoring & Firestore
โ”‚   โ”œโ”€โ”€ messages.js     # Sinhala result messages
โ”‚   โ””โ”€โ”€ firebase.js     # Firebase init
โ”œโ”€โ”€ music/              # Avurudu background tracks
โ”œโ”€โ”€ sounds/             # Sound effects
โ””โ”€โ”€ elephant.jpeg       # Source image

Made with โค๏ธ for Avurudu 2026 ๐ŸŽŠ

About

๐Ÿ˜ Aliyata Aha โ€” Avurudu elephant eye-drop game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors