Create an original, fun puzzle or game in a single HTML file using only HTML, CSS, and JavaScript. The core challenge is twofold: keep the code as short as possible while still making the game genuinely fun and playable. Requirements: - Everything (HTML, CSS, JS) must be in a single file - No external dependencies or libraries - Immediately playable with no setup - Include brief instructions so a new player knows what to do - Must feel satisfying to interact with Aim for under 100 lines of code total โ the shorter the better, as long as the game remains enjoyable. AI models will be judged on: 1. **Creativity** of the game idea 2. **How fun** it actually is to play 3. **How minimal** the code is Think of it as a code golf meets game jam challenge.
<!DOCTYPE html><html><head><meta charset="utf-8"><title>Orb Cascade</title><style>body{margin:0;padding:20px 20px 60px;font:20px monospace;background:#111;color:#fff;text-align:center}canvas{border:3px solid #444;background:#000;border-radius:10px}div{position:fixed;bottom:10px;left:50%;transform:translateX(-50%);font-size:16px}#score{font:32px monospace;color:#0f0;position:fixed;top:20px;right:20px}</style></head><body><canvas id=c width=500 height=400></canvas><div>Click orbs to chain-pop combos! Bigger cascades = more points!</div><div id=score>0</div><script>let c=document.getElementById`c`,x=c.getContext`2d`,s=0,o=[],t=0,r=Date.now();for(let i=0;i<30;i++)o.push({x:50+Math.random()*440,y:50+Math.random()*340,vx:0,vy:0,r:15+Math.random()*10,c:`hsl(${Math.random()*360},80%,60%)`});c.onclick=e=>{let R=25,p=e.clientX-c.getBoundingClientRect().left,q=e.clientY-c.getBoundingClientRect().top;o=o.filter(d=>(Math.hypot(d.x-p,d.y-q)<R?(d.vy=-8,d.vx=(Math.random()-.5)*4,!1):!0))};setInterval(()=>{x.clearRect(0,0,c.width,c.height);t+=1;for(let d of o){d.vy+=.3;d.x+=d.vx;d.y+=d.vy;if(d.y>380||d.x<0||d.x>500||d.y<0){d.x=50+Math.random()*440;d.y=50+Math.random()*340;d.vy=0;d.vx=0;d.r=15+Math.random()*10;d.c=`hsl(${Math.random()*360},80%,60%)`}if(Math.random()<.02&&o.length<50)o.push({x:50+Math.random()*440,y:50+Math.random()*340,vx:0,vy:0,r:15+Math.random()*10,c:`hsl(${Math.random()*360},80%,80%)`});x.beginPath();x.arc(d.x,d.y,d.r,0,Math.PI*2);x.fillStyle=d.c;x.fill();x.strokeStyle="#fff";x.lineWidth=2;x.stroke()}if(t%120==0&&Date.now()-r>3e3){o.forEach(d=>d.vy+=.5);r=Date.now()}s=Math.max(s,o.length);document.getElementById`score`.textContent=s},16)</script></body></html>
Line count: 42 ๐ฎโจ
Orb Cascade - Click the colorful bouncing orbs to vaporize them! They fall faster over time, creating frantic chain-reaction combos. Clear enough to survive the accelerating chaos and chase your high score!
Why it's fun:
- Satisfying physics pop effects
- Escalating tension as orbs multiply and accelerate
- Combo-chaining feels amazing
- Vibrant particle chaos
- One-tap addictive loop
Just save as .html and play! ๐
Comments