Skip to main content

Quick Start

This guide will help you create your first OSC2 scenario from scratch.

Access OSC2 Studio

  1. Open your browser and visit osc2studio.online
  2. Click the "Launch Studio →" button on the homepage, or the "Launch Studio" link in the navigation bar
  3. After entering /app/, you will see the login page

Login / Register

Register an Account

  1. Click the "Register" tab
  2. Enter your email address and password
  3. Click the register button to complete registration and automatically log in

Guest Login

  • Click the "Guest Login" button to try the editor without registering
  • Some features are limited in guest mode (cannot save to cloud)

Interface Overview

After logging in, the editor interface is divided into the following areas:

AreaFunction
Left PanelWorkspace: manage scenarios and map files
Center AreaEditor: write OSC2 code
Right PanelScenario Preview: 3D visualization
Bottom PanelProblems Panel: show validation errors and warnings
Top ToolbarNew, save, validate, preview controls

Create Your First Scenario

Step 1: Create a New Scenario File

  1. In the left workspace panel, click the "+ 新建场景" button
  2. Enter a file name, e.g. my-first-scenario.osc
  3. Click confirm, the file will appear in the workspace list

Step 2: Write Scenario Code

Double-click to open my-first-scenario.osc, and enter the following code in the editor:

import std.base

scenario my_first_scenario:
do serial:
car: vehicle with:
speed: 36 km/h
position: lane at(1, 0, 0) of Road_0

The editor will automatically highlight syntax keywords and provide code completion suggestions.

Step 3: Validate the Scenario

Click the "验证" button on the toolbar (or press Ctrl+Shift+V). The validation result will appear in the bottom problems panel. If the code is correct, "验证通过" will be displayed.

Step 4: Preview the Scenario

Click the "预览" button, and the right panel will load the 3D scene. You can use the playback controls to play, pause, and replay the scenario.

Next Steps