RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Debug DrawingGPU Mesh StructsImGui FFIMath Structs (FFI)FFI C DefinitionsPID ControllersCSV LibraryDelay LineDequeDevelopment UtilitiesEvent ReferenceExtension SystemSignal FiltersGraph PathfindingUI BridgeInput Filter Constants2D Bilinear InterpolationIntrospectionJBeam Pretty PrinterJSON AST ParserSJSON ParserJSON Debug ParserJSON Pretty PrinterK-D Tree (2D Boxes)K-D Tree (3D)K-D Tree (3D)Lua SerializerC++/Lua BindingLua CoreLua ProfilerMath LibraryParticlesQuadtreeSettingsTCP ServerTimer SchedulerUtility Library
Call TracerDate UtilsDebug DrawingFilter Chainutils/ - Utility ModulesHeatmap GeneratorHTTP JSON ServerInteractive ShellLanguage MapPerformance ProfilerPixel Drawing LibraryHTTP ServerTorqueScript ParserWebSocket Server

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 Referencecommonutils

Heatmap Generator

Module defined in `lua/common/utils/heatmap.lua`. Generates SVG heatmap visualizations of vehicle paths on the game map, including road overlay.

Module defined in lua/common/utils/heatmap.lua. Generates SVG heatmap visualizations of vehicle paths on the game map, including road overlay.


Exports

Functions

M.init(_filename)

Initialize the heatmap with an output filename.

  • Parameters:
    • _filename - string - SVG output file path

M.update()

Record current frame's vehicle position to the heatmap. Called every frame.

M.save()

Write the accumulated heatmap data to the SVG file.

M.destroy()

Clean up heatmap resources.

Internal Notes

  • Uses EzSVG library for SVG generation
  • transformPoint flips/transforms coordinates for file output
  • drawRoads overlays road network onto the heatmap
  • Designed to run continuously, sampling position each frame

See Also

  • utils/ - Utility Modules - Directory overview
  • calltracer Reference - Related reference
  • dateUtils Reference - Related reference
  • debugDraw Reference - Related reference
  • Common Libraries Overview - Guide

utils/ - Utility Modules

General-purpose utility modules for debugging, profiling, networking, graphics, and data processing.

HTTP JSON Server

Module defined in `lua/common/utils/httpJsonServer.lua`. Simple HTTP server for implementing quick REST APIs within BeamNG. Handles JSON request/response.

On this page

ExportsFunctionsM.init(_filename)M.update()M.save()M.destroy()Internal NotesSee Also