tram
The player pawn of **Helsinki Life**: a toy HKL tram, modelled once as a runtime mesh and stood up per player with that player's colour on its paintwork.
tram
The player pawn of Helsinki Life: a toy HKL tram, modelled once as a runtime mesh and stood up per player with that player's colour on its paintwork.
local Tram = require("game.pieces.tram")
local pawn = Tram.spawn(parent, 1, "pawn_green")
pawn:setPose({ x, y, z }, yawDegrees, leanDegrees)
pawn:setVisible(false)
pawn:despawn()
The hull is a side profile - raked nose, domed roof, waist band - extruded
across the width by game.pieces.meshkit. On top of it sits the detail that
makes it read as a made thing: a three-pane window strip per side with
doors between, a recessed raked windscreen and rear window, the cream band
carried round both ends, bogies and bumpers, headlamps and tail lamps that
glow, a trolley pole with its contact bow, and the route number on the nose
board and both flanks. The four seats carry real Helsinki lines - 3, 6, 9, 1.
Forward is the entity's own -Z, so a pawn travelling south down the board
stands at yaw 180 and shows its face to the player. M.SCALE is the size the
model is stood on the board at, chosen so four pawns sharing one tile at
HL.pawnSlot - 1.1 board units apart - stand clear of each other.
Finishes come from game/pieces/materials/: piece_paint (tinted per
player), piece_cream, piece_glass, piece_metal, piece_lamp,
piece_tail.
Scoped to this part · feeds back into the world's score.