Skip to content
CW
Navigation

Language

Navigation

Back to Blog
05 Dec 2026 Updated 06 Dec 2026 10 min read 11 Views
King's Valley 1 Level Editor: Build Your Own Pyramid

King's Valley 1 Level Editor: Build Your Own Pyramid

King's Valley 1 (1985) never had a level editor, so I built one: paint rooms, place mummies and gems, check reachability and test-play with F5.

The afternoon I wanted back

In King's Valley II there was a mode I loved more than the game itself: EDIT. I spent whole afternoons building pyramids, testing them, dying in my own traps and starting again. When I finished the King's Valley 1 remake, the next step was obvious. The 1985 cartridge never had an editor, so I gave it one.

Version 0.3.0 of the King's Valley 1 remake is out, and the level editor is the main part of it. You open any of the 15 cartridge pyramids or the 60 pyramids of the 1988 disk, change whatever you like, press F5 and play, with the same rules measured from the cartridge. Escape takes you back to the editor exactly where you were.

Start from any pyramid

The editor opens on the level browser. The cards show each pyramid drawn with the real artwork from your own extraction: every room side by side, with the number of rooms, gems and mummies. The pictures are drawn again at the window's own resolution, so they stay sharp even on a 4K screen.

The level browser with picture cards of the pyramids

The browser: your saved levels first, then GAME PYRAMID 01 onwards. V switches between cards and a list.

Opening one of the game's pyramids always makes a copy. The originals, your cartridge and the extraction cache are never touched. If you prefer to start from scratch, NEW gives you a blank room with a border wall and an entry door.

If the editor closed with unsaved work, it reopens that work the next time. It writes a recovery copy every fifteen seconds while there are changes, and again when the window closes.

The workspace

I used the layout of the King's Valley II editor, which already worked well, and fixed what bothered me there:

  • Toolbar: NEW, OPEN, SAVE, FROM GAME, UNDO and REDO on the left; CHECK and TEST on the right. Below it, the level name with UNSAVED CHANGES or SAVED.
  • Toolbox (left): TERRAIN or OBJECTS, the tile palette at double size or the object list, and the modes SELECT, BRUSH (PLACE for objects), FILL and ERASE.
  • Level view (middle): the room you are editing, as large as the window allows, with GRID, WHOLE and MAP. The level's problems are listed under it, and clicking one takes you to its room and cell.
  • Inspector (right): the selected object or door with its options, a clickable picture of each room, the clipboard and the checks.
  • Status line: the room and cell under the mouse and what is on it: a tile, an object or a door.

A wide window widens the frame, so the panels move to the sides and the level view grows. Every command is a button, and every button also has a key, for anyone who, like me, would rather keep a hand on the keyboard.

Paint the rooms

The left button paints and the right button erases. FILL fills a closed area in one click, like a paint bucket. SELECT with a drag marks a rectangle that you can copy (Ctrl+C) and paste wherever the mouse is (Ctrl+V). A whole stroke, however long, is a single undo step.

Painting the terrain of a room by dragging the mouse

A blank level painted by dragging. The right button erases.

The tiles are the game's own. The editor draws exactly what the game draws, from the same tile table and the same pattern banks. What you see while editing is what you will see when you play.

Place everything

In OBJECTS you place mummies, gems, knives, pickaxes and the exit door. The cartridge also has stairs, and the disk adds the rotating door and the trap wall.

Placing gems, mummies and tools in a room

Gems, mummies, knives, pickaxes, rotating doors and trap walls.

This is where King's Valley II annoyed me the most: once placed, an object could not be moved or changed. Here it can. Click an object and drag it to move it. In the inspector, PREV/NEXT changes its variant: the gem colour, the mummy type (the five personalities from the first post, from the slow white one to the yellow one that runs faster than Vick), the stair direction, or the height and side of a rotating door. A door has its destination and its direction.

The file keeps the original byte of each variant, so nothing is lost when you open, save and open again.

Up to three rooms per pyramid

A pyramid can have more than one room. ADD and REMOVE (or Ctrl+Ins and Ctrl+Del) grow and shrink the level, and the pictures under ROOMS take you to any of them. The cartridge allows up to two rooms, because it stores the room number in a single bit. The disk allows three.

WHOLE (or Z) shows every room side by side in the level view, and you can keep editing there. Painting a corridor that crosses from one room to the next becomes simple. MAP (or M) opens the level map: every room with its gems, mummies and doors. In it, PgUp and PgDn page through the game's pyramids, and Enter opens one as a copy.

Check before you play

CHECK reviews the level and lists the problems, each with its room and cell:

Severity What it finds
Error No door, so the player has no way in
Error A stair that does not reach a floor, or an object outside the map
Error A door that leads to a pyramid that does not exist
Error A tile this edition cannot draw
Warning No gems: the exit opens straight away
Warning Two objects on the same cell
Warning More mummies than any original pyramid uses

Errors block the test. Warnings do not. Saving is always allowed, because unfinished work should never be lost.

Can Vick get there?

The part I enjoyed building the most is REACH HINTS (H). The editor takes the game's own player physics and drives it from every door: walking, falling, jumping and climbing stairs. Any gem it never reaches gets a warning marker.

It is a hint, not a verdict. Digging, knives, mummies, trap walls and rotating doors are not simulated, so a gem behind a wall that the pickaxe can open is reported too. Still, it catches the classic mistake of a gem placed one tile too high, which you only discover after five minutes of testing.

Press F5 and play

TEST (F5) puts the level in the real game, with the rules measured from the cartridge: the same jump, the same mummies, the same knife. Escape or F5 returns to the editor, and so does clearing the pyramid or a Game Over. Undo history, selection and the room you were on are all still there.

Test-playing the level: Vick walks, jumps and collects a gem

Building, pressing F5 and playing. Escape returns to the editor.

F6 is the shortcut I use the most: it starts the test with Vick standing on the cell under the mouse. Testing the end of a long room no longer means walking the whole room. Losing a life restarts at that same spot.

Saved levels also appear in CUSTOM LEVELS in the main menu, where you play them as a game of their own, outside the editor.

Keyboard, mouse or gamepad

Everything works with a gamepad too. The stick or D-pad moves a cell cursor, A uses the tool, B erases, X changes the tool, LB and RB change the tile or the object, LT and RT change room, Y undoes and START tests. The left stick opens the map and the right one switches to the whole level.

The shortcuts I use the most:

Key Action
1 to 5 Paint, erase, place, select, fill
Tab, wheel Next tile or object
, and . Change the variant or the door destination
Ctrl+Z / Ctrl+Y Undo / redo
Ctrl+S / Ctrl+O Save / level browser
Q, E, arrows Previous / next room
Z / M / G Whole level / map / grid
H / N Reach hints / next problem
F5 / F6 Test / test from the cursor
F1 Every key

Escape never quits the game by accident. First it clears the selection, then it returns to the menu, and if there is unsaved work it asks first: S saves, D discards, Escape cancels.

Under the hood

The editor is split in two. KingsValley1.Editor is a library with no graphics: the level document, the tools, undo and redo, the conversion to and from the cartridge format, validation, the reach hints and the file store. KingsValley1.Desktop only draws and turns mouse, keys and gamepad into calls to that library.

That made it possible to test every tool on synthetic stages built in code, with no ROM and no disk: format round-trip and rejection of broken files, conversion, every tool, undo grouping, validation, atomic saving, fill, copy and paste, adding and removing rooms, the blank template and the recovery copy.

Levels are saved as .kv1level, a readable JSON file of at most 1 MiB, written atomically (a temporary file, then a move). It stores the edition (cartridge or disk), the fingerprint of the cartridge whose graphics draw the level, the terrain room by room, the doors and the objects. Unknown fields are rejected, so a typo never disappears silently. The files go to %LOCALAPPDATA%/KingsValley1/Levels/, apart from saves and from the extraction cache.

The King's Valley II editor was the reference, but no code was copied. It taught me what works (versioned JSON, atomic saving, undo per stroke, testing and coming back) and what to avoid: one 2,400-line scene, tools as numbers in a switch, validation that only checked structure, and objects that could not be moved.

A word about sharing

A level copied from an original pyramid carries that pyramid's layout, which is Konami's design. The file says so ("derivedFrom": "cartridge pyramid 03"). Please share only your own pyramids. A level made from scratch is entirely yours.

What is still missing

  • The 1988 disk's own editor. The disk came with an EDIT mode, and it has been found and studied, but the remake does not read its save format yet. That is a separate import path.
  • A shared editor library. History, camera, dialogs and the document envelope can become a Wagenheimer.MsxEditor package shared by King's Valley I and II.
  • Smarter hints. Simulating the pickaxe and the doors would remove the false warnings.

And beyond the editor, the plan for both remakes stays the same: mouse and touch play, where you tap where you want to go, and then a mobile version.

Try it

A ROM you supply yourself is required. The download contains no Konami code, artwork or sound: on first run the game reads your own cartridge or disk image. The code is MIT licensed. King's Valley is © Konami; this is an unofficial, non-commercial fan project. The images in this post were captured from the remake running on an original cartridge and disk.

Tell me

What pyramid would you build first? If you make one you are proud of, send it to me. I want to get stuck in someone else's trap for a change.

The MSX series

Cezar Wagenheimer

Written by

Cezar Wagenheimer

Share this article

Comments

Have a question, or found an issue with the code? Drop a comment below — I read and reply to every one.

Loading comments…

Leave a comment

Keep exploring

Deploy // Reconectando
Reconectando ao Servidor

Uma nova versão do ecossistema está sendo aplicada. A conexão será restabelecida automaticamente em instantes.