<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Salman Tariq</title>
    <description>The latest articles on DEV Community by Salman Tariq (@salman_tariq_be5d705509b0).</description>
    <link>https://dev.to/salman_tariq_be5d705509b0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4176062%2F8b359e9e-9894-4fb0-8f29-ec7e6fc6e7b9.jpg</url>
      <title>DEV Community: Salman Tariq</title>
      <link>https://dev.to/salman_tariq_be5d705509b0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/salman_tariq_be5d705509b0"/>
    <language>en</language>
    <item>
      <title>I Built a 2-Player Brain Game at a Google Community Event (and Then Leveled It Up)</title>
      <dc:creator>Salman Tariq</dc:creator>
      <pubDate>Fri, 16 Oct 2026 21:32:20 +0000</pubDate>
      <link>https://dev.to/salman_tariq_be5d705509b0/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up-2k42</link>
      <guid>https://dev.to/salman_tariq_be5d705509b0/i-built-a-2-player-brain-game-at-a-google-community-event-and-then-leveled-it-up-2k42</guid>
      <description>&lt;p&gt;Today, I attended &lt;strong&gt;Vibe Coding with Google AI Studio&lt;/strong&gt;, hosted by &lt;strong&gt;GDG on Campus&lt;/strong&gt; in &lt;strong&gt;Peshawar&lt;/strong&gt;. The session was about Google AI Studio and how it can turn a rough idea into a working app in minutes.&lt;/p&gt;

&lt;p&gt;At the end, the speaker gave us a challenge: &lt;strong&gt;build a game. The top 3 would get a surprise.&lt;/strong&gt; 🎁&lt;/p&gt;

&lt;p&gt;Here's what I built, what I learned, and how I took it further.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎮 Play it first
&lt;/h2&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://YOUR-USERNAME.github.io/number-nebula/" rel="noopener noreferrer"&gt;Play Number Nebula (full screen)&lt;/a&gt;&lt;/strong&gt; · 💻 &lt;strong&gt;&lt;a href="https://github.com/YOUR-USERNAME/number-nebula" rel="noopener noreferrer"&gt;Source code on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Controls:&lt;/strong&gt; Player 1 uses &lt;code&gt;A&lt;/code&gt; &lt;code&gt;D&lt;/code&gt; to move and &lt;code&gt;W&lt;/code&gt; to fire. Player 2 uses the arrow keys. No friend nearby? Pick &lt;strong&gt;Cosmic Bot&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 The idea: Number Nebula
&lt;/h2&gt;

&lt;p&gt;I wanted a game that is &lt;strong&gt;fun for kids but still makes adults think&lt;/strong&gt;. So I mixed a classic space shooter with puzzles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Math Duel:&lt;/strong&gt; solve the sum, then shoot the alien carrying the answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Word Builder:&lt;/strong&gt; read a clue, then shoot letters in the right order to spell the word.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brain Mix:&lt;/strong&gt; both, taking turns.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  🔁 How I built it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prompt:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterate:&lt;/strong&gt; I listed improvements and ranked them by impact. The biggest problem was that players never affected each other, so I added combo attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level up:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;My biggest lesson:&lt;/strong&gt; make one change at a time, test it, then move on. Small steps beat one giant request.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Under the hood
&lt;/h2&gt;

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

&lt;h2&gt;
  
  
  🚀 What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Online multiplayer&lt;/strong&gt;, so two friends can play from different cities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Theme packs&lt;/strong&gt; for Word Builder, starting with coding words like LOOP, ARRAY and CLASS&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;global leaderboard&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

</description>
      <category>ai</category>
      <category>gamedev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
