For Creators

Lantern Console
User's Manual

Everything your Lantern Console can do โ€” explained in plain language. Describe what you want, and the AI builds it. This guide helps you know what's possible.

428ร—240
Pixel Resolution
60 FPS
Smooth Motion
256
Color Palette
4P
Multiplayer
01
Getting Started
PAGE 01

Lantern is a retro game console powered by AI. You describe the game you want in plain English, and the AI writes the code for you. You don't need to know how to program โ€” just know what you want to create.

How Your Game Runs

Every Lantern game has a simple rhythm: it sets up once when it starts, then thinks and draws 60 times per second. That's what makes everything feel smooth and responsive.

_init
The setup phase โ€” runs once when your game starts. Loads images, sets starting positions.
_update
The thinking phase โ€” runs 60 times per second. Handles input, movement, collisions.
_draw
The drawing phase โ€” runs after every update. Renders everything you see on screen.

Screen Sizes

You can choose between three screen resolutions. The default "hires" mode is great for most games. Use "lores" for a chunkier pixel-art look, or "720p" for higher detail.

ModeSizeBest For
Hires (default)428 ร— 240Most games โ€” good balance of detail and retro feel
Lores256 ร— 144Extra chunky pixel art, classic retro style
720p / HD1280 ร— 720Higher detail scenes, more screen real estate
HOW TO ASK FOR THIS
"Make the screen lower resolution for a chunkier look" or "Switch to HD mode for more detail"
02
Controls
PAGE 02

Lantern uses an SNES-style controller layout: a d-pad (up, down, left, right) and four action buttons (A, B, C, D). This works on keyboard, gamepads, and touchscreen.

The Controller

ButtonKeyboard (Player 1)Keyboard (Player 2)What It's Usually For
D-padW, A, S, DArrow keysMovement, menu navigation
A buttonVPeriod (.)Jump, confirm, primary action
B buttonBSlash (/)Shoot, cancel, secondary action
C buttonFLSpecial ability, interact
D buttonGSemicolon (;)Inventory, pause

In single-player mode, both keyboard layouts work โ€” you can use WASD or arrow keys interchangeably.

Mouse & Touch

Games can also use pointer input โ€” clicks, taps, and hover position. Great for strategy games, drawing tools, or menus. The terms to know are ptr_click (just tapped), ptr_down (held down), and ptr_pos (where the cursor is).

Custom Controls

You can remap any button to a different key using key_remap. The on-screen labels update automatically to show players the right key.

HOW TO ASK FOR THIS
"Make the jump button also work with spacebar" or "Remap the controls so C and V are the action buttons" or "Add mouse/click support for selecting units"
03
Drawing & Colors
PAGE 03

The Lantern Console draws everything fresh each frame, 60 times per second. Things drawn later appear on top of things drawn earlier โ€” like painting on a canvas, layer by layer.

What You Can Draw

โ– 
Rectangles
Filled or outlined. Use rectfill and rect. Great for health bars, UI panels, platforms.
โ—
Circles
Filled or outlined. Use circfill and circ. Perfect for bullets, explosions, radar pings.
โ•ฑ
Lines
Draw with line. Useful for laser beams, grid lines, trajectories.
ยท
Pixels
Individual dots with pset. Great for stars, snow, particle effects.
A
Text
Use print for text โ€” font size auto-adjusts to your resolution. Supports left, center, and right alignment, plus built-in word wrapping for dialogue and descriptions.

The Color Palette

Lantern has a 256-color palette. Drawing functions use a palette index for color. The default palette uses PICO-8 colors for the first 16, shown below with their names. The full palette includes darker shades, pastels, grayscale ramps, skin tones, metallics, nature tones, neons, earth tones, fantasy hues, and a rainbow gradient โ€” all ready to use by number.

