<?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: Mohammad Rafaquat Alam</title>
    <description>The latest articles on DEV Community by Mohammad Rafaquat Alam (@raf-xtgt).</description>
    <link>https://dev.to/raf-xtgt</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%2F4090303%2F976d50ca-3674-4b4e-9756-c676cb43b4d8.jpg</url>
      <title>DEV Community: Mohammad Rafaquat Alam</title>
      <link>https://dev.to/raf-xtgt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raf-xtgt"/>
    <language>en</language>
    <item>
      <title>Vibe coded an AI level designer where agents plan and algorithms build using IBM Bob 2.0</title>
      <dc:creator>Mohammad Rafaquat Alam</dc:creator>
      <pubDate>Sun, 27 Sep 2026 14:59:29 +0000</pubDate>
      <link>https://dev.to/raf-xtgt/vibe-coded-an-ai-level-designer-where-agents-plan-and-algorithms-build-4dba</link>
      <guid>https://dev.to/raf-xtgt/vibe-coded-an-ai-level-designer-where-agents-plan-and-algorithms-build-4dba</guid>
      <description>&lt;p&gt;Describe a level in plain words and play it a minute later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://neuro-level-designer.vercel.app" rel="noopener noreferrer"&gt;https://neuro-level-designer.vercel.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/raf-xtgt/neuro-symbolic-level-designer" rel="noopener noreferrer"&gt;https://github.com/raf-xtgt/neuro-symbolic-level-designer&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Making 2D isometric levels is slow. You slice spritesheets by hand, tag every tile (floor? wall? walkable?), paint the map tile by tile, then write loader code. Asking an AI to "just generate the map" fails too: raw tile grids drift, use tiles that don't exist, and give you maps you can't walk through.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: AI agents plan, algorithms build, a validator guarantees
&lt;/h2&gt;

&lt;p&gt;I split the work so AI only does what needs judgment. Everything that must be exact is plain code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Data Ingestion.&lt;/strong&gt; Upload any isometric spritesheet. Algorithms detect the tile size and slice every sprite. Four AI agents then inspect each tile in parallel (boundary, classification, collision, entity), each answering in a strict schema. A harmonizer merges their answers in code and only asks the AI again where the agents disagree. The result is an asset catalog, cached so the same sheet costs nothing next time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Level Planning.&lt;/strong&gt; A Topology Agent turns your prompt into a &lt;em&gt;room graph&lt;/em&gt; (rooms, directions, corridors, enemies, style), never raw tiles. Algorithms build the exact isometric grid, place the player, zombies and exit, dress the rooms, and seal the level with a hedge. A validator checks the level is playable: a path from spawn to exit exists and every room is reachable. If a check fails, structured errors go back for a new layout or a new plan, in a self-healing LangGraph loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Execution.&lt;/strong&gt; An AI agent designs zombie behavior per room (patrol, guard the exit, wait until you're near), as data, never code. Compilers write a standard Tiled map, templates generate typed Flame (Dart) code, and a verification engine runs 6 checks, including &lt;code&gt;dart analyze&lt;/code&gt; on the generated code.&lt;/p&gt;

&lt;p&gt;Then you press &lt;strong&gt;Try Out&lt;/strong&gt; and play it in the browser, or download the bundle for your own Flame game.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;Flutter web + Flame, FastAPI, LangGraph, Pydantic structured output, OpenCV. The backend runs on Cloud Run and the frontend on Vercel.&lt;/p&gt;

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

&lt;p&gt;I built it for the IBM Bob 2.0 Hackathon. One orchestrator session wrote the architecture and a precise prompt for each task. A coding agent implemented each task, and I reviewed it with tests and browser checks. IBM Bob built the first five tasks: the map and tileset compilers and the first playable game. After my Bob credits ran out, I continued with Claude Code using the same workflow. Every prompt is in the repo under &lt;code&gt;bob_sessions/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://neuro-level-designer.vercel.app" rel="noopener noreferrer"&gt;https://neuro-level-designer.vercel.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>flutter</category>
      <category>ibmbob</category>
    </item>
    <item>
      <title>I built a jungle survival browser game where you co-op with an AI agent</title>
      <dc:creator>Mohammad Rafaquat Alam</dc:creator>
      <pubDate>Fri, 04 Sep 2026 05:20:15 +0000</pubDate>
      <link>https://dev.to/raf-xtgt/i-built-a-jungle-survival-browser-game-where-you-co-op-with-an-ai-agent-4503</link>
      <guid>https://dev.to/raf-xtgt/i-built-a-jungle-survival-browser-game-where-you-co-op-with-an-ai-agent-4503</guid>
      <description>&lt;p&gt;This is my first post here. I figured I should start somewhere, and a hackathon project is as good a reason as any.&lt;/p&gt;

&lt;h2&gt;
  
  
  The background
&lt;/h2&gt;

&lt;p&gt;I have been writing business software for about three years. Dashboards, APIs, data pipelines. It pays the bills but it stopped being fun a while ago. When I saw the &lt;a href="https://webmcp.devpost.com/" rel="noopener noreferrer"&gt;WebMCP Challenge&lt;/a&gt; hackathon, I decided to build something I would actually want to play when it was done.&lt;/p&gt;

&lt;p&gt;This is also my first game. Never touched game loops, sprite rendering, or canvas animation before this week.&lt;/p&gt;

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

&lt;p&gt;Erwin's Survival is a browser game where a human and an AI agent play together. The human explores a jungle, collects resources, and builds a base. The AI reads the game state through WebMCP tools and places defenses before each night attack.&lt;/p&gt;

&lt;p&gt;The game has three simple phases that repeat for three days:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Morning:&lt;/strong&gt; You move with WASD, cut through jungle, collect wood/stone/rope/herbs. You build a base at the crash site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dusk:&lt;/strong&gt; The AI takes over. It reads the threat (how many slimes, from which sides) and calls WebMCP tools to place spike traps, barricades, and fires around the base.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Night:&lt;/strong&gt; Slimes crawl in along three roads. You aim with arrow keys and shoot with spacebar. The defenses the AI placed catch what you miss.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Survive 3 nights and rescue arrives.&lt;/p&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%2Fpko6g6eq9dl6hqyg5c19.png" 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%2Fpko6g6eq9dl6hqyg5c19.png" alt="Dusk phase: the AI places defenses while the player watches" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How the AI part works
&lt;/h2&gt;

&lt;p&gt;The game uses &lt;a href="https://developer.chrome.com/docs/extensions/develop/concepts/webmcp" rel="noopener noreferrer"&gt;WebMCP&lt;/a&gt;, which lets a website expose tools that an external AI agent can discover and call. The game registers 5 tools. Four of them only exist during the dusk phase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;get_game_state&lt;/code&gt; — always available, returns health/inventory/position&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_planning_context&lt;/code&gt; — dusk only, returns expected enemies and defense options&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;place_spike_trap({side})&lt;/code&gt; — costs 2 wood + 1 stone&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;build_barricade({side})&lt;/code&gt; — costs 3 wood&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;set_fire({side})&lt;/code&gt; — costs 1 wood + 1 herbs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When night falls, the defense tools are unregistered. The AI's job is done until the next dusk.&lt;/p&gt;

&lt;p&gt;I tested it with Chrome's WebMCP flag and the Model Context Tool Inspector extension by François Beaufort. You type something like "plan the defense" and the AI calls the tools one by one. Each call updates the game map in real time.&lt;/p&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%2Fgj86jp3ifpprd8u139ej.png" 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%2Fgj86jp3ifpprd8u139ej.png" alt="Night phase: slimes approach while the player defends" width="800" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The thing I got wrong first
&lt;/h2&gt;

&lt;p&gt;The first version had the AI doing everything: gather water, eat berries, chop wood, craft items. All through WebMCP tools. It worked, but it was boring. Typing "gather water" to an AI when pressing R does the same thing is just friction.&lt;/p&gt;

&lt;p&gt;On day 2, I scrapped that and gave the AI only the planning phase. That was the right call. The keyboard handles actions. The AI handles strategy. Both halves got better once I stopped forcing everything through one channel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Vanilla JS + HTML Canvas + Vite&lt;/li&gt;
&lt;li&gt;No framework. About 1500 lines of JS across 9 modules&lt;/li&gt;
&lt;li&gt;Pixel art from a mix of free and paid asset packs ($3.20 total)&lt;/li&gt;
&lt;li&gt;Deployed on Vercel as a static site&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Asset credits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bow and arrows: &lt;a href="https://sweeetpotatoo.itch.io/top-down-characters" rel="noopener noreferrer"&gt;sweeetpotatoo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Terrain, trees, campfires, barricades: &lt;a href="https://toffeecraft.itch.io/forest-nature-pack" rel="noopener noreferrer"&gt;ToffeeCraft&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Red slime enemies: &lt;a href="https://free-game-assets.itch.io/pixel-art-slime-enemies-top-down-sprite-pack" rel="noopener noreferrer"&gt;Free Game Assets&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Erwin character sprite and grass tiles: &lt;a href="https://nogardlab.itch.io/stardew-farm-pixel-art-top-down-assets" rel="noopener noreferrer"&gt;nogardlab&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it / look at the code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Play:&lt;/strong&gt; &lt;a href="https://jungle-base.vercel.app/" rel="noopener noreferrer"&gt;jungle-base.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://github.com/raf-xtgt/jungle-base" rel="noopener noreferrer"&gt;github.com/raf-xtgt/jungle-base&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Demo video:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=TYEkmSEia8U" rel="noopener noreferrer"&gt;youtube.com/watch?v=TYEkmSEia8U&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to test the WebMCP tools, you need Chrome 146+ with the &lt;code&gt;chrome://flags/#enable-webmcp-testing&lt;/code&gt; flag enabled, plus the Model Context Tool Inspector extension. Or just add &lt;code&gt;?debug=true&lt;/code&gt; to the URL for manual buttons.&lt;/p&gt;

&lt;p&gt;Three days, one game, a lot of sprite cropping. It was fun. Might do more of these.&lt;/p&gt;

</description>
      <category>webmcp</category>
      <category>vite</category>
      <category>gamedev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
