8000 Releases · cdahmedeh/VGSForBeamNG · GitHub
[go: up one dir, main page]

Skip to content

Releases

VGS Display for BeamNG.drive 2.20

Choose a tag to compare

@cdahmedeh cdahmedeh released this 24 Nov 18:36

Each tyre's grip bar now knows the surface under it.

What's new

  • Split surfaces read right. With one side of the car on ice or dirt, the tyres on the slippery side used to read less full than the ones on tarmac, the opposite of the truth. Now each tyre's grip is its own times the grip of the surface it's touching, which the display reads from the game's ground models. A tyre on ice has less grip to use, so for the same work its bar reads fuller, and it reaches full sooner, just as it lets go sooner.
  • A new surface reads right at once. Driving from tarmac onto gravel, snow or ice, the bars used to read low until the car had been near its limit there. Now the surface is known from the first moment. Only the tyres' own grip (slicks, all-terrain tyres) is still learnt as you drive, and what's learnt on one surface carries over to the next.
  • A tyre at its own limit hands on the rest. The axle's cornering force is shared by the tyres' stiffness, as before. Once a tyre on the slippery side can't take more, the rest goes to the tyres that still can.
  • Tarmac is unchanged. With every tyre on tarmac, the bars read exactly as before.

In the simulation, with one side on a surface with half the grip, the slippery side's bar went from 0.37 to 0.72 against a true 0.67. For a car on a low-grip surface it hadn't driven on before, the bar went from 0.30 to 0.65 against a true 0.65.

Fixed

  • The game-engine renderer no longer sets a global variable every frame (the "set new global variable: soft" warnings in the log).

Install or update

  1. Download VGS_Display_2.20.zip below and put it in your BeamNG mods folder, replacing the old version (unzipped works too).
  2. Start the game and load a vehicle.
  3. Open the UI app selector and add VGS Display. It's in the Telemetry category.

Known limits

  • Loose ground that gives way under a tyre (sand, mud) has more to it than its friction, so there the bars can read a little low until the tyres' grip has been learnt on it.
  • The tour animation's split-surface scene was made before 2.20, so its tyres on ice still read short there.

VGS Display for BeamNG.drive 2.00

Choose a tag to compare

@cdahmedeh cdahmedeh released this 24 Nov 18:24

The display is now drawn by the game engine, every frame, the way BeamNG's own minimap is drawn.

What's new

  • Drawn at the game's frame rate. Everything that moves is drawn by the game engine in a click-through layer laid exactly over the app. That covers the tyres, the shafts' torque and the differentials, the G-force dot and its trail, the rim arcs, the direction marker, the assist dots and the balance. Every vehicle in the chain sends its update every frame, so the display moves at the game's own frame rate, one frame behind the physics, however fast the UI runs.
  • Three layers, like the minimap:
    • The app's element marks the app's place in your layout and tells the game engine where it is.
    • The app's canvas draws the parts that only change with the layout (the circle, the outlines, the hitches), and only when they change.
    • The game engine draws everything that moves.
  • Lighter on the UI. The UI no longer redraws every refresh. It gets each vehicle's layout and four updates a second, enough to lay the picture out.
  • The balance is easier to read. Bigger text at the top of the circle, with more room between the degrees and the words and above the vehicle.
  • Hides when it should. The game-engine layer hides on menus and when the UI is hidden, as the minimap does.
  • Same picture. The game-engine renderer is a port of the app's own renderer, with the same colours and sizes. It was checked against it on 99 scenes, also through the real Dear ImGui library, and the two match except for the font. When the game stretches the UI to the screen (it often draws it at 1920 wide on a 2560 screen), the game-engine layer softens its lines to match.

The app's own renderer is still there

If the game's ImGui isn't available, or the game-engine drawing fails three times, the app goes back to drawing everything itself, as in 1.x. To choose for good, type this in the Lua console (~, the "GE - Lua" context):

  • extensions.vgsHub.setRenderer('cef'): the app draws everything.
  • extensions.vgsHub.setRenderer('auto'): the game engine whenever it can (the default).

The choice is kept in settings/vgsDisplay.json.

Install or update

  1. Download VGS_Display_2.00.zip below and put it in your BeamNG mods folder, replacing the old version (unzipped works too).
  2. Start the game and load a vehicle.
  3. Open the UI app selector and add VGS Display. It's in the Telemetry category.

Known limits

  • The game-engine layer is drawn on top of the UI. A popup or another app placed over the display is covered by it.
  • The balance text uses the game's ImGui font, a little plainer than the app's.

VGS Display for BeamNG.drive 1.21

Choose a tag to compare

@cdahmedeh cdahmedeh released this 18 Nov 06:09

A fix for trailers, dollies and road trains.

Fixed

  • Coupled vehicles stay on the display. With a trailer, a dolly or a whole road train hitched, the rig showed for about a second after coupling or switching vehicles, then disappeared, leaving only the vehicle you were driving. BeamNG only reliably delivers a vehicle's own UI messages from the vehicle the player is in; from the others they get through for a moment, then stop. Every other vehicle in the chain now sends its data through the app's game-engine hub, which always gets through.
  • Coupled vehicles update about 30 times a second, up from 4. The UI never asks a vehicle you aren't in for a frame, so they used to send only at the keep-alive rate. They now send at a steady rate of their own, and the app carries their motion on smoothly between updates.

