Game engine for EvanMMO's typescript games.
Evan wanted something specifically tailored to low spec pixel perfect games.
You may use the Template Game as a starting point, or create a repository from scratch using these instructions.
- Install Node.js v20.12.2.
- Create a
package.json
file at the root of your game's codebase.
{
"scripts": {
"dev": "pigeon dev",
"lint": "pigeon lint",
"lint:fix": "pigeon lint:fix",
"zip": "pigeon zip"
},
"dependencies": {
"pixel-pigeon": "evannorton/pixel-pigeon"
},
"engines": {
"npm": "10.5.0",
"node": "20.12.2"
}
}
- Create a
pp-config.json
file at the root of your game's codebase.
{
"height": 360,
"name": "My Cool Game",
"requireClickToFocus": true,
"width": 640
}
- Create a
pp-dev.json
file at the root of your game's codebase.
{
"port": 3000,
"renderPathing": false
}
- Create a
pp-env.json
file at the root of your game's codebase.
{
"newgroundsAppID": null,
"newgroundsEncryptionKey": null
}
- Create a
project.ldtk
file at the root of your game's codebase, using the LDTK level editor. - Create a
.gitignore
file at the root of your game's codebase.
node_modules
pp-dev.json
game.zip
- Create an
audio
folder at the root of your game's codebase. - Create an
images
folder at the root of your game's codebase. - Create a
src
folder at the root of your game's codebase. - Create
src/tsconfig.json
.
{
"extends": "../node_modules/pixel-pigeon/api/tsconfig.json",
"include": [
"./**/*.ts"
]
}
- Create an
index.ts
file inside of thesrc
folder. - Run
npm install
. - Run
npm run dev
to start a dev server with hot reloading. - Explore the documentation: https://pp.evanmmo.com/
Run your game on a local dev server with hot reloading.
Export a .zip folder of your game that can be uploaded to sites like itch.io and newgrounds.com.
Run the linter on your game's source code.
Run the linter on your game's source code and automatically fix some errors.
Remove unneeded chunks from your game's images.
Generate a unique ID for your game. Achievements will not persist across sessions if you don't have an ID. Generating a new ID will cause players to lose their achievement data.
Create an .eslintrc
with the following contents to use this extension.
{
"parserOptions": {
"project": "./src/tsconfig.json"
},
"extends": [
"./node_modules/pixel-pigeon/.eslintrc"
],
"rules": {
"no-restricted-imports": [
"off"
]
}
}
- Follow the "getting started" instructions to create a game somewhere on your PC, e.g.
D:\Code\My-Awesome-Game
. - Clone the framework somewhere on your PC, e.g.
D:\Code\Pigeon-Mode-Game-Framework
. - Inside of the framework directory, run
npm link
. - Inside of the game directory, run
npm ci
. - Inside of the game directory, run
npm link pixel-pigeon
. - You can now run your game like normal with
pigeon dev
. You must manually rerun this every time you make a local change to the framework, as hot reloading only listens for changes to your game's code.