Fork me on GitHub

Flying through stars

Draw a starfield with parallax stars

Draw animated anime speed lines, moving across or focused on a point

Draw a horizontal gradient in the background

Draw a sector of a circle using a fan of triangles

Shake the screen

Change the color of the screen border

How to scale a sprite

How to rotate a sprite

Draw an arbitrary image, compressed with run-length encoding

Print text with alignment options

Set palette color to another

Sprite (AABB) overlap

Load palette from a string

Draw an arm with an elbow joint that bends realistically, given hand and shoulder positions

Tile/grid based movement and collision

Change screen offset in every scanline

Control a virtual mouse using mouse, keyboard or gamepad

game screens a.k.a. state, timed screens

Scrolling sprite animation effect using clip

detect overlaps between two circles (or a point)

Draw text using a chunky font

clickable checkbox UI element with label

juicy sprite animations using the 12 principles of animation

clickable button UI element with label

Shoot-em-up, bullets and overlap