Level Editing

back to home page

Table of Contents

Intro

The Construct is your hub for creating your own levels for Diora! Enter the construct and interact with the blueprint table to get started.

Editor

UI Layout

The editor was designed to make level editing as easy as possible. All campaign levels were made using the level editor!

Selected block

Cursor position

D-Pad hint

Crank hint

Controls While Not Holding

Place currently selected block

Rotate level

Move cursor horizontally

Controls While Holding

Erase hovered block

Change selected block

Move cursor vertically

Rotate cursor

Use these menus to manage your level and project.

Test Level

Test your level! Press to get back to the editor.

Save / Quit

Manage your level, and exit back to the project menu. You can delete projects and levels here as well.

Editor Settings

Change settings such as the amount the cursor moves.

Level Settings

Change settings such as the music and background of the level.

Block Library

Browse and load blocks to use in the level.

Block Inspector

Hover the cursor over a block and inspect its values. You can edit some values as well.

Edit Connections

Hover the cursor over a block and edit its connections.

Connections

The connections menu is used to link blocks together.

Connections are usually linked opposite to the flow, this is because most blocks with connections are 'listening' for the button's state to change.

Advanced Editing

While you can make plenty of levels on the Playdate, you can take advantage of advanced tools using a computer!

Commands

The Commands System is used to handle complex logic behind dialogue, triggers, and editor tools. Click the examples to copy to the clipboard.

These two groups of commands are actually interchangeable! Switch # for !msg, and vice versa. This can be used to do some very complex effects!

Dialogue Commands

These commands are used in dialogue and triggers. Useful for for cutscenes and world building

Command

Args

Example

Description

dialogue

Hello World!

Base dialogue, no #. Cannot be used in triggers.

comment

#-- print Hello World!

Its a comment, pretty self explanatory.

print

message

#print Hello World!

Prints the message. Can be used to debug and label branches.

character

name

#character diora

Changes Bebe and Icon to match a character file.

icon

name

#icon diora

Changes Icon.

bebe

name

#bebe diora

Changes Bebe.

setat

type name value x y z

#setat bool active false 1 2 3

Sets the variable of the block at the xyz.

setself

type name value

#setself number tr 45

Sets the variable of the block that owns the dialogue.

setplayer

type name value

#setplayer number tr 180

Sets the variable of the player.

set

type name value

#set number playermovespeed 1

Sets the global variable. Can be unstable!

call

name

#call

Calls the global function. Can be unstable!

interactat

x y z

#interactat 1 2 3

Interacts with block at the xyz.

lockinput

value

#lockinput true

Locks/Unlocks player input. Good for cutscenes.

destroy

#destroy

Destroys the block that owns the dialogue.

destroyat

x y z

#destroyat 1 2 3

Destroys the block at xyz.

cam

angle z time

#cam 90 1 2

Starts a camera animation. Can also be 'end' to return control to the player. Good for cutscenes.

sound

name

#sound explosion

Plays the sound effect.

win

delay

#win 2

Diora is win! :) Pauses for effect. Delay value is optional.

kill

delay

#kill 2

Diora is kil. :( Pauses for effect. Delay value is optional.

video

name

#video intro

Plays a video.

wait

seconds

#wait 4.5

Pauses the commands the defined amount of seconds. Triggers only.

branch

dialogue

#branch tip1 tip2 tip3

Picks a random dialogue from the list and continues. Does not need more than one file.

setlore

name value

#setlore spoketodave true

Sets lore value. Lore is used to handle story progression.

branchlore

name dialogue

#branchlore spoketodave reward

Branches to another dialogue only if the lore is true.

gointo

name

#gointo room

Brings player into the level. Like going through a door.

Editor Tool Commands

These commands are used to complete tedious tasks in the editor. They are a must have when making a large level! Use the commands in the Playdate Simulator Console.

Command

Args

Example

Description

export

!msg export

Prints the level .json in the console.

loadblock

name

!msg loadblock ladder

Loads the block. Required for custom blocks.

music

name

!msg music bauhaus_groove

Changes the level music. Can also be 'none' for no music. Required for custom music.

background

name

!msg background construct

Changes the level background. Can also be 'void' for no background. Required for custom backgrounds.

blockdata

name

!msg blockdata ladder

Prints the block data .json to the console. Useful for making custom blocks.

demos

!msg demos

Print the demo list.

demo

name

!msg demo push

Start a demo on the demo list.

offsetblocks

x y z

!msg offsetblocks 0 0 1

Offsets all blocks in the scene.

offsetwhere

exp x y z

!msg offsetwhere y_==_0 0 0 1

Offsets all blocks that satisfy the expression.

deletewhere

exp

!msg deletewhere x_<_0

Deletes all blocks that satisfy the expression.

Custom Assets

Example Project

Custom levels support many types of custom assets, this section will cover how to create your own assets! The example project can be used to understand the file structure and features of custom assets.

Download example project

Most custom assets require knowledge of Blender (3.6) and the Playdate SDK.

Blender 3.6 Playdate SDK

Blocks

Download the template files here.

Download block template Download character template

After customizing the block, render the frames out to a folder. Use the dither tool to convert to a single large image containing all of the dithered frames.

Dither Tool

Use the Playdate SDK to build the image table to a .pdt, and place it into the blocks folder in your project. The character file will have an extra frame for the dialogue icon. Dither and build it as a separate .pdi.

By naming the custom block the same name as an existing block, you can replace the graphics of that block in the project. This could be used to create a unique art style, or replace Diora with a new character.

Some blocks may need custom functionality, this can be achieved with a block data file. Use the editor command !msg blockdata NAME to see that block's data. See the example project for the example block data file.

Use the editor command !msg loadblock NAME to load the block.

Backgrounds

Download the template file here.

Download background template

After customizing the background, render the frames out to a folder. Use the dither tool to convert to a single large image containing all of the dithered frames.

Dither Tool

Use the Playdate SDK to build the image table to a .pdt, and place it into the backgrounds folder in your project.

Use the editor command !msg background NAME to load the background.

Music

Custom music can be used, convert to ADPCM WAV. Build to a .pda using the Playdate SDK. Music looping can be defined using a descriptor txt with the same name as the wav. The txt contains the decimal seconds into the song where the music should resume at when it reaches the end. See example project for the formatting of the descriptor.

Use the editor command !msg music NAME to load the music.

Icons

You can use custom images as your project and level icons! Create a custom icon at (200x240) Build to a .pdi using the Playdate SDK. See the Example project for the location of these icons.

Metadata

You can use the lock and desc files to supply optional metadata about the project. Use desc.txt to show a simple message about your project in the menu. Use lock.txt to prevent editing the level without first removing the file. Consider doing this before sharing your level for a more polished experience.

Block Demos

Unsure of how to use a certain block? There is a large list of demo levels that show exactly how to set up a block to work correctly. They can also be used for inspiration!

Use the editor command !msg demos to print the demo list.

Use the editor command !msg demo NAME to start a demo. This can be done from the map or inside the construct.