<?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: Saira Bibi</title>
    <description>The latest articles on DEV Community by Saira Bibi (@saira_bibi_40474c69e974a2).</description>
    <link>https://dev.to/saira_bibi_40474c69e974a2</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%2F4078950%2F89017dc3-92ee-4341-9972-115ed5b2fed5.png</url>
      <title>DEV Community: Saira Bibi</title>
      <link>https://dev.to/saira_bibi_40474c69e974a2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saira_bibi_40474c69e974a2"/>
    <language>en</language>
    <item>
      <title>🐶 Feed the Pups! — HTML5 Canvas Arcade Game</title>
      <dc:creator>Saira Bibi</dc:creator>
      <pubDate>Sun, 16 Aug 2026 15:31:18 +0000</pubDate>
      <link>https://dev.to/saira_bibi_40474c69e974a2/feed-the-pups-html5-canvas-arcade-game-4e55</link>
      <guid>https://dev.to/saira_bibi_40474c69e974a2/feed-the-pups-html5-canvas-arcade-game-4e55</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Feed a hungry puppy, grab power-ups, and hit the high score! 🍖⚡&lt;/em&gt;&lt;br&gt;
&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-08-13"&gt;Weekend Challenge: Dog Days Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🎮 &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://sairabibi248.github.io/dog-treat-catch/" rel="noopener noreferrer"&gt;Play Dog Treat Catch Here&lt;/a&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Dog Treat Catch is an interactive, responsive HTML5 Canvas arcade game built for the DEV Weekend Challenge: Dog Days Edition. &lt;br&gt;
In this game, players control a customizable, hungry puppy navigating through falling items. The goal is to catch delicious treats, gather active power-ups (like Shields and 2x Score Multipliers), avoid hazardous foods like chocolates, and progress through 20 dynamically scaling levels before running out of lives!&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/sairabibi248/dog-treat-catch/raw/main/demo.mp4" rel="noopener noreferrer"&gt;🎬 Click Here to Watch Full Gameplay Video Demo&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/sairabibi248/dog-treat-catch" rel="noopener noreferrer"&gt;Dog Treat Catch - GitHub Repository&lt;/a&gt; 
&lt;/h2&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy2xqy0u72hls4ubwbrwi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy2xqy0u72hls4ubwbrwi.gif" alt="Dog Treat Catch Gameplay Animation showing puppy catching treats" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML5 Canvas:&lt;/strong&gt; Handled the 60FPS game loop using &lt;code&gt;requestAnimationFrame&lt;/code&gt;, rendering character sprites, falling treats, particle effects, and dynamic background themes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla JavaScript (ES6+):&lt;/strong&gt; Managed object-oriented game logic, collision detection algorithms, state handling, and LocalStorage high-score persistence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google AI Integration:&lt;/strong&gt; Added a dynamic post-game review box that evaluates player reflexes and achievements, fulfilling the Google AI category criteria.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Audio API (Synthesized SFX):&lt;/strong&gt; Created zero-dependency, real-time synthesized sound effects using pure browser frequency oscillators.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive CSS3:&lt;/strong&gt; Designed custom overlays, level selection screens, and touch/mouse controls for desktop and mobile play.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🐶 Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🦮 Custom Dog Characters:&lt;/strong&gt; Choose your favorite puppy (Golden, Puppy, Labrador, or Poodle).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🏆 20 Progressive Levels:&lt;/strong&gt; Unique background themes, increasing difficulty, and dynamic target scores.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚡ Power-Ups &amp;amp; 💣 Hazards:&lt;/strong&gt; Catch bones, meat, and bacon while avoiding chocolates and hazards. Collect Shields and 2x Score Multipliers!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🤖 AI Performance Coach:&lt;/strong&gt; Instant post-game AI review analyzing your puppy-catching skills and reflexes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔊 Zero-Dependency Web Audio:&lt;/strong&gt; Built-in dynamic sound effects created entirely with the browser's Web Audio API.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Google AI&lt;/strong&gt;: Integrated an interactive post-game AI coaching and performance review system that analyzes the player's final score and level performance upon game over to provide personalized coaching feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp7d73tsi13g2ctzbjth7.png" alt="Dog Treat Catch Technology Stack Architecture Overview" width="800" height="469"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  🎯 Challenges I Faced
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Canvas Collision Detection Optimization:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Detecting collisions between a moving puppy and 20+ falling items per frame required efficient bounding box algorithms. I implemented spatial partitioning to reduce O(n²) comparisons and maintain smooth 60FPS performance even on mobile devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Audio API Synthesis:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Creating dynamic sound effects without external audio files was tricky. I had to understand oscillator frequencies and envelope generation to produce believable "catch" and "miss" sounds using pure browser APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive Touch Controls:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Getting accurate touch input across different device sizes and orientations required careful coordinate mapping and debouncing to prevent input lag during intense gameplay.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Gemini AI Integration:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Integrating real-time API calls after gameplay needed proper error handling, rate limiting, and fallback messaging if the AI service was unavailable. I added loading states and timeout mechanisms to keep the UX smooth.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Level Scaling:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Each of the 20 levels needed progressively harder behavior (faster spawns, more hazards, higher score targets) without making the curve feel unfair. Balancing difficulty curves took playtesting and mathematical scaling.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  📚 Learnings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Technical Insights:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canvas Rendering:&lt;/strong&gt; &lt;code&gt;requestAnimationFrame&lt;/code&gt; provides smoother animations than &lt;code&gt;setInterval&lt;/code&gt;, especially critical for arcade games where frame timing matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Game State Management:&lt;/strong&gt; Using a centralized game state object made debugging and feature additions significantly easier than scattered variables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Storage Persistence:&lt;/strong&gt; Simple JSON serialization allows players to track personal bests across sessions without a backend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Integration in Games:&lt;/strong&gt; Asynchronous AI calls need careful timing to not disrupt active gameplay or final screens.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Design Insights:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Feedback is Everything:&lt;/strong&gt; Visual particle effects, floating text scores, and sound effects make the game feel responsive and rewarding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive Difficulty:&lt;/strong&gt; Starting easy and ramping up gradually keeps players engaged without frustration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile-First Thinking:&lt;/strong&gt; Designing for touch first, then enhancing for mouse, created a better experience for all devices.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dev Challenge Experience:
&lt;/h3&gt;

&lt;p&gt;Building for the "Dog Days Edition" with Google AI integration taught me how to meaningfully combine third-party APIs (like Google Gemini) into game mechanics rather than forcing it unnecessarily.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔮 Future Improvements
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Short Term (Next Updates):
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🏅 &lt;strong&gt;Achievement System&lt;/strong&gt; - Unlock badges for milestones (First Shield Caught, 10+ Combo Streak, etc.)&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Enhanced Stats Screen&lt;/strong&gt; - Display accuracy percentage, total treats caught, power-ups used breakdown&lt;/li&gt;
&lt;li&gt;🎵 &lt;strong&gt;Background Music&lt;/strong&gt; - Add looping ambient tracks for each level theme , Save top 10 high scores with player names&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Medium Term (Major Features):
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🎮 &lt;strong&gt;Multiplayer Mode&lt;/strong&gt; - Split-screen or online competition with friends&lt;/li&gt;
&lt;li&gt;🐕 &lt;strong&gt;More Dog Characters&lt;/strong&gt; - Unlock additional breeds through achievements&lt;/li&gt;
&lt;li&gt;🎨 &lt;strong&gt;Customization&lt;/strong&gt; - Let players customize their puppy's colors/appearance&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Long Term (Polish &amp;amp; Expansion):
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;📱 &lt;strong&gt;Native Mobile App&lt;/strong&gt; - Package as PWA or native iOS/Android&lt;/li&gt;
&lt;li&gt;🌍 &lt;strong&gt;Localization&lt;/strong&gt; - Support multiple languages (Urdu, Hindi, Spanish, etc.)&lt;/li&gt;
&lt;li&gt;🎯 &lt;strong&gt;Advanced AI Coach&lt;/strong&gt; - Use machine learning to predict and counter player patterns&lt;/li&gt;
&lt;li&gt;🎬 &lt;strong&gt;Replay System&lt;/strong&gt; - Record and watch back your best/worst moments&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎉 Conclusion
&lt;/h2&gt;

&lt;p&gt;Dog Treat Catch was an exciting project that combined core game development skills with modern web APIs and AI integration. Building a complete arcade game from scratch—from collision detection to particle effects to AI coaching—reinforced the importance of modular code, iterative testing, and player-centric design.&lt;/p&gt;

&lt;p&gt;The integration of Google Gemini AI transformed the game-over screen from a simple restart prompt into an interactive coaching experience, adding personality and re-engagement value without feeling gimmicky.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✨ HTML5 Canvas is powerful for 2D games when optimized correctly&lt;/li&gt;
&lt;li&gt;✨ Vanilla JavaScript can handle complex game logic without heavy frameworks&lt;/li&gt;
&lt;li&gt;✨ Web APIs (Audio, LocalStorage, Fetch) enable richer experiences than we often assume&lt;/li&gt;
&lt;li&gt;✨ Player feedback (visual, audio, haptic) makes games feel alive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you're building your first game or your hundredth, remember: start simple, iterate based on feedback, and have fun! 🎮&lt;/p&gt;

&lt;p&gt;Want to try it out? &lt;strong&gt;Play Dog Treat Catch now--- and see if you can beat Level 20! 🐕&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
