Work

2D Browser Games

Frontend
TypeScript
JavaScript
Canvas API
Game Dev
OOP
Local Storage

A pair of 2D browser games built with plain TypeScript/JavaScript and OOP. They use the Canvas API for rendering, manage input, collisions, and game loops entirely in the browser—no frameworks or engines.

Screenshot of two simple 2D browser games built with TypeScript/JavaScript

2D Browser Games is a lightweight project showcasing two small games built from scratch with TypeScript/JavaScript and object-oriented design. Each game runs entirely in the browser using the Canvas API, with simple classes handling rendering, player movement, collisions, and scoring. State is persisted locally for replayability.

🎮 Games

  1. Bug Attack (Ball Avoidance Game)
    Dodge swarms of bugs, survive as long as possible, and reach the chest.

  2. Gem Jam (Ball Collection Game)
    Collect as many gems as you can—before time runs out.

🔗 Links

🧱 Tech Stack

  • Language: TypeScript / JavaScript
  • Rendering: HTML5 Canvas API
  • Architecture: Object-Oriented Programming (classes for player, enemies, items)
  • Storage: Local Storage for scores

🚀 Features

  • Simple, fast, and fully client-side—no frameworks
  • Player movement and collision detection via OOP classes
  • Persistent high scores stored in Local Storage
  • Responsive gameplay in the browser, works offline
  • Easy to extend with new levels, sprites, and mechanics