Weapons, armour, bodies
A gun's shot, heat and sounds
A gun is a weapon like any other (Weapons): made from one of our guns, with its own picture and numbers. Three things are its own besides: how its rounds look and strike (shot), a gun that heats as it fires (heat), and its sounds.
The shot
"shot": {
"colour": "#ff3b2f", "core": "#fff0ea", "length": 18, "width": 3, "glow": true, "light": 2.5,
"picture": "bolt.png",
"burst": 1, "sparks": 8, "scorch": true, "debris": true,
"smoke": false, "cases": false
}Without shot its rounds are the base's tracer streak, set by tracerHead, tracerTail, tracerLength and tracerWidth in weapon. With it, each round is a bolt:
- Its look:
colourround a hottercore,lengthbywidthpixels at 40 to a unit, tip first, its outer rows a pixel short at each end and thinning toward the tail.picturedraws it instead: pointing right, its rightmost pixel at the round. - Its glow:
glowdraws it over the night's dark with a soft halo of its colour; false paints it like anything else.lightis how many units of its colour it lights round it as it flies, flaring where it stops; 0 for none.lightStrength(0 to 8, 1.3 when not given) is how bright: 2 or 3 lights the ground and walls it passes even by day. - The muzzle's flash and its light take the shot's colours.
- Where it strikes: a
burstof its colours (0 none, 1 normal, up to 3),sparksthrown back the way it came (0 to 32), and ascorchleft on the ground for a few seconds.debrisfalse keeps the base's chips, dirt, sparks and blood from flying as well. A round spent in mid-air does not burst. smokefalse: no powder smoke out of the barrel, no blast.casesfalse: no case thrown out.- How fast it flies is
muzzleSpeedinweapon. Our guns fly 150 to 380 units a second; a bolt is easy to see at 40 to 70.
On the bench the Shot section switches between Tracer and Bolt. A strip of the game's ground at night fires the round into a post over and over, as the game draws it; clicked, it fires at once with its sound. Draw a picture of its own starts a picture from the streak and opens it on the canvas.
A magazine of its own
"magazine": "cell.png"Beside shot, on the weapon's entry: the gun's magazine drawn as this picture instead of the base's. It is seated with its top left at magazinePixel and dropped and fitted in the reload as the base's is.
Heat
"heat": { "perShot": 0.06, "cooling": 0.4, "coolDelay": 0.35, "unlockAt": 0.3 }A gun that heats as it fires:
- Each shot adds
perShot; 1 is overheated. coolDelayseconds after a shot it starts to losecoolinga second.- Overheated, it locks: the trigger clicks dead, it vents with its
ventsound and coolsventBoosttimes faster, until it is down tounlockAt. - It glows as it heats, its own pixels going from dull red to yellow-white, creeping back from the muzzle as far as
reach(a share of its length), with a light oflightunits at the muzzle.
Each machine heats its own copy from the shots it sees. On the bench, Heat draws a graph of the gun's heat with the trigger held from cold, redrawn as a slider moves: dashed where it fires again, red where it is locked, with how many shots lock it, how long it stays locked and how long it takes to go cold.
Sounds
"sounds": { "shot": ["bolt1.wav", "bolt2.wav"], "impact": "bolt_strike.wav" }A slot takes a file or a list; each time one of the list is played at random, and a slot not given keeps the base's. The files are .wav, .ogg or .mp3, loudest at their first moment, peaking around -16 dB.
| who | slots |
|---|---|
| a gun | shot, impact (its round striking anything), dry (the trigger on nothing), magazineOut, magazineIn, handle (racked), selector, flyby (its round passing close to the listener, in place of a bullet's crack: a glowing bolt with none goes by silently), vent (overheated, with heat) |
| a weapon swung | swing, hit |
| a lit saber | on, off, hum (looped, the first file), clash (on steel, wood or stone), burn (through a body or a shield's boards), deflect (a round batted back), push and pull (the free hand's force) |
A saber swings with either swingLow and swingHigh, two loops faded in by how fast the blade turns, or swing and swingFast, one-shots played each blow (a running or master blow's from swingFast), with the hum swelling and bending as the blade turns. A saber is "changes": "Lightsaber", or a new weapon made on it.
Formats
shot and sounds are format 2; magazine, heat, lightStrength, flyby, vent and the saber's slots are format 3 (formats).
Modding