The vehicle you're driving still sends straight to the app, once per UI frame, so its latency is unchanged. Coupled vehicles arrive one frame later than it. When you switch vehicles, the routes swap by themselves.

Install

  1. Download VGS_Display_1.21.zip below and put it in your BeamNG mods folder, replacing 1.20 (unzipped works too).
  2. Start the game and load a vehicle.
  3. Open the UI app selector and add VGS Display. It's in the Telemetry category.

Nothing else is needed: the app starts and stops its own scripts.

Checking it

With a rig hitched, run extensions.vgsHub.state().pings in the game-engine console twice, a few seconds apart. Every vehicle in the chain should be counting up, and every trailer should stay drawn behind the tractor, whichever vehicle you're in.

VGS Display for BeamNG.drive 1.20

Choose a tag to compare

@cdahmedeh cdahmedeh released this 12 Nov 03:06

A live grip and G-force display for BeamNG.drive, inspired by the VGS (Visual Gravity System) in Enthusia Professional Racing.

In a real car, much of the feel for the limit comes through the seat of your pants: the G-forces pressing you into the seat as the car brakes, accelerates and corners, and the tyres telling you when they're about to let go. A simulator without a motion rig loses most of that. This shows it instead:

  • the G-forces you'd feel, and where the car's weight is moving;
  • how hard each tyre is working, and when one lets go and how badly;
  • where the car is really going against where you're steering;
  • whether it's the front or the rear that's giving up.

Install

  1. Download VGS_Display_1.20.zip below and put it in your BeamNG mods folder (unzipped works too).
  2. Start the game and load a vehicle.
  3. Open the UI app selector and add VGS Display. It's in the Telemetry category.
  4. Resize it to taste: the circle fills the app, so a bigger app means a bigger diagram.

Nothing else is needed: the app starts and stops its own scripts.

What it shows

  • Every wheel, to scale. Each tyre shows the grip in use, a slide graded from "just over the limit" (pink) to locked or spinning (deep red), drive and braking torque, and its live steering angle. Wheels that are nearly off the ground turn pale blue, and wheels in the air turn blue. Flats and broken wheels show too.

  • Understeer and oversteer you can see. A marker by the steering arc shows how much the car is really turning:

    • yellow warns before the front runs wide or the rear lets go;
    • orange-red is understeer;
    • pink-magenta swings out to the countersteer target when the rear slides;
    • aquamarine is a drift or an all-wheel-drive powerslide you're holding.

    It's judged against each car's own tyres, using BeamNG's stability-control calibration where the car has one and learning it while you drive where it doesn't.

  • The balance in words and degrees at the top of the circle: Front near limit, Rear near limit, At the limit, Understeer, Oversteer, Drift with its angle, or Powerslide.

  • The G-forces you'd feel. A dot with a fading trail shows the braking, accelerating and cornering forces that would push you into the seat, and where the weight is moving. It's measured from the physics, so it's quick and steady even over a rough road.

  • Your inputs around the rim: steering, throttle, brake, clutch and handbrake.

  • Driver assists, wheel by wheel: ABS, ESC and traction control, for both BeamNG's classic assists and its newer driving-dynamics electronics.

  • The drivetrain, live. Engines, motors, gearboxes and differentials are drawn where they sit:

    • shafts are tinted by the torque they carry;
    • diffs show their lock state as you switch lockers;
    • part-time 4WD and locking hubs show as connected or disconnected;
    • broken driveshafts show too.
  • Any vehicle: cars, trucks with tandems and dual tyres, buses, three-wheelers, tractor-trailers and articulated rigs, with coupled trailers drawn behind.

Fast and light

  • Each vehicle sends its data straight to the app once per UI frame, using the same handshake BeamNG's own gauges use.
  • The app draws once per screen refresh, carrying moving parts on smoothly between updates.
  • Measured against the physics in the test simulation, the direction marker trails by about 10 ms and the grip bars by under 10 ms. The G-force dot follows a turn-in within about 35 ms.
  • It costs about 0.1 ms per frame in the vehicle and 0.04 ms per draw in the UI.

Tested against the physics

Every measurement and detection was checked frame by frame against a four-wheel vehicle simulation running the real vehicle script. There were 15 test vehicles (front, rear and all-wheel drive, nose- and tail-heavy, trucks, slicks to all-terrain tyres), each through 27 manoeuvres from gentle cornering to spins. A further 20 random vehicles that the tuning never saw were also run.

Test fleet Unseen vehicles
Right state shown 97.6 % of frames 94.9 %
False warnings 1.9 % 4.8 %
Missed warnings 1.3 % 1.4 %

Learn to drive with it

The README is a full guide, not just a reference. Its "Using it to drive better" section has 17 illustrated lessons:

  • threshold braking and trail braking;
  • why adding throttle or brake mid-corner widens or tightens your line;
  • curing understeer, and catching power and lift-off oversteer;
  • drifting, all-wheel-drive powerslides and launches;
  • rollover, kerbs and jumps, and surfaces;
  • differentials, what the assists are telling you, and setting up a car.

It also has an animated tour of 20 situations, a labelled overview, a glossary, troubleshooting, console commands and every setting.

Known limits

  • Grip is learnt per axle, not per wheel or surface. After a change of surface the bars read off until the car has been near its limit again. With one side on ice, a tyre rolling on the ice reads short (its slides and ABS or traction-control dots still show).
  • Built against BeamNG.drive 0.40. Anything a different game version doesn't provide only switches that feature off.
0