RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Bananabench AsyncBananabench CSVBananabench JSONBananabench PrintBananabench XMLBananabenchPhysics BenchmarkBeamConsole Folder OverviewJSON PerformanceConsole MainResave Parts ConfigsServer TestsSimple LoadSimulation TestDynamic Collision TestMain Development TestUnit Tests

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API Referenceconsole

BeamConsole Folder Overview

Console scripts for BeamNG.drive - benchmarks, tests, and utilities run outside the game engine in headless/console mode.

Console scripts for BeamNG.drive - benchmarks, tests, and utilities run outside the game engine in headless/console mode.

File Categories

Core Benchmark Module

  • bananabench.lua - Core physics benchmark module (MBeams/s measurement). The only file that exports a proper module (M).

Benchmark Runners (use bananabench)

  • bananabench-print.lua - Run benchmark, print to console
  • bananabench-json.lua - Run benchmark, save to JSON file
  • bananabench-csv.lua - Run ALL vehicles, export CSV
  • bananabench-xml.lua - Run predefined vehicles, export XML for CI
  • bananabench-async.lua - Coroutine-based variant for frame-by-frame execution

Standalone Benchmarks

  • benchphysics.lua - Legacy physics scaling benchmark (CSV output)
  • json-performance.lua - Serialization format comparison (JSON vs lpack vs string.buffer)

Tests

  • unittests.lua - vec3 math correctness and performance tests
  • servertests.lua - Test runner entry point (loads unittests)
  • test.lua - Development test file (vehicle loading, JSON parsing)
  • simtest.lua - Timed physics simulation (100 steps)
  • test_dyncol.lua - Dynamic collision endurance test (5000 steps)
  • simpleload.lua - Minimal vehicle spawn smoke test

Utilities

  • main.lua - Console environment bootstrap (package paths, core requires)
  • resave-pcs.lua - Re-save all vehicle .pc configuration files

Common Patterns

  • Most scripts are standalone (no module return) - they auto-execute on require/rerequire
  • Only bananabench.lua returns a proper module table
  • Scripts use BeamEngine global for physics, HighPerfTimer for timing
  • vec3 / Vector3 for position vectors
  • rerequire used instead of require for reloadable scripts

See Also

  • bananabench-async Reference - Related reference
  • bananabench-csv Reference - Related reference
  • bananabench-json Reference - Related reference
  • Console Commands Guide - Guide

Physics Benchmark

Script defined in `lua/console/benchphysics.lua`. Simple legacy physics scaling benchmark that measures per-frame delay as vehicle count increases, outputting results to CSV.

JSON Performance

Script defined in `lua/console/json-performance.lua`. Comprehensive serialization performance benchmark comparing JSON, lpack, lpack binary, and string.buffer encode/decode speeds.

On this page

File CategoriesCore Benchmark ModuleBenchmark Runners (use bananabench)Standalone BenchmarksTestsUtilitiesCommon PatternsSee Also