Craters — TypeScript HTML5 Game Framework

Craters logo

View on GitHub  ·  Documentation  ·  Play sandbox

Craters is a modular JavaScript framework reimplemented in TypeScript for rapid HTML5 game development. Built around the Entity-Component-System (ECS) pattern, it gives developers a clean, composable foundation for browser-based games without engine lock-in.

Features:

  • Entity Component System (ECS)World, Entity, System, Query for managing all game logic
  • Collision Detection — SAT (Separating Axis Theorem) for circles and convex polygons; QuadTree for broad-phase spatial partitioning
  • Rendering — WebGL sprite batching renderer + Canvas2D fallback with primitive drawing
  • Input — Unified keyboard, mouse, and touch handling via KeyboardEvent.code
  • Sound — Web Audio API wrapper for effects and music
  • Asset Management — Simple loader for images and resources
  • Tilemaps — Load and render tilemap data

Install:

npm install craters
comments powered by Disqus