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

Bananabench Async

Script defined in `lua/console/bananabench-async.lua`. Async/coroutine-based variant of the bananabench physics benchmark. Uses `coroutine.yield()` during physics steps to allow frame-by-frame executi

Script defined in lua/console/bananabench-async.lua. Async/coroutine-based variant of the bananabench physics benchmark. Uses coroutine.yield() during physics steps to allow frame-by-frame execution.


Functions/Exports

benchPhysics(vehicles, vehicleMin, vehicleMax) (global)

Coroutine-compatible benchmark function. Same structure as the core bananabench but uses coroutine.yield() in the update loop instead of direct BeamEngine.update calls. Tests with both dynamic collision ON and OFF.

  • vehicles - vehicle names (default: {'pickup'})
  • vehicleMin - min count (default: 1), vehicleMax - max count (default: 12)
  • Outputs table with dynamic collision vs no-collision comparison

myBenchStep(testVehicle, n) (global)

Spawns n vehicles, yields for gfxSteps frames, measures total time.

benchLog(level, origin, msg, newline) (global)

Log caching function (same as core bananabench).

benchmark_start() (global)

Creates a coroutine wrapping benchPhysics. Call once to initialize.

benchmark_update() (global)

Resumes the benchmark coroutine. Call each frame.

getAllVehicles() (local, unused)

Scans /vehicles directory and returns list of all vehicle names. Defined but not called in this script.

formatRes(res) (local, nested inside benchPhysics)

Formats a single result entry (MBeams/s and % realtime) for table output. Nested helper within the print loop.

Configuration

  • physicsFPS = 2000, physicsSteps = 100, gfxSteps = 20
  • version = '0.4'

Usage

benchmark_start()  -- initialize coroutine
-- then call benchmark_update() each frame

Internal Notes

  • Requires lua/console/test at startup
  • Unlike core bananabench, uses BeamEngine:spawnObject (not spawnObject2) and vec3 (not Vector3)
  • Compares dynamic collision on vs off in a 2-column output
  • Uses M = {} as global (not local), no module return - standalone script pattern
  • Older version (0.4) compared to core bananabench (0.5)

See Also

  • BeamConsole Folder Overview - Directory overview
  • bananabench-csv Reference - Related reference
  • bananabench-json Reference - Related reference
  • bananabench-print Reference - Related reference
  • Console Commands Guide - Guide

Profiler Report

Module defined in `lua/common/utils/simpleProfiler/report.lua`. Generates flame chart HTML reports from profiling data using Mustache templates.

Bananabench CSV

Script defined in `lua/console/bananabench-csv.lua`. Runs the full bananabench physics benchmark across ALL vehicles and exports results in CSV format.

On this page

Functions/ExportsbenchPhysics(vehicles, vehicleMin, vehicleMax) (global)myBenchStep(testVehicle, n) (global)benchLog(level, origin, msg, newline) (global)benchmark_start() (global)benchmark_update() (global)getAllVehicles() (local, unused)formatRes(res) (local, nested inside benchPhysics)ConfigurationUsageInternal NotesSee Also