@tialops/maki
v1.0.1
Published
A lightweight Phaser 4 game framework with CLI scaffolding and a built-in dev server
Maintainers
Readme
🍣 Maki
A lightweight game framework built on Phaser 4 — scaffold a 2D game, drop in sprites, and start moving in minutes.
Install
npm install @tialops/makiQuick Start
npx maki new my-game
cd my-game
npx maki devOpens a live-reload dev server at http://localhost:5173.
Usage
import { Scene } from '@tialops/maki'
export default class GameScene extends Scene {
preload() {
super.preload()
this.lia = this.maki.player('lia') // loads sprite + animations
}
create() {
super.create()
}
update() {
this.maki.move(this.lia) // arrow keys / WASD out of the box
}
}Custom player behavior
import { MakiPlayer } from '@tialops/maki'
export class MyPlayer extends MakiPlayer {
move() { /* your own input logic */ }
onCollide(other) {}
onOverlap(other) {}
}CLI
| Command | Description |
|---|---|
| maki new <name> | Scaffold a new game project |
| maki new sprite | Configure a sprite sheet interactively |
| maki dev | Start the Vite dev server |
Sprite Sheet Format
Frames in a single horizontal row, grouped by direction:
frames 0–5 right
frames 6–11 up
frames 12–17 left
frames 18–23 downRun maki new sprite to configure any sheet interactively.
Project Structure
my-game/
├── scenes/ ← extend Scene here
├── sprites/ ← drop .png sprite sheets
├── maps/ ← optional tilemaps
├── game.js
└── index.htmlLicense
ISC