0Black
1Dark Blue
2Dark Purple
3Dark Green
4Brown
5Dark Gray
6Light Gray
7White
8Red
9Orange
10Yellow
11Green
12Blue
13Indigo
14Pink
15Peach
Show full 256-color palette

16โ€“31: Darker Shades

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

32โ€“47: Pastels

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

48โ€“63: Grayscale Ramp

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

64โ€“79: Skin Tones

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

80โ€“95: Metallics

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95

96โ€“127: Nature

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

128โ€“159: Neon / Vibrant

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160โ€“191: Earth Tones & Warm Colors

160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

192โ€“223: Cool Colors & Fantasy

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223

224โ€“255: Rainbow Gradient

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

Custom Colors

You can also change any palette color at runtime using pset_pal โ€” just pick a slot (0โ€“255) and set any RGB color you want. This means you're not locked into the defaults; you can create a completely custom palette for your game.

For sprites and images, you can use the tint option with RGBA values (0โ€“1 each) to modulate colors directly โ€” useful for flashing enemies red on hit, fading sprites, or creating color variations without changing the palette.

HOW TO ASK FOR THIS
"Change the palette to use pastel colors" or "Make color 8 a darker red" or "Create a custom color palette for this game" or "Use the built-in skin tone colors" or "Flash the enemy red when hit"

Word Wrapping & Text Layout

print supports automatic word wrapping โ€” pass a pixel width as the last argument and text will break at word boundaries to fit.

Use text_layout to measure text without drawing it โ€” it returns the wrapped lines and dimensions so you can size a box before rendering. Combined with font_height (which returns the current line height in pixels), this makes dialogue boxes and paginated text easy to build.

HOW TO ASK FOR THIS
"Wrap this dialogue text inside a box" or "Show the item description with word wrapping" or "Add a text box that fits within 200 pixels" or "Make a paginated dialogue system"

Camera & Clipping

The camera controls what part of the world is visible โ€” essential for scrolling games.

clip(x, y, w, h) restricts all drawing to a rectangle โ€” anything outside it is invisible. Useful for minimap windows, split-screen, or HUD panels. Call clip() with no arguments to clear the clip region and draw normally again.

HOW TO ASK FOR THIS
"Add a health bar at the top of the screen" or "Make the camera follow the player" or "Draw the score in the top-right corner, right-aligned"
04
Sprites & Animation
PAGE 04
Asset uploads (PNG sprite sheets) are coming soon to the web editor. For now, the AI can generate placeholder graphics using the built-in drawing tools.

Sprites are the images that make up your game โ€” characters, enemies, items, backgrounds. You load them from PNG files, and the engine handles the rest.

What Sprites Can Do

  • Sprite sheets โ€” a single image containing multiple frames of animation, sliced automatically by the engine using load_image
  • Scale up or down โ€” make sprites bigger or smaller, or flip them horizontally/vertically
  • Rotate โ€” spin sprites around any pivot point
  • Tint & transparency โ€” recolor sprites or make them semi-transparent (great for ghosts, damage flashes, shadows)
  • Sub-regions โ€” draw just a piece of a larger image using draw_region
HOW TO ASK FOR THIS
"Make the player sprite flip when walking left" or "Add a walking animation with 4 frames" or "Flash the enemy red when hit" or "Make the ghost semi-transparent"
05
Tilemaps & Worlds
PAGE 05
Tileset image uploads are coming soon to the web editor. For now, tilemaps can be built procedurally with code-generated tiles.

Tilemaps are how you build levels and game worlds. Instead of placing every pixel by hand, you create a grid and fill it with tiles from a tileset image โ€” like arranging puzzle pieces on a board.

What You Can Build

  • Platformer levels โ€” ground, walls, platforms, hazards, all from a tileset
  • Top-down worlds โ€” RPG overworlds, dungeon rooms, maze games
  • Parallax backgrounds โ€” multiple tilemap layers scrolling at different speeds for depth
  • Tile collision โ€” the engine can check which tile is at any position, so characters interact with the world naturally
tilemap
A grid of tiles that forms a level or background. Created with create_tilemap.
tileset
The image containing all the tile graphics. Each tile gets a number.
scrolling
Moving the view across a tilemap. Used for side-scrollers and exploration games.
parallax
Background layers that scroll slower than the foreground, creating a sense of depth.
HOW TO ASK FOR THIS
"Build a platformer level with ground and platforms" or "Add a scrolling background with parallax" or "Make the player collide with walls and floors"
06
Visual Effects (PostFX)
PAGE 06

PostFX are full-screen visual effects applied on top of your game. They don't change gameplay โ€” they change the mood. You can combine multiple effects, and they're all controlled through postfx.

Available Effects

โœจ
Bloom
Makes bright areas glow and bleed light. Great for neon, magic, and warmth.
๐Ÿ“บ
CRT
Scanlines and RGB pixel mask. Classic retro TV look.
๐ŸŒ€
Warp
Barrel distortion, chromatic aberration, and vignette. CRT-style screen curve.
๐ŸŽจ
Color Grade
Tint, neon, or duotone color styles. Adjust saturation, contrast, brightness.
๐ŸŽž๏ธ
Grain
Animated film grain noise. Adds texture and cinematic atmosphere.
๐Ÿ’จ
Soft Blur
Gaussian blur across the whole screen. Useful for dream sequences or menus.
๐Ÿ”ฅ
Heat Haze
Localized wavy distortion. Perfect near engines, fire, or hot surfaces.
โ˜€๏ธ
God Rays
Volumetric light beams from a point. Dramatic sunlight through trees or windows.
๐Ÿ”ฆ
Spot Light
Circular spotlight with soft edges. Flashlight, interrogation lamp, stage light.
Popular Combinations

Classic Arcade: CRT + Warp โ€” looks like an old cabinet

Synthwave: Bloom + Neon Color Grade โ€” vibrant 80s glow

Cinematic: God Rays + Grain โ€” outdoor drama

Horror: Spot Light + Grain + Soft Blur โ€” dark and uneasy

HOW TO ASK FOR THIS
"Add a CRT scanline effect" or "Make it look like an old TV" or "Add bloom so the explosions glow" or "Put a spotlight on the player in the dark level" or "Add god rays coming from the top-left"
07
Sound & Music
PAGE 07

Lantern has a full audio system โ€” sound effects, multi-channel music with stem mixing, and a built-in chiptune synthesizer for instant retro sounds.

OGG and WAV file uploads are coming soon to the web editor. In the meantime, use the built-in Chiptune Synth for sound effects and music โ€” no files needed!

Sound Effects

Load any OGG or WAV file with load_sound and play it with play_sound. Sounds can play once or loop, and you control the volume. Stop them anytime with stop_sound.

Music with Stems

Music supports 5 separate channels (stems) that play in sync. You can fade individual channels in and out during gameplay โ€” for example, adding drums when the action picks up, or muting everything but the bass when the player enters a cave.

Audio Atmosphere

The audio engine has built-in post-processing presets that change how everything sounds โ€” like putting the whole game underwater, in a cave, or on an old radio. These transition smoothly.

Available Presets

normal underwater cave large_hall small_room outside metal_corridor dream radio telephone 8bit slow_motion danger boss_room victory defeat

You can also fine-tune with custom filters (lowpass, highpass, bandpass, notch) and reverb (room, hall, cave, plate, spring, shimmer).

HOW TO ASK FOR THIS
"Add a jump sound effect" or "Play background music with drums and bass" or "Fade in the drums when the boss appears" or "Make everything sound muffled when the player goes underwater" or "Add a reverb like a big cave"
08
Chiptune Synth (Retro16)
PAGE 08

The built-in Retro16 synthesizer generates chiptune sounds in real-time โ€” no audio files needed. It uses a soundfont-based engine with 8-voice polyphony. Perfect for quick sound effects (bleeps, bloops, fanfares) and even full tracker-style songs.

