1.2.6 • Published 1 year ago
web-game-engine v1.2.6
web-game-engine
A 2D game engine based on the standard Web APIs.
See the examples/ folder for example projects, and go here to play them.
Get started with Vite + web-game-engine
- Initialize a new Vite project. Choose
VanillaandTypescript
npm create vite@latestcdinto the directory- Install web-game-engine
npm i web-game-engine- Delete
src/counter.tsandsrc/style.css. Replace the contents ofsrc/main.tswith
import { ExamplePlayer, Game, TextObject } from 'web-game-engine';
const game = new Game(document.querySelector('#app'));
new ExamplePlayer(50, 50)
.activate(game);
new TextObject(() => `FPS: ${game.currentFps.toFixed(1)}`, 8, 8)
.activate(game);
game.play();- Play the game by running in dev mode
npm run dev- Build, and deploy the
distfolder
npm run build1.2.6
1 year ago
1.2.5
1 year ago
1.2.0
2 years ago
1.2.4
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago