Aunty Betty's Lair

Interactive JavaScript Adventure Game

JavaScript HTML5 CSS3 Game AI
View on GitHub

Project Overview

An engaging browser-based adventure game built entirely with vanilla JavaScript. Players navigate through Aunty Betty's mysterious lair, facing AI opponents, managing inventory, and solving puzzles. The game features complex mechanics including pathfinding AI, multiplayer support, and a rich storyline.

Key Features

  • AI opponents with pathfinding algorithms
  • Dynamic inventory management system
  • Multiplayer support with turn-based mechanics
  • Interactive puzzle-solving elements
  • Save/load game state functionality
  • Responsive design for mobile and desktop

Technical Implementation

Game Architecture
  • Game Loop: Efficient rendering loop with requestAnimationFrame
  • State Management: Custom state machine for game phases
  • Event System: Pub/sub pattern for loose coupling
  • AI System: A* pathfinding with behavior trees
Technologies
  • Vanilla JavaScript: No frameworks, pure ES6+
  • Canvas API: For game rendering
  • LocalStorage: Game state persistence
  • CSS Grid: Responsive UI layout

Challenges & Solutions

Challenge: AI Pathfinding Performance

Solution: Implemented A* with heuristic optimization and path caching to reduce computation.

Challenge: Managing Complex Game State

Solution: Created a centralized state management system with immutable updates and state history.

Challenge: Multiplayer Synchronization

Solution: Implemented turn-based system with state validation to ensure consistency.

What I Learned

  • Game development patterns and architecture
  • Implementing AI pathfinding algorithms
  • Event-driven programming in JavaScript
  • Performance optimization for browser games
  • State management in complex applications