Rideable vehicles from the Prop Builder.

Vehicles

The View and the Sound of a Ride

reactor_vehicles_feel.js · 899 lines · 9 public functions

Rideable vehicles from the Prop Builder.

What This Module Does

Aboard a vehicle ($gamePlayer._vehicleType === "reactor") on a 3D map:

Classes & Namespaces

Design Notes from the Source Code

Aboard a vehicle ($gamePlayer._vehicleType === "reactor") on a 3D map:

The view. In third person the camera stands back and widens with speed, aims a little ahead along the travel, follows the height through a low-pass and swings round behind the heading by itself when the hand has left the look alone. In the fixed views it stands back with speed. It is laid over the camera the map has placed (a wrapper of Reactor3D.Camera.update, after the Tactical director's and the Action driver's) and never writes the map's saved camera state. What keeps the map's own camera out of a wall or a roof is asked of the view's place too, and followed by degrees: a wall the swing crosses in a tick or two moves nothing, one the view stays in brings the camera in; the ground is cleared at once.

The sound. One looped buffer of this file's own for the engine, its playback rate and volume following the speed, and the type's punctuation sounds as ordinary sound effects.

Every eased value moves once per logic tick, in ReactorVehicles.Feel.advance (the mover's call; a tick no mover advanced is advanced by the camera wrapper). The wrapper only applies what the tick left: asked twice on a tick it gives the same camera, and the camera of a catch-up tick, which nothing is drawn from, is left as the map placed it. The picture is the same at any frame rate.

On foot with nothing left to ease, the camera wrapper is one compare of _vehicleType and one flag of this file. Nothing is made per tick or per camera call.

View reactor_vehicles_feel.js on GitHub · Show internal (_) functions