Skip to main content

Module minigame

Module minigame 

Source
Expand description

Typed views over the ARE MiniGame subsystem.

One area in four thousand-odd ships a minigame, and the four that do carry a MiniGame struct nested in the ARE root. Type selects the mode: 1 is swoop racing, 2 is the turret sequence. Naming anything here for swoop alone names half the subsystem, hence the neutral module name.

§Field layout

MiniGame              (Struct -> AreMiniGame)
+-- Type / MovementPerSec / LateralAccel / Bump_Plane
+-- DoBumping / UseInertia / DOF / Music
+-- Far_Clip / Near_Clip / CameraViewAngle
+-- Player            (Struct -> AreMiniGamePlayer)
|   +-- Models        (List<AreMiniGameModel>)
|   `-- Track / Camera / CameraRotate
+-- Mouse             (Struct -> AreMiniGameMouse)
+-- Enemies           (List<AreMiniGameEnemy>)
`-- Obstacles         (List<AreMiniGameObstacle>)

Mouse, Enemies and Obstacles are siblings of Player, not children. Enemies and Obstacles are engine-attested; Mouse sits alongside them in the one vanilla file carrying it, but its loader path is untraced, so that level rests on the data alone.

The nesting was wrong here for a while, which read every enemy and obstacle in the game as absent. docs/src/internals/minigame_deep_dive.md has the structure and what the engine does with each, and docs/src/testing.md uses the mistake as its worked example of a test that repeats the code’s own misreading.

Structs§

AreMiniGame
Typed view over the ARE MiniGame nested struct.
AreMiniGameBullet
The ballistics of one gun bank (Bullet).
AreMiniGameEnemy
Typed view over one enemy entry in MiniGame.Enemies.
AreMiniGameGunBank
One entry in a vehicle’s Gun_Banks list.
AreMiniGameModel
Typed view over one model entry in a mini-game model list.
AreMiniGameMouse
Typed view over the MiniGame.Player.Mouse sub-struct.
AreMiniGameObjectScripts
The Scripts struct every minigame object carries.
AreMiniGameObstacle
Typed view over one obstacle entry in MiniGame.Obstacles.
AreMiniGamePlayer
Typed view over the MiniGame.Player sub-struct.
AreMiniGameSounds
The Sounds struct on a vehicle.
AreMiniGameTargeting
The AI aiming parameters an enemy gun bank carries.
AreMiniGameVehicle
The fields the player vehicle and every enemy vehicle both carry.
AreMiniGameVehicleScripts
The Scripts struct on a vehicle, which is the object set plus five more.

Constants§

BANK_ID_NONE
The BankID value that means “no bank”.