Quick Sound Effects

Use synth_sfx to play an instant sound that stops on its own โ€” pick an instrument, a note, how long it plays, and volume. Great for jump sounds, coin pickups, menu clicks, and hit effects.

Sustained Notes

Use synth_music_note for notes that play until you stop them โ€” useful for building chords, ambient drones, or musical sequences.

Instruments

Lantern comes with 16 built-in instruments:

Piano
ID: 0
E-Piano
ID: 1
Bass
ID: 2
SynthBass
ID: 3
Lead
ID: 4
Pad
ID: 5
Strings
ID: 6
Brass
ID: 7
Flute
ID: 8
Bell
ID: 9
Organ
ID: 10
Guitar
ID: 11
Synth
ID: 12
Kick Drum
ID: 20
Snare
ID: 21
Hi-Hat
ID: 22

Tracker Songs (MTS Format)

The synth can play full songs written in MTS (Music Tracker Song) format โ€” a compact text-based format where notes are arranged in patterns, like a spreadsheet of music. The AI can write these for you.

An MTS song has three parts:

  • Song header โ€” name, tempo (BPM), and speed
  • Patterns โ€” rows of notes using named instruments (like Piano, Kick, Lead) with volume and effects
  • Sequence โ€” the order patterns play in (you can repeat patterns to build full songs from short loops)
HOW TO ASK THE AI FOR SONGS
"Write a chiptune song with a catchy melody using Piano and Bass" or "Make a 120 BPM battle theme with drums and lead" or "Create a short looping song for the title screen โ€” something cheerful with Bell and Strings"
HOW TO ASK FOR THIS
"Add a coin pickup sound โ€” something bright like a bell" or "Play a low bass thump when the player lands" or "Use the synth for all the sound effects instead of audio files" or "Write a catchy chiptune loop for the title screen"
09
Math & Randomness
PAGE 09

The engine includes built-in math helpers that the AI uses behind the scenes. Knowing what's available helps you describe what you want more precisely.

Randomness

There are two kinds of random numbers:

  • Gameplay random (sync_rnd) โ€” affects game logic like enemy spawning, loot drops, damage. These stay consistent in multiplayer.
  • Visual random (vrnd) โ€” for effects like particle direction, screen shake, sparkles. Doesn't affect gameplay.

Common Math Concepts

lerp
Smooth blending between two values. Makes cameras follow smoothly, health bars drain gradually.
clamp
Keeps a value within bounds. Prevents the player from leaving the screen, health from going below 0.
sin / cos
Trigonometry for circular motion, waves, orbiting, and pulsing effects.
atan2
Calculates the angle between two points. Used for aiming, enemies tracking the player.
HOW TO ASK FOR THIS
"Make the camera smoothly follow the player" or "Keep the player inside the screen boundaries" or "Make the enemies aim at the player" or "Add a bobbing/floating animation to the collectibles"
10
Saving Progress
PAGE 10

Games can save and load data that persists between play sessions using dset (save) and dget (load). This works for high scores, unlocked levels, player preferences, or anything else you want to remember.

  • Save numbers, text, tables, or true/false values
  • Data survives closing and reopening the game
  • Each game has its own separate save data

Where Data Is Stored

PlatformLocation
Web (browser)Browser localStorage โ€” stays on the device, in the browser
Desktop appLocal files on your computer (in your app data folder)
HOW TO ASK FOR THIS
"Save the high score so it persists between sessions" or "Remember which levels the player has beaten" or "Save the player's chosen difficulty setting"
11
Leaderboards
PAGE 11

Lantern has built-in online leaderboards. Players can submit_score and see how they rank against others with get_leaderboard. Scores are tied to their account โ€” players sign in with their Discord account to submit and track scores.

