Skip to content

a simple 2D typescript game library that uses canvas for html5 games, has gamepad support you can save/load game data and it can help you to create simple/small games or prototypes.

License

Notifications You must be signed in to change notification settings

bitlesstec/illusionts

Repository files navigation

IllusionTS

Typescript 2D canvas game library

how to install

npm install illusionts

repository

  • gitlab https://gitlab.com/pavul/illusionts
  • github https://github.com/bitlesstec/illusionts

Branches Content

  • master this is the most stable copy of the library ready to use
  • develop this is my development branch use it under your own risk

Youtube Channel

how to use it

  • put this code in your index.ts:
 import { Game } from "illusionts";
 import Level1 from "./Level1";
 const game:Game = Game.getInstance("canvas", 640, 480);
    game.loadLevel( new Level1() )
    window.onload =function(){ game.run(); } 
  • then in you can create your level like:
import { BaseLevel } from "illusionts"
export default class Level1 extends BaseLevel
{
    constructor(){ super(640, 480) }
    render(ctx: CanvasRenderingContext2D): void 
    {
        ctx.fillStyle = "#000"
        ctx.fillRect( 0,0, 640, 480)
        ctx.fillStyle = "#FFF"
        ctx.fillText(" HI FROM ILLUSIONTS...", 20, 20)
    }
}

About

a simple 2D typescript game library that uses canvas for html5 games, has gamepad support you can save/load game data and it can help you to create simple/small games or prototypes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages