inks2d is a free no-dependency Typescript game engine designed for developing 2D games. It provides you with a fast, friendly and clean framework to prototype and develop your games on. This means that most of the hard work is already done, letting you concentrate on the design and testing of your game.
- Features
- Packages
- Installation
- Basic Example
- Support and Resources
- Contributing
- Showcase
- Authors
- License
- API inspired in part by Flash's display list, and should be easy to pick up for JS/TS developers.
- All the most important sprites you need: rectangles, circles, triangles, lines, text and image sprites. You can make any of these sprites with only one line of code. You can also create your own custom sprite types.
- Sound effect support with volume, panning, and fading, complete with one-line sound playback.
- Quick and efficient particle effects and emitters for beautiful particle systems without slowing things down.
- Simple keyboard, mouse and touch input state checking makes setting keys and events incredibly easy, yet powerful.
- Universal asset loader to pre-load images, fonts, sounds and JSON data files. All popular file formats are supported. You can load new assets into the game at any time.
- A lot of helper functions for animations, tilemaps, text, backdrops, and more.
- Tree shaking support.
Package | Version (click for changelogs) |
---|---|
inks2d | |
create-inks2d |
With NPM:
$ npm create inks2d@latest
With Yarn:
$ yarn create inks2d
With PNPM:
$ pnpm create inks2d
Then follow the prompts!
You can also directly specify the project name and the platform you want to use via additional command line options. For example, to scaffold a inks2d + Web project, run:
# npm 6.x
npm create inks2d@latest my-inks2d-game --platform web
# npm 7+, extra double-dash is needed:
npm create inks2d@latest my-inks2d-game -- --platform web
# yarn
yarn create inks2d my-inks2d-game --platform web
# pnpm
pnpm create inks2d my-inks2d-game --platform web
See create-inks2d for more details on each supported platform
import { Engine, Scene } from "inks2d";
import { Rectangle } from "inks2d/geom";
const g = new Engine(640, 480);
class Main extends Scene {
constructor() {
super();
}
async start(e: Engine) {
super.start(e);
const rect = new Rectangle(50, 50, "blue");
rect.position.x = g.stage.width / 2;
rect.position.y = g.stage.height / 2;
g.stage.addChild(rect);
}
}
g.scene = new Main();
g.start();
- Find examples in the examples folder.
- Read the documentation.
- Discuss, share projects, ask technical questions and interact with other users on Discussions.
- Again, have a look at the included examples and API documentation for more in-depth information.
It was built by Phillipe Martins (aka "Inkasa Dev"), and is released for free under the MIT license, which means you can use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a requirement.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Pimi Jumpers | Lolly Balls |
Noah Crush Mania | Shinobi Way | Two Dots | Get the Blacks |
Phillipe Martins |
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details