Adrenaline Icon

TrackLang: Getting Started

TrackLang is Adrenaline's declarative language for defining motocross tracks in code. Build tracks entirely in your browser using the Track Developer—a live code editor with real-time 3D visualization. Create tracks from scratch or start with templates, version them like Git, and share publicly for others to fork and improve. Welcome to the future of track development!

What is TrackLang?

TrackLang is a domain-specific language designed specifically for defining motocross tracks. Instead of manually drawing tracks on a map, you write code that describes the track's layout, timing zones, cameras, and more. Adrenaline then renders this as a 3D track that works with automated timing and AI Vision.

Why TrackLang?

  • Precision: Define exact location, offset, heading, tilt, fov, height, and timing zones, and camera positions
  • Versioning: Git-like version control for tracks—fork, modify, and iterate
  • Sharing: Publish tracks for others to use and improve
  • Visualization: See your track in real-time 3D as you code
  • No installation: Everything runs in your browser with the Track Developer
  • Templates: Start from pre-built common track styles

Accessing the Track Developer

Opening Track Developer

  1. Navigate to your track list or create a new track
  2. Click "Edit Track" to enter edit mode
  3. Click "Track Developer" button to open the code editor
  4. Track Developer opens with source code window + 3D track view

Track Developer Interface

The Track Developer interface has two main areas:

  • Code Editor (left/top): Write TrackLang code with syntax highlighting and autocomplete
  • 3D Preview (right/bottom): Live 3D visualization of your track—updates as you code
  • Toolbar: Run, Save, Version controls, and settings
  • Console: Errors, warnings, and build output

Creating Your First Track

Option 1: Start from Template

The easiest way to get started:

  1. In Track Developer, click "Templates" or "New from Template"
  2. Browse pre-fab templates for common track styles (outdoor MX, supercross, flat track, etc.)
  3. Select a template that matches your desired track style
  4. Template code loads into editor with 3D preview
  5. Modify the template to fit your actual track layout

Templates include all necessary structure—start/finish, timing zones, basic geometry. Just customize GPS coordinates if required or use a virtual space without GPS.

Option 2: Start from Scratch

For experienced users or unique track layouts:

  1. Open Track Developer with a blank track
  2. Define basic track structure (name, location, discipline)
  3. Define first section of track (turn, jump, slope, etc.)
  4. Define any subsequent sections of track (turn, jump, slope, etc.)
  5. If creating a circuit track, define a junction to connect the first and last section of track
  6. If using a pit lane, starting chute or an exit be sure to defin junctions appropriately to enter and exit the track
  7. Add timing zones for lap detection
  8. Configure cameras (optional)
  9. Preview in 3D to verify layout

Running and Saving Your Track

Running Code (Build Version)

Click "Run" to execute TrackLang code. This creates a build version—a snapshot of the track at this moment. Every run creates a new build version, preserving history even if you make mistakes.

Saving to New Version

Click "Save New Version" to create a named version (e.g., v1.0, v2.0, "Spring 2025 Layout"). Versions can be marked public or private. Public versions are duplicatable and forkable by others.

Public vs. Private Versions

  • Public: Visible in track library, others can duplicate/fork, used for public events
  • Private: Only you (and team members) can see/use, good for testing or proprietary layouts

Version Control: Git-Like System

Adrenaline uses a Git-like repository system behind the scenes. This enables full track development in the browser with version history, branching, and team collaboration.

Version History

Every saved version is preserved:

  • View all versions in track history panel
  • Compare versions side-by-side
  • Revert to previous version if needed
  • See who made changes and when (for team tracks)

Forking Tracks

"Forking" creates a new track based on an existing one:

  1. Find a public track you like (yours or someone else's)
  2. Click "Fork" to create a copy under your account
  3. Modify the fork as needed (change layout, camera positions, etc.)
  4. Save as your own version
  5. Use for events or make public for others to fork

Team Collaboration

Multiple developers can work on the same track:

  • Invite team members to a track (share permissions)
  • Team members can edit, run, and save versions
  • Version history shows who made each change
  • Merge conflicts handled automatically (last save wins, but history preserved)

Example Workflow: Track Evolution

Real-World Track Development

  1. Create initial track: Use template or build from scratch, save as v1.0 (public)
  2. Run Event #1: Host an event using v1.0. Riders and organizers provide feedback.
  3. Identify improvements: Realize finish line camera angle is off, timing zone too wide, want to add checkpoint.
  4. Fork to v1.1: Click "Fork" on v1.0, make changes, save as v1.1 (public).
  5. Run Event #2: Use v1.1 for the next event. Much better results!
  6. Continue iterating: Fork again for v1.2, v2.0, seasonal layouts, etc.
  7. Share improvements: Other promoters fork your v1.1 for their tracks.

Key insight: Never lose previous versions. If v2.0 has issues, instantly revert to v1.1 for the next event. Version history is your safety net.

3D and Isometric Visualization

All TrackLang tracks are displayed in 3D or isometric 2D throughout the Adrenaline app—not just in Track Developer.

Where Tracks Appear

  • Track Developer: Live 3D view as you code
  • Event pages: 3D track map for riders and spectators
  • Track library: Isometric 2D previews of all tracks
  • Race Control: Live 3D track with rider positions during races
  • Results pages: Track layout context for race finishes

Rendering Modes

  • 3D: Full 3D view with terrain elevation, obstacles, and camera perspective
  • Isometric 2D: Flat, overhead view—easier to see full layout at a glance
  • Satellite overlay: Track path overlaid on satellite imagery (if GPS geofence is used)

Pre-Fab Templates

Start with pre-built templates for common track styles. These provide a solid starting point and teach TrackLang structure.

Available Template Styles

  • Outdoor Motocross (MX): Natural terrain track with elevation changes
  • Supercross (SX): Stadium-style track with technical obstacles
  • Flat Track: Dirt oval for flat track racing
  • Arenacross: Compact indoor track layout
  • Endurocross: Extreme obstacles and technical sections
  • Practice Track: Simple loop for training and casual riding

Using Templates

  1. Open Track Developer → "New from Template"
  2. Browse templates and select one
  3. Template code loads in a virtual space without GPS
  4. Set GPS geofence if desired
  5. Add your own custom features and junctions as needed
  6. Adjust distances, heading, tilt, fov, height, timing zones, cameras to match your track
  7. Build it to see your track in 3D

Best Practices

  • Start with templates: Don't reinvent the wheel. Templates teach you TrackLang structure.
  • Run frequently: Click "Run" often to see changes in 3D. Catch errors early.
  • Version everything: Save new versions after significant changes (camera adjustments, layout tweaks, etc.).
  • Test with ad-hoc races: Don't trust 3D visualization alone. Run ad-hoc races to verify automated timing works.
  • Make tracks public: Share your work! Public tracks help grow the Adrenaline community.
  • Fork liberally: Found a track similar to yours? Fork it instead of starting from scratch.
  • Document changes: Use version notes to explain what changed (e.g., "Fixed finish line camera angle").
  • Keep it simple first: Get basic track + finish line working before adding checkpoints and cameras.

Have Fun and Experiment!

Create as Many Tracks as You Want

There's no limit to how many tracks you can build. Experiment with different layouts, test crazy ideas, create seasonal variations of the same track. The browser-based Track Developer makes it easy to iterate quickly.

  • Try replicating famous tracks from memory
  • Design your dream backyard track
  • Create practice tracks tailored to specific skills (cornering, jumps, whoops)
  • Build fantasy tracks that would never exist in real life
  • Fork community tracks and add your own twist

Remember: Every track you make—even the "bad" ones—teaches you more about TrackLang. Version control means you can't permanently break anything. Experiment freely!

Common Questions

Do I need to install anything to use TrackLang?

No. Everything runs in your browser. Track Developer is a web-based code editor—no downloads required.

Can I edit someone else's track?

Not directly. But you can fork public tracks, which creates your own copy. Edit the fork however you want—it's yours now.

What happens if I make a mistake and save a broken version?

No problem! Version history preserves every previous version. Just revert to the last working version and continue from there.

How do I know if my TrackLang code is correct?

Click "Run." If there are syntax errors, the console shows them. If no errors, the 3D view updates. For timing accuracy, run ad-hoc races to test timing zones.

Can multiple people edit the same track simultaneously?

Team members can edit, but not simultaneously like Google Docs. Last save wins. Version history prevents losing work—you can always see previous versions.

Are templates customizable?

Absolutely! Templates are just starting points. Modify GPS coordinates, timing zones, cameras, and geometry to match your actual track.

Do I need to know programming to use TrackLang?

Not necessarily. Templates + examples + autocomplete make it accessible to non-programmers. But coding experience helps for complex tracks.

Can I export TrackLang code?

Yes! Tracks can be exported as TrackLang files for backup or sharing outside Adrenaline. You can also import TrackLang files created elsewhere.

Next Steps

Ready to build your first track? Here's where to go next:

  1. Open Track Developer: Create a new track and open the Track Developer interface
  2. Choose a template: Start with a pre-fab template that matches your track style
  3. Learn TrackLang syntax: Read the TrackLang Reference for language details
  4. Set up cameras: Add camera definitions for AI Vision timing
  5. Test with ad-hoc races: Validate your track works with real timing data
  6. Publish and share: Make your track public for the community to use

Related Topics

Tags
trackdevelopmenttracklanggetting-startedtrack-developer

Was this information useful?

Help us improve our documentation by rating this article and sharing your feedback.