{"slug": "i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up", "title": "I Built a 2-Player Brain Game at a Google Community Event (and Then Leveled It Up)", "summary": "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.", "body_md": "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.\n\nAt the end, the speaker gave us a challenge: **build a game. The top 3 would get a surprise.** 🎁\n\nHere's what I built, what I learned, and how I took it further.\n\n## \n  \n  \n  🎮 Play it first\n\n👉 **[Play Number Nebula on CodePen](https://codepen.io/Salman-Tariq-the-sasster/pen/01a1465d-e154-79f0-9507-43c0fea83afb)** \n\n**Controls:** Player 1 uses `A` `D` to move and `W` to fire. Player 2 uses the arrow keys. No friend nearby? Pick **Cosmic Bot**.\n\n## \n  \n  \n  💡 The idea: Number Nebula\n\nI wanted a game that is **fun for kids but still makes adults think**. So I mixed a classic space shooter with puzzles:\n\n- \n**Math Duel:** solve the sum, then shoot the alien carrying the answer.\n- \n**Word Builder:** read a clue, then shoot letters in the right order to spell the word.\n- \n**Brain Mix:** both, taking turns.\n\nTwo players share one screen, and every 3 correct answers in a row fires an attack (Freeze, Fog, or Meteor Rush) at your rival.\n\n## \n  \n  \n  🔁 How I built it\n\n1. \n**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.\n2. \n**Iterate:** I listed improvements and ranked them by impact. The biggest problem was that players never affected each other, so I added combo attacks.\n3. \n**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.\n\n**My biggest lesson:** make one change at a time, test it, then move on. Small steps beat one giant request.\n\n## \n  \n  \n  ⚙️ Under the hood\n\n- Pure **HTML5 Canvas + JavaScript** , one single file, no frameworks\n- Sound effects generated in code with the **Web Audio API** (no audio files)\n- A simple **game loop** : update positions → check collisions → draw, about 60 times a second\n\n## \n  \n  \n  🚀 What's next\n\n- \n**Online multiplayer** , so two friends can play from different cities\n- \n**Theme packs** for Word Builder, starting with coding words like LOOP, ARRAY and CLASS\n- A **global leaderboard**\n\nI'm a Software Engineering student at IMSciences, Peshawar, and I'm building in public. Feedback is very welcome: **what mode should I add next?** 👇", "url": "https://wpnews.pro/news/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up", "canonical_source": "https://dev.to/salman_tariq_be5d705509b0/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up-3j3d", "published_at": "2026-10-16 21:13:06+00:00", "updated_at": "2026-10-16 21:22:44.005516+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "developer-tools"], "entities": ["Google AI Studio", "GDG on Campus", "IMSciiences Peshawar", "Number Nebula", "CodePen", "Web Audio API", "HTML5 Canvas"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up", "markdown": "https://wpnews.pro/news/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up.md", "text": "https://wpnews.pro/news/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up.txt", "jsonld": "https://wpnews.pro/news/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up.jsonld"}}