Your program lives in the Forge up top, and it autosaves as you type, so it is here when you come back. Click a building block on the right and it drops straight into your code, highlighted so you can see where it went, and one Undo takes it back. The reference Forge underneath is a scratchpad: try a recipe or a wild idea there without touching your program. Reset brings back the Hello World starter when you want to begin again. Click a screen and drive with the arrow keys, then Export game.cpp to save a real Locke cartridge: it downloads as an ordinary file you own, so copy it onto a USB stick, plug the stick into a Locke, and the console loads and plays it. No app, no account, no internet.
(0,0) is top-left, x grows right, y grows down. W and H hold 480 and 270.rgb(r, g, b), each 0 to 255. Every pixel is one 0xAARRGGBB value, no palette.update(ctx) runs about 60 times a second and draws the whole frame. init(ctx) runs once at the start, on_exit(ctx) at the end.ctx.dt, the seconds since the last frame. ctx.millis is the time since start.ctx.pad[0] and ctx.pad[1]. Test a button with ctx.pad[0] & LK_PAD_LEFT (also RIGHT, UP, DOWN, A, B, X, Y, START, SELECT).fill, rect, frame, line, circle, pixel, number, text. Each takes ctx first.text(ctx, x, y, "HI", rgb(255,255,255), 3) writes letters and digits. The last number is the size.ctx.sfx(SFX_SCORE) for an effect, ctx.music(MUS_PLAY) for a loop, ctx.music(MUS_NONE) to stop.saveInt(ctx, "best", n) and loadInt(ctx, "best", 0) keep a number through a power-off.