Bash.tv → GitHub → itch.io

Fast 2D graphics for browser games with PixiJS (v8). Application setup and resizing, the scene graph (Container, Sprite, Graphics, Text, BitmapText), loading assets and spritesheets with Assets, animated sprites, the ticker and your own fixed-step loop, batching rules for thousands of sprites, ParticleContainer, TilingSprite for parallax, filters and custom shaders, pixel-art settings, input wi...

Download skill (.zip) Files on GitHub

PixiJS game development

Pixi is a renderer, not a game engine: you bring the loop, physics, input and states (the game-scaffolding layout works well with Pixi replacing the canvas drawing). Use Phaser (or Bash’s game-kit-2d) if you want a full framework.

Setup (v8)

import { Application, Assets, Sprite, Container, AnimatedSprite, TextureStyle } from "pixi.js";   // pin the version
TextureStyle.defaultOptions.scaleMode = "nearest";            // pixel art only
const app = new Application();
await app.init({ resizeTo: window, background: "#1d1d2b", antialias: false, autoDensity: true, resolution: Math.min(devicePixelRatio, 2) });
document.body.appendChild(app.canvas);
await Assets.load(["assets/img/atlas.json", "assets/img/bg.png"]);   // spritesheet JSON (TexturePacker) loads its PNG
const world = new Container(); app.stage.addChild(world);
const hero = new AnimatedSprite(Assets.get("assets/img/atlas.json").animations.run);   // tags/animations from the sheet
hero.animationSpeed = 0.2; hero.anchor.set(0.5, 1); hero.play(); world.addChild(hero);

Loop

let acc = 0; const STEP = 1 / 60;
app.ticker.add((t) => {
  acc += Math.min(t.deltaMS / 1000, 0.25);
  while (acc >= STEP) { update(STEP); acc -= STEP; }        // game logic at a fixed step
  syncSprites(acc / STEP);                                 // copy positions (interpolated) to Pixi objects
});

Keep game state in plain objects; Pixi objects just mirror it. That keeps logic testable and swappable.

Speed

Other pieces

Check

Pixi uses WebGL (or WebGPU): verify in the viewer’s preview or check_gpu_render, never in the sandbox browser.