Skip to main content

Your First Project: Two-Room Relay

Welcome to the first-project tutorial. You will start from an empty Polygon Engine project and finish with a small PlayStation 1 game that can run in Play Mode and DuckStation.

The game has a deliberately small objective: walk through the first room, cross a trigger to open a door, enter the second room, and persist the door and checkpoint state to a memory card. A compact HUD provides save and reset buttons, a status message, an imported image, and audio feedback.

This is a learning recipe and a checklist for a release-flow smoke test. Every chapter ends with a checkpoint that tells you exactly what should work before you move on.

What You Will Build

First Person Player
|
v
Room A ---- Door Trigger ---- Door ---- Room B
|
+-- Lua controller
+-- Audio Source
+-- PlayerPrefs / Memory Card
+-- HUD status and buttons

The finished project exercises the main production path without requiring a large level or complicated art.

FeatureWhat the tutorial validates
Project HubCreate a project outside the engine installation
Scenes and HierarchyCreate, name, duplicate, position, and save GameObjects
Native player stackFirst-person movement, collision, camera, and controller input
Level BuilderAuthor one reusable PS1 mesh and place it into a scene
ComponentsMesh Renderer, Collider, Lua Behaviour, Audio Source, and player Components
LuaPascalCase lifecycle callbacks, trigger events, exposed Inspector properties, and runtime APIs
UI CanvasPanel, Text, Image, Button, focus, and Lua callbacks
Asset pipelineImport a PS1 texture and resident WAV sound
PersistenceSave, load, reset, and flush a one-block Memory Card file with PlayerPrefs
PS1 workflowValidate, inspect budgets, run Production Acceptance, and build a CUE
Emulator testingRun with a controller in DuckStation

Advanced systems such as third-person cameras, animation graphs, imported 3D characters, particles, and streaming CD-XA music are intentionally outside the main path. The final chapter points to those extensions after the basic game is stable.

Time and Prerequisites

Allow 45-75 minutes for a first pass.

Before starting:

  • install and launch Polygon Engine;
  • complete the first-run Setup Wizard;
  • connect a controller if you want to validate input during Play Mode;
  • configure DuckStation before the final chapter;
  • keep the Project, Hierarchy, Inspector, Scene, Game, Problems, and Console panels available.

You do not need prior Lua experience. The complete script is provided and each part is explained where it is used.

Tutorial Assets

Two small media assets and the complete Lua script are provided so the tutorial is reproducible:

Use the Lua file in chapter 3 and import the image and sound in chapter 4.

Completed Reference Project

Download the completed Two-Room Relay project (SHA-256 checksum).

Extract the entire ZIP to a writable folder outside the engine installation. In Project Hub, choose Open Project, select the extracted Two Room Relay folder, and open Scenes/scene_main.json. Use Polygon Engine 0.1.0-ea.2 with the Two-Room Relay workflow fixes. The download includes the scene, script, materials, source assets and imported resources. Configure your tools and generate your own build by following Test and Build.

Use this project to compare object names, component assignments and Inspector values with your work. To practice the whole authoring workflow, continue with an empty project and follow the chapters in order.

Working Rule

Save with Ctrl+S after every checkpoint. If a step does not produce the expected result, stop and fix it before adding another system. This keeps level, script, UI, and build problems separate.

Start with Create the Project and Player.