cd /news/ai-tools/i-built-a-2-player-brain-game-at-a-g… · home › topics › ai-tools › article
[ARTICLE · art-151626] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

I Built a 2-Player Brain Game at a Google Community Event (and Then Leveled It Up)

A software engineering student at IMSciences Peshawar built Number Nebula, a two-player HTML5 Canvas brain game, during a Google AI Studio "vibe coding" challenge hosted by GDG on Campus. The single-file JavaScript game combines math and word puzzles with a space-shooter format, using Web Audio API-generated sound effects and a 60fps game loop, and was extended with power-ups, a boss battle, age-based difficulty, and a bot opponent. The developer's stated lesson was to make one change at a time and test it before moving on.

by read2 min views2 publishedOct 16, 2026

Today, I attended Vibe Coding with Google AI Studio, hosted by GDG on Campus in Peshawar. The session was about Google AI Studio and how it can turn a rough idea into a working app in minutes.

At the end, the speaker gave us a challenge: build a game. The top 3 would get a surprise. 🎁

Here's what I built, what I learned, and how I took it further.

#

🎮 Play it first

👉 Play Number Nebula on CodePen Controls: Player 1 uses A D to move and W to fire. Player 2 uses the arrow keys. No friend nearby? Pick Cosmic Bot.

#

💡 The idea: Number Nebula

I wanted a game that is fun for kids but still makes adults think. So I mixed a classic space shooter with puzzles:

Math Duel: solve the sum, then shoot the alien carrying the answer. #

Word Builder: read a clue, then shoot letters in the right order to spell the word. #

Brain Mix: both, taking turns.

Two players share one screen, and every 3 correct answers in a row fires an attack (Freeze, Fog, or Meteor Rush) at your rival.

#

🔁 How I built it

Prompt: I wrote a structured prompt (concept, controls, levels, scoring, visuals) and gave it to Google AI Studio. It built a working version on the first try. 2. Iterate: I listed improvements and ranked them by impact. The biggest problem was that players never affected each other, so I added combo attacks. 3. Level up: I added power-ups, a boss battle, age-based difficulty (so a 7-year-old and an adult can play a fair match), a bot opponent, and the Word Builder mode.

My biggest lesson: make one change at a time, test it, then move on. Small steps beat one giant request.

#

⚙️ Under the hood

  • Pure HTML5 Canvas + JavaScript , one single file, no frameworks
  • Sound effects generated in code with the Web Audio API (no audio files)
  • A simple game loop : update positions → check collisions → draw, about 60 times a second

#

🚀 What's next

Online multiplayer , so two friends can play from different cities #

Theme packs for Word Builder, starting with coding words like LOOP, ARRAY and CLASS

  • A global leaderboard

I'm a Software Engineering student at IMSciences, Peshawar, and I'm building in public. Feedback is very welcome: what mode should I add next? 👇

── more in #ai-tools 4 stories · sorted by recency
── more on @google ai studio 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-a-2-player-b…] indexed:0 read:2min 2026-10-16 · —