ship

package
v0.0.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package ship holds the profiles that make one hull fly differently from another: how much it takes, how far it sees, how fast it moves and shoots, and the range it likes to hold. The grunt is the baseline; the rest trade those against each other, so a fight between mixed types has texture instead of one ship repeated.

The profiles live here rather than inside the game because Linefire Skirmish fields the same types, and two tables would drift into two different games. The numbers are in Linefire's units — world units, frames at 60 TPS, and hull points — so a consumer on a different scale should scale them rather than reinterpret them.

Index

Constants

View Source
const (
	BaseHP         = 3
	BaseRadar      = 320.0 // engage/detect range, world units
	BaseFireEvery  = 90    // frames between shots
	BaseShotDamage = 20    // damage to the player per shot
	BaseShotSpeed  = 5.0   // world units per frame
	BaseStandoff   = 90.0  // preferred distance from the target
)

The grunt's numbers, which the other profiles are written against and which the game also uses as its baseline enemy shot.

Variables

This section is empty.

Functions

func Kinds

func Kinds() []string

Kinds lists every profile name, sorted. It is sorted because a caller fielding all of them must not inherit Go's map iteration order: a battle built from this has to come out the same on every run.

Types

type Profile

type Profile struct {
	Kind       string
	HP         int
	Radar      float64
	FireEvery  int     // frames between shots
	ShotDamage int     // damage to the player per shot
	ShotSpeed  float64 // projectile speed, world units per frame
	SpeedMul   float64 // movement-speed multiplier; ignored when Stationary
	Standoff   float64 // preferred orbit distance
	Stationary bool    // never moves: only faces and fires
}

Profile is one type's stat and behaviour block.

func For

func For(kind string) Profile

For returns the profile for a kind, falling back to the grunt so an unknown hull still flies.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL