Skip to main content

5. Test and Build

The project is feature-complete. This chapter turns it into a repeatable acceptance test and then produces the PS1 disc image.

Save and Configure the Build

  1. Press Ctrl+S.
  2. Open Build > Build Settings....
  3. Add Scenes/scene_main.json to Scenes In Build if it is not already present.
  4. Set it as the Startup Scene.
  5. Save the build settings.

This tutorial uses one scene, so any other startup path is an error.

Run the Editor Acceptance Pass

Run these commands in order:

  1. Build > Validate Project
  2. Build > Show PS1 Budget
  3. Build > Run Production Acceptance

Do not ignore hard errors. For this project, check especially:

  • exactly one enabled player controller and one default Spawn Point;
  • an enabled playable camera;
  • Colliders on every Level Builder room piece;
  • Door Trigger marked as a trigger;
  • exact, unique Player Name and Door Name script properties;
  • imported texture and audio GUIDs;
  • valid UI button target functions;
  • a unique memory-card file ID;
  • no VRAM, SPU RAM, packet, Lua, or runtime-memory overflow.

Complete Play Mode Matrix

Use this table as a regression checklist whenever Polygon Engine changes.

TestExpected result
Start Play ModePlayer spawns in Room A at the correct height
Left stick / D-PadPlayer moves and collides with floor and walls
Right stickFirst-person camera looks around on an analog controller
Approach geometryWalls remain visible without overlapping faces or severe seams
Enter Door TriggerDoor disappears, sound plays, and status confirms save
Walk into Room BPlayer passes through the opened doorway
Press SquareSaved player position is restored
Submit Save ButtonButton callback saves and plays audio
Submit Reset ButtonTutorial keys are saved as cleared, player returns to Room A, and door closes
Stop and restart Play ModeEditor save mirror restores the expected state

If a failure appears here but not in the PS1 build, report it as an editor Play Mode preview mismatch. If it appears only in DuckStation, keep the generated build logs and check PS1 budgets and controller configuration first.

Build and Run in DuckStation

Configure DuckStation before launching:

  1. Map Port 1 to an Analog Controller / DualShock.
  2. Enable automatic analog mode, or press the mapped Analog/Guide button after boot if the pad starts in digital mode.
  3. Attach a formatted memory card to Port 1.

If you use a keyboard, open Settings > Controllers in DuckStation, select Controller Port 1, then choose Automatic Mapping > Keyboard. The default mapping uses WASD for the left stick, TFGH for the right stick, K for Cross, J for Square and the arrow keys for the D-Pad. These are DuckStation bindings; the editor has its own keyboard controls.

Automatic Mapping does not necessarily assign the Analog mode button. Click that binding and assign an unused key such as P. Close the controller settings, relaunch the CUE if you changed bindings while the game was running, and press P after boot if the right stick does not respond. With the runtime overlay enabled, analog:1 confirms analog input; analog:0 means digital mode. For a physical controller, select its detected device and assign its Analog mode button as needed.

Check that audio is not muted in the emulator. Set Settings > Graphics > Display > Crop Mode to None when checking the complete 320 x 240 canvas, including the buttons near the bottom edge. The screenshot below uses a 1920 x 1080 window; the game keeps its original aspect ratio.

Before rebuilding, close the running DuckStation game so it releases the disc image. Otherwise Windows can prevent the packager from replacing files.

Then select Build > Build & Run PS1. Polygon Engine validates, cooks, packages, and opens the generated CUE. If automatic launch is unavailable, use Build PS1 (Release) and open:

Build/ps1/package/TWO_ROOM_RELAY.cue

Open the CUE, not the ISO, so the emulator uses the packaged disc layout.

The packaged Two-Room Relay running in DuckStation, with the door closed and the complete HUD visible.

After Reset, the player is back in Room A and the door is closed. The exported badge, status text, controls and both buttons are visible. The camera is tilted toward the floor to show the room and HUD together.

Open the image to view it at full size.

On each exported-game start, expect the Polygon Engine logo on black for four seconds, with a fade in and fade out, before the tutorial loads. The logo is mandatory and does not appear during editor Play Mode. It should not repeat when the game changes scenes.

Keep optional disc boot data empty for the default tutorial build. If your target loader requires your own authorized data, configure it separately as described in BIOS, Disc Boot Data, and Startup Splash. Never select a BIOS in the engine's disc boot data field.

Check the Game Frame Rate

Use the runtime overlay while walking through both rooms and looking along walls. DuckStation's Video: 60 FPS (100%) shows the NTSC output rate and emulation speed; it does not mean the game updates at 60 FPS. Check its Game counter and the runtime's VSync intervals. A frame spanning four NTSC VSyncs is approximately 15 FPS.

The budget check establishes that the content fits. It does not guarantee a target frame rate. Close views with extensive clipping and controller collision work can be more expensive than the scene's triangle count suggests.

Validate the Real Memory-Card Cycle

Editor Play Mode uses a JSON mirror; this pass exercises the PS1 save format inside DuckStation. It does not validate a physical memory card or power loss.

  1. Use Reset Button to start from a closed door.
  2. Walk into the trigger and wait for DOOR OPEN - CHECKPOINT SAVED.
  3. Reset or power-cycle the emulated console.
  4. Boot the same CUE with the same Port 1 card attached.
  5. Confirm the door starts open.
  6. Press Square and confirm the saved position loads.
  7. Use Reset Button, reboot again, and confirm the door starts closed.

Do not remove the memory card or close the emulator while a write is in progress.

Common Failures

SymptomCheck
Player falls through the floorFloor Collider exists, is not a trigger, and matches the scaled mesh
Door never opensTrigger size/position, Is Trigger, Player Name, and OnTriggerEnter
Door draws over a wallDoor is inside the doorway rather than coplanar with a divider piece
Button does nothingInteractable, Target Entity Door Trigger, and exact function name
Audio does not playAudio Source clip, Play On Start disabled, resident VAG import, SPU budget
SAVE FAILEDPort 1 card availability, file ID, entry lengths, and SaveData.GetLastError()
Right stick does nothingDuckStation pad type and analog mode
Build cannot packageClose DuckStation if the package is locked; otherwise check Setup Wizard tool status and mkpsxiso path

Where to Go Next

You now have a minimal vertical slice rather than an isolated feature demo. Extend it one system at a time:

Keep the final matrix as a small acceptance project for future engine releases.

Failure and retry matrix

Use View > Save Data Simulator on a disposable tutorial copy. Restore Failure Simulation: None after each test.

TestRequired result
Card absent/full while entering the triggerDoor opens for gameplay; status says SAVE FAILED; saved preferences are not replaced with a partial checkpoint
Restore card availability, submit SaveCurrent position and open door persist; reboot/restart and load to confirm
Corrupt/absent card while pressing SquareLOAD FAILED; player position and door state stay unchanged
Card full while submitting ResetRESET FAILED; player and door stay unchanged; previous tutorial preferences remain available
Restore card availability, retry ResetPROGRESS RESET; player returns to Room A and door closes; reboot confirms reset
Save before opening the doorClosed-door checkpoint loads as closed; later successful trigger save records open
Missing/renamed Player or DoorSetup error identifies the name binding; no save operation is treated as successful

Repeat normal save, load, reset, and retry flows in the packaged game. The Save Data Simulator helps you test failure messages while developing; also test your final game on its target hardware.