Quick Start
This guide will help you create your first OSC2 scenario from scratch.
Access OSC2 Studio
- Open your browser and visit osc2studio.online
- Click the "Launch Studio →" button on the homepage, or the "Launch Studio" link in the navigation bar
- After entering
/app/, you will see the login page
Login / Register
Register an Account
- Click the "Register" tab
- Enter your email address and password
- 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:
| Area | Function |
|---|---|
| Left Panel | Workspace: manage scenarios and map files |
| Center Area | Editor: write OSC2 code |
| Right Panel | Scenario Preview: 3D visualization |
| Bottom Panel | Problems Panel: show validation errors and warnings |
| Top Toolbar | New, save, validate, preview controls |
Create Your First Scenario
Step 1: Create a New Scenario File
- In the left workspace panel, click the "+ 新建场景" button
- Enter a file name, e.g.
my-first-scenario.osc - 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
- Learn about Workspace Management to organize your files
- Check the Editor Guide for advanced editor features
- Read the API Overview to learn the OSC2 language