What You Can Do

  • Submit scores โ€” the server only keeps each player's best score per board
  • Multiple boards โ€” have separate leaderboards for different things (e.g., "score", "speedrun", "kills")
  • Attach metadata โ€” store extra info with each score like which character they used or what level they reached
  • Show personal best โ€” check the current player's own rank with get_my_score
HOW TO ASK FOR THIS
"Add a leaderboard on the game over screen" or "Submit the player's score when they die" or "Show the top 10 high scores" or "Add a separate speedrun leaderboard"
12
Multiplayer (Netplay)
PAGE 12

Lantern supports up to 4 players playing together online with rollback netcode โ€” the same technology used in modern fighting games. Input is synchronized automatically.

How It Works

For multiplayer to work smoothly, the game must be deterministic โ€” given the same inputs, it must produce the same result on every player's machine. The engine handles this automatically if you follow a few guidelines:

  • Keep all important game data in the GameState table โ€” this gets synced between players
  • Keep visual-only stuff (particles, screen shake, animations) in a separate VisualState โ€” this doesn't need to match
  • The AI knows these rules and will organize your code correctly

What to Know

Synced (GameState)Not Synced (VisualState)
Player positions, health, scoresParticle effects, sparkles
Enemy positions and AI decisionsCamera shake, screen flash
Turn order, game phaseScore counter animation
Board/grid dataBackground animations
HOW TO ASK FOR THIS
"Make this game support 2-player online multiplayer" or "Add a 4-player mode" or "Highlight which player I am in netplay" or "Make sure the particles don't cause desync"
13
Organizing Your Game
PAGE 13

As your game grows, the AI will automatically split the code into separate files to keep things organized. Each file handles one part of the game โ€” player logic, enemies, levels, UI, etc.

Typical Game Structure

main.lua
The entry point. Calls into all the other files. Contains _init, _update, _draw.
player.lua
Everything about the player โ€” movement, jumping, attacking, animation.
enemies.lua
Enemy types, AI behavior, spawning patterns.
level.lua
Level loading, tile setup, collision maps.
ui.lua
HUD, menus, score display, dialog boxes.
constants.lua
Shared values like speeds, colors, sizes โ€” easy to tweak.

You don't need to worry about this โ€” the AI handles file organization. But if you want to look at the code, this is how it's structured. Files are linked together using require.

HOW TO ASK FOR THIS
"Split this into separate files, it's getting long" or "Put all the enemy stuff in its own file" or "Can you organize the code better?"
14
Game Feel & Polish
PAGE 14

"Juice" is the magic that makes a game feel good. It's the screen shake when something explodes, the satisfying sound when you collect a coin, the way a character squashes when they land. None of it changes the game's rules โ€” but it makes everything 10x more fun.

The Juice Techniques

Smooth Movement
Characters accelerate and decelerate instead of starting and stopping instantly.
Squash & Stretch
Sprites squish flat on landing and stretch tall on jumping. Makes characters feel alive.
Screen Shake
Brief camera vibration on explosions and impacts. Just a few pixels, decaying quickly.
Particles Everywhere
Dust when running, sparks on collision, confetti on victory, smoke trails on projectiles.
Sound on Every Action
Jump, land, hit, pick up, confirm, die โ€” every action gets a sound. Low-pitched for heavy, high for light.
Flash & Freeze
Flash sprites white when hit. Freeze for 2โ€“3 frames on big impacts. Makes hits feel powerful.
Animated UI
Score numbers count up smoothly. Menus slide in. Nothing should hard-cut.
Visual Effects for Mood
Bloom for warmth, CRT for retro, grain for atmosphere, god rays for drama.
HOW TO ASK FOR THIS
"Make it juicier" or "Add screen shake when things explode" or "Make the coins feel more satisfying to collect" or "Add particles when the player runs" or "The hits don't feel impactful enough"
๐Ÿฎ LANTERN
© 2026 Lantern House Inc.