• Blog
  • Docs
  • Pricing
  • Weโ€™re hiring!
Log inSign up
wilhelm

wilhelm

qbat

Vibecoded game with ATProto features
Public
Like
qbat
Home
Code
5
frontend
4
.vtignore
README.md
deno.json
H
index.ts
Branches
4
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ€“ all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
9/16/2025
Viewing readonly version of hunger branch: v46
View latest version
README.md

QBAT

QBAT is a 3D isometric puzzle game where you navigate a maze-like grid with limited moves, collecting apples to gain additional moves and reaching a golden goal to win.

๐ŸŽฎ Gameplay

  • Objective: Reach the golden goal before running out of moves
  • Movement: Move around the grid using arrow keys (โ†‘โ†“โ†โ†’)
  • Move Limit: You start with 10 moves - use them wisely!
  • Apple Collection: Collect red apples to gain 3 additional moves each
  • Walls: Brown walls block your path - you can only move on green floor tiles
  • Goal: Reach the golden cylinder to win the game

๐ŸŽฏ Features

  • 3D Top-Down View: Classic puzzle game perspective with Three.js rendering
  • Integrated UI: Game state displayed directly over the game canvas for immersive experience
  • Grid-Based Movement: Simple tile-based movement system
  • Resource Management: Limited moves create strategic gameplay
  • Apple Collection: Red apples scattered around the maze provide bonus moves
  • Win/Lose Conditions: Clear victory and failure states
  • Restart Functionality: Easy game restart with a single button click
  • Smooth Animations: Hop-based movement with bounce effects
  • Responsive Controls: Arrow keys are captured to prevent page scrolling

๐Ÿ› ๏ธ Technical Implementation

Architecture

  • Backend: Deno with Hono framework
  • Frontend: Vanilla JavaScript with Three.js for 3D rendering
  • Build: No build step required - runs directly with Deno

Key Components

  • 3D Scene: Three.js scene with top-down camera positioning
  • Grid Generation: Maze-like grid with walls and floor tiles
  • Apple System: Random apple placement with collection mechanics
  • Move Management: Limited moves with apple-based bonus system
  • Animation System: Smooth hop animations with bounce effects
  • Input Handling: Keyboard event management with preventDefault for arrow keys
  • Game State: Win/lose conditions with status tracking

File Structure

/
โ”œโ”€โ”€ index.ts              # Deno/Hono server
โ”œโ”€โ”€ deno.json             # Deno configuration
โ””โ”€โ”€ frontend/
    โ”œโ”€โ”€ index.html        # HTML template
    โ”œโ”€โ”€ index.tsx         # Game implementation
    โ”œโ”€โ”€ style.css         # Styling
    โ””โ”€โ”€ favicon.svg       # Game icon

๐Ÿš€ Running the Game

  1. Install Deno (if not already installed):

    curl -fsSL https://deno.land/install.sh | sh
  2. Start the server:

    deno run --allow-net index.ts
  3. Open your browser to http://localhost:8000

  4. Play: Use arrow keys to navigate the maze and collect apples!

๐ŸŽจ Visual Design

  • Camera: Top-down view positioned at (0, 10, 0) for classic puzzle game perspective
  • Lighting: Ambient + directional lighting optimized for top-down view
  • Player: Red sphere that hops between floor tiles
  • Environment: Green floor tiles and brown walls create a maze-like appearance
  • Collectibles: Red apples scattered around the maze
  • Goal: Golden cylinder marking the victory location
  • Animations: Smooth hop movements with bounce effects

๐Ÿ”ง Development

The game is built with modern web technologies and requires no build process. Simply run the Deno server and open in any modern browser. Three.js handles all 3D rendering and animations.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
Weโ€™re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
ยฉ 2025 Val Town, Inc.