🎵🐍 Shake-to-Volume Music Player + Tilt-Controlled Snake: Double Chaos Edition
A hilariously useless double feature where EVERYTHING is controlled by shaking/tilting your device!
What I Built
I created the world's most frustrating double feature:
- A music player where volume ONLY works by shaking your device
- A Snake game controlled entirely by tilting your phone or violently moving your mouse
Both features are completely useless, intentionally difficult, and will make you question reality.
Demo
🔗 Live Demo: https://silly-dev.preview.emergentagent.com
🔗 GitHub: https://github.com/sushanshetty2601-pixel/shake-chaos-player
Screenshots
Features (All Intentionally Useless)
🎵 Shake-to-Volume Music Player
- Shake Detection: Uses accelerometer on mobile, requires violent mouse movements on desktop
- Volume Control: NO buttons, NO sliders - ONLY shaking works
- Volume Decay: Stop shaking? Volume drops to zero. Keep shaking forever!
- Shake Meter: Real-time visualization of your pathetic shaking intensity
- Stats Tracking: Counts every single shake and scores your desperation
- 🤖 AI Shake Coach: Google AI roasts your shaking technique in real-time
- Calibration Mode: 5-second test that judges if your shaking is "worthy" (spoiler: it's not)
- Shake History: Database permanently records your shameful shaking attempts
🐍 Shake-Controlled Snake Game
- Tilt Controls: On mobile, tilt device to change direction. On desktop, move mouse away from screen center.
- No Arrow Keys: Traditional controls are for cowards
- Game Over Messages: Sarcastic AI roasts like "😴 Pathetic tilting skills"
- Score Tracking: Watch your failure in real-time
- Classic Snake: Eat food, grow longer, inevitably crash into yourself while trying to tilt properly
Why This Is Hilariously Useless
Music Player Problems:
- Want to turn up the volume? Shake violently for 30 seconds straight.
- Listening on a bus? Everyone thinks you're having a seizure.
- Desktop users must thrash their mouse around like a possessed etch-a-sketch.
- Stop shaking for 2 seconds? Silent. Forever shaking or forever silent.
Snake Game Problems:
- Playing Snake is already hard. Playing it by TILTING is impossible.
- Desktop users must remember which quadrant their mouse is in.
- Every game ends in 10 seconds with a sarcastic AI insult.
- You'll look ridiculous tilting your phone back and forth.
Combined Chaos:
- Try playing Snake while the music volume keeps resetting because you stopped shaking.
- Ultimate multitasking nightmare.
How I Used Google AI (Gemini 3 Flash)
I integrated Google Gemini 3 Flash API to create an "AI Shake Coach"
Implementation:
-
Backend: FastAPI endpoint
/api/shake-coach -
Model:
gemini-3-flash-previewvia Google Generative AI API - Integration: Used Emergent's LLM integration library for seamless Gemini access
What the AI Does:
- Analyzes Shake Data: Takes intensity, count, score, and device type
- Generates Sarcastic Feedback: Creates custom roasts based on performance
- Assigns Roast Levels: Pathetic → Mediocre → Acceptable → Legendary
- Provides "Useless Tips": Like "Shake like you're trying to wake up your phone's ancestors"
Sample AI Responses:
- "Congratulations on vibrating your desk with the raw power of a drowsy hamster..."
- "At this rate, you'll reach 'audible' volume by the next solar eclipse"
- "I've seen more intensity from a leaf of lettuce in a mild breeze"
Why This AI Usage Is Perfect for the Challenge:
- The AI takes something already useless (shaking for volume) and makes it MORE useless by roasting you
- Gemini's creative language generation makes every roast unique
- It's meta-useless: AI judging your performance in a completely pointless task
Tech Stack
- Frontend: React, Tailwind CSS, Web Audio API, DeviceMotion API
- Backend: FastAPI, Python
- Database: MongoDB (to forever store your shame)
- AI: Google Gemini 3 Flash via Generative AI API
- Deployment: Emergent platform
- Motion Detection: DeviceOrientationEvent (mobile), MouseEvent (desktop)
How to Try It
Mobile:
- Visit the live demo on your phone
- Click "Play Music"
- Shake your phone aggressively
- Watch volume go up (and immediately drop when you stop)
- Try the Snake game by tilting
- Get roasted by AI
Desktop:
- Visit on your computer
- Move mouse violently in all directions
- Or spam keyboard keys
- Try controlling Snake by moving mouse to screen edges
- Fail spectacularly
Code Highlights
Shake Detection (Mobile):
window.addEventListener('devicemotion', (event) => {
const { x, y, z } = event.accelerationIncludingGravity;
const acceleration = Math.sqrt(x * x + y * y + z * z);
if (acceleration > 20) {
const intensity = Math.min(acceleration / 50, 1);
setVolume(Math.floor(intensity * 100));
}
});
AI Shake Coach (Backend):
chat = LlmChat(
api_key=os.environ.get('EMERGENT_LLM_KEY'),
session_id=f"shake-coach-{uuid.uuid4()}",
system_message="You are a sarcastic Shake Coach..."
).with_model("gemini", "gemini-3-flash-preview")
ai_response = await chat.send_message(user_message)
What I Learned
- DeviceMotionEvent API is surprisingly powerful (and hilarious)
- Gemini 3 Flash is excellent at generating creative sarcasm
- People will question your sanity when they see you violently shaking your phone
- Making something intentionally useless is harder than making something useful
- AI makes everything better, even roasting your terrible shaking technique
Conclusion
This project perfectly embodies the April Fools spirit: it's technically impressive, completely useless, and will frustrate anyone who tries it. The AI integration adds an extra layer of absurdity by judging and roasting your attempts to use an already ridiculous interface.
Try it, shake it, tilt it, and get roasted! 🎉
Built with frustration, bad ideas, and Google AI by @sushanshetty2601-pixel
This app is intentionally useless. Created for DEV April Fools Challenge 2026.




Top comments (0)