Skip to content
Bit Quirky Round Trip
Visual Scripting

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.89.0
Menu

Platformer project layout

Find the sample scene, runtime assemblies, rules asset, tests, credits, and local Round Trip graph configuration files.

The sample is small enough to copy ideas from without first decoding a production project. Runtime code sits under one root, pure rules have their own folder, tests have their own assembly, and personal graph arrangement stays under UserSettings, outside version control.

Path What lives there
Assets/Platformer/Scenes/ Platformer.unity, the playable scene.
Assets/Platformer/Runtime/Player/ PlayerController interactions and PlayerMotor movement.
Assets/Platformer/Runtime/Collectibles/ The idempotent Coin.
Assets/Platformer/Runtime/Scoring/ Shared coin and score state.
Assets/Platformer/Runtime/Enemies/ Enemy facade and patrol, plus the state machine.
Assets/Platformer/Runtime/Progression/ The goal Door.
Assets/Platformer/Runtime/Presentation/ HUD and optional audio cues.
Assets/Platformer/Runtime/Config/ LevelRules and EnemyState.
Assets/Platformer/Runtime/Logic/ Pure rules for coin threshold, enemy contact, fall boundary, and restart.
Assets/Platformer/Runtime/Composition/ The explicit scene composition root.
Assets/Platformer/Config/ The serialized LevelRules.asset.
Assets/Platformer/Input/ Input System actions.
Assets/Platformer/UI/ The HUD prefab.
Assets/Tests/EditMode/ Pure-rule and composition diagnostics tests.
Assets/ThirdParty/Kenney/ Vendored art and audio plus the original license.

Assets/Platformer/Runtime/RoundTrip.Platformer.Runtime.asmdef defines RoundTrip.Platformer.Runtime. It references the Round Trip Unity runtime assembly, Input System, and Unity UI.

Assets/Tests/EditMode/RoundTrip.Platformer.Tests.asmdef defines editor-only RoundTrip.Platformer.Tests. It references the runtime assembly, Unity’s test runner assemblies, NUnit, and RoundTrip.Core.dll.

Keeping tests outside the runtime assembly means the playable code does not take a test-framework dependency.

Assets/Platformer/Config/LevelRules.asset stores one LevelRules ScriptableObject. Its public fields are:

Field Default Effect
coinUnlockThreshold 5 Passed to CoinUnlockRule as the requested coin threshold.
coinScoreValue 10 Score awarded per coin.
stompScoreValue 25 Score awarded for a defeated enemy.
moveSpeed 7 Horizontal player speed.
jumpForce 14 Jump vertical velocity.
bounceForce 16 Stomp bounce vertical velocity.
fallRespawnHeight -6 Height at or below which the player respawns.

These values are game data. They are separate from Round Trip project settings and graph preferences.

The project has no shared <Project>/RoundTrip root, so every graph configuration file is local. When you open a method and arrange its canvas, Round Trip writes a .rt.json file under UserSettings/RoundTrip/ that mirrors the source path, for example:

Plain text
UserSettings/RoundTrip/Platformer/Runtime/Collectibles/Coin.rt.json

UserSettings/ is excluded from version control, so these files exist only on the machine that arranged the graphs. They store canvas configuration for the matching source file. They do not contain the game behavior, and deleting them leaves the .cs files unchanged.

The sample uses Kenney’s New Platformer Pack, version 1.1, under Creative Commons Zero 1.0 Universal. The sprites and sounds live under Assets/ThirdParty/Kenney/New Platformer Pack/, with the original License.txt preserved. CC0 does not require attribution, but the project credits Kenney in Assets/CREDITS.md.

Start at Composition/PlatformerComposition.cs to see how references are injected. Move to Player/PlayerController.cs for interactions, then Scoring/ScoreCounter.cs and Enemies/EnemyStateMachine.cs for the two decisions that open the goal and apply enemy state. Finish in Logic/ to see the pure rules those components call.

Full-size image