# TS-Games Custom framework/build system for simple single-file TypeScript games. ## Installing dependencies - Install bun (https://bun.sh/) ```bash bun install ``` ## Make a game - Create your game folder in `src/games` - Create `src/games//index.ts` with default exported function. ## Running: ```bash bun start ``` Navigate to `http://localhost:3000` to see the list of your games. Game rebuilds on each reload. ## Building ```bash bun run build ``` Will create `.html` in `dist` folder. Or to select project from list: ```bash bun run build ``` ## Features - Bun ♥ - TypeScript - Building into single `.html` file without any dependencies, all assets are inlined as data-urls. - `src/games//assets/favicon.ico` is used as page icon if present. - TSX supported with [Preact](https://preactjs.com/), because it's lightweight. - Import images as `HTMLImageElement` - PNG & JPG ```typescript import spritesheet from './assets/spritesheet.png'; console.log(spritesheet); // ``` - Import audio as `HTMLAudioElement` - WAV, MP3 & OGG ```typescript import heal from './assets/heal.ogg'; console.log(heal); //