Limn Engine

A zero-config 2D game engine for the browser. One file. No npm. Just creativity.

Welcome to Limn Engine

What is Limn Engine?

Limn Engine is the fourth generation of the TCJSGame project, built by Owolabi Kehinde. Starting as JGame in 2023, it evolved through TCGame and TCJSGame into a complete architectural upgrade.

see more...

It stays true to its roots: no build tools, no complex setup. Just a single epic.js file and your creativity.

A powerful, beginner-friendly JavaScript 2D game engine built on HTML5 Canvas โ€” with component-based architecture, physics, particles, tilemap support, and a dual-canvas rendering pipeline.

๐Ÿ’ก Without an engine: you'd manually draw pixels, handle keyboard events, manage the game loop, and write collision detection. Limn does all of that for you.
FeatureWhat Limn gives you
DisplayCanvas, game loop, keyboard + mouse + touch input
ComponentRect, image, and text objects with built-in physics
CameraFollow, smooth follow, zoom, shake, rotation shake
Particlesemit, burst, emitters, and 6 built-in presets
TileMapGrid-based levels with runtime tile editing
AnimatedSpriteSpritesheet animation with named clips
SoundManagerSFX, music, volume control, mute

Your First Game โ€“ Setup

Create an HTML file, include epic.js, and write the code below. You'll see a red square on a canvas in seconds.

see more...
<!DOCTYPE html>
<html>
<head><title>My Limn Game</title></head>
<body>
<script src="epic.js"></script>
<script>
const display = new Display();
display.perform(); // dual-canvas pipeline ON
display.start(800, 600);

const player = new Component(50, 50, "red", 400, 300, "rect");
display.add(player);

function update(dt) {
    // Game logic goes here โ€” dt = deltaTime
    if (display.keys[39]) player.speedX =  4;
    if (display.keys[37]) player.speedX = -4;
    else player.speedX = 0;
}
</script>
</body>
</html>

โœ… start() creates an 800ร—600 canvas and starts the game loop. The red square appears because display.add(player) tells the engine to draw it every frame.

โš ๏ธ Your Display instance must be assigned to a variable named display โ€” the engine uses this name internally.

Learn the Engine

Limn Engine is structured into four progressive skill levels. Pick yours and start building.

see more...

Head to the Tutorial page to choose your level. If you already know TCJSGame v3 you only need to learn the new features.

For a full API reference, see the Reference page.

LevelWho it's forLink
Level 1First-time game devs โ€” shapes, keys, collisionBeginner โ†’
Level 2Comfortable with JS โ€” physics, camera, tilemapsIntermediate โ†’
Level 3Building full games โ€” particles, scenes, shakesAdvanced โ†’
Level 4Engine internals โ€” perform(), deltaTime, pipelines10x โ†’

Case Study: Space Shooter

Learn how to build a complete arcade space shooter using particles, camera shake, scenes, and deltaTime movement.

see more...

This walkthrough covers: linear gradient background, rocket exhaust particles, enemy spawning arrays, collision + explosions, invincibility frames, bullet limits, and game-over logic.

Read the full case study โ†’  |  Play the live demo โ†’

What's New in v4

see more...
FeatureDescription
Dual-Canvas Rendererperform() activates an offscreen buffer for static objects โ€” massive performance gain
Particle Systememit, burst, emitters + 6 presets: explosion, smoke, sparkle, rain, blood, magic
Camera Shakecamera.shake(x,y) and camera.shakeRotation(angle) โ€” both auto-reset
Circle CollisionenableCircleCollision() + crashWithCircle() for round objects
destroy()Properly removes a Component from the engine's render loop
fixed()Lock a Component to screen position regardless of camera movement
TctxtRich text with background fill, padding, alignment, baseline
AnimatedSpriteNamed animation clips with loop/one-shot control
SoundManagerNamed sounds, music, master/sfx/music volume, mute
Scene systemdisplay.scene โ€” only Components in the active scene render
setImage / setColorSwap a Component between image and rect at runtime
clearMarginControl how much of the canvas is cleared per frame