scifi

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0, MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package scifi is pixelfx's sci-fi category: EMP blasts, energy cores, force fields, glitches, holograms, jetpacks, laser grids, scanners, teleporter pads, tractor beams and warp beams, each a pixelfx.Effect registered as "scifi/<name>" when the package is imported.

Index

Constants

This section is empty.

Variables

View Source
var EmpBlast = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "EMP blast",
		Desc:     "A disc charge ticks, pops white, and a bubble of rolling scanlines swells out with arcs crawling its skin; it strobes, tears and shorts out into falling dead pixels.",
		Tags:     []string{"scifi", "emp", "pulse", "shockwave", "electric", "grenade", "glitch", "one-shot"},
		Size:     [2]int{152, 116},
		Origin:   [2]int{76, 84},
		Duration: empDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0d0820", "#1c1658", "#2d2aa0", "#3f55e8", "#5a8eff", "#9cc4ff", "#dceaff", "#ffffff")},
			{Name: "fringe", Default: pixelfx.Color("#ff5ad8")},
			{Name: "radius", Default: pixelfx.Num(56)},
			{Name: "seed", Default: pixelfx.Num(33)},
		},
	},
	New: newEmpBlast,
}

EmpBlast is a disc charge that ticks, pops white, and swells into a bubble of rolling scanlines with arcs crawling its skin before strobing, tearing and shorting out into falling dead pixels. It is registered as "scifi/emp-blast".

View Source
var EnergyCore = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Energy core",
		Desc:     "A plasma core beating in a steel cage: it swells and throws a shock ring on each beat, two tilted rings orbit it, and arcs jump to the bars and spark.",
		Tags:     []string{"scifi", "reactor", "core", "power", "plasma", "machine", "prop", "ground", "loop"},
		Size:     [2]int{112, 100},
		Origin:   [2]int{56, 88},
		Duration: energyDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#1a0516", "#3d0a33", "#701560", "#b0228f", "#f53cd1", "#ff86e6", "#ffd2f6", "#ffffff")},
			{Name: "metal", Default: pixelfx.Palette("#0e0d14", "#1e1c27", "#312e3e", "#4b4759", "#6f6a82", "#9d98b0")},
			{Name: "seed", Default: pixelfx.Num(35)},
		},
	},
	New: newEnergyCore,
}

EnergyCore is a plasma core beating in a steel cage: it swells and throws a shock ring on each beat, two tilted rings orbit it, and arcs jump to the bars and spark. It is registered as "scifi/energy-core".

View Source
var ForceField = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Force field",
		Desc:     "A glassy dome of hex plates over the hero: plates glint, tracers from the right slam into it, a ripple and cracks of light race across, sparks glance off.",
		Tags:     []string{"scifi", "shield", "barrier", "dome", "hex", "hit", "defense", "loop"},
		Size:     [2]int{184, 104},
		Origin:   [2]int{76, 84},
		Duration: ffDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0b1030", "#152a63", "#1d4f9e", "#2582d2", "#36b9ee", "#8ae8ff", "#d4fbff", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "radius", Default: pixelfx.Num(44)},
			{Name: "seed", Default: pixelfx.Num(5)},
		},
	},
	Act: &pixelfx.Act{
		Poses: []pixelfx.Key{
			{T: 0, Pose: ffHold},
			{T: 0.42, Pose: ffHold},
			{T: 0.42, Pose: ffHit, How: "snap"},
			{T: 0.7, Pose: ffHold.With(pixelfx.X.Is(-1))},
			{T: 1.1, Pose: ffHold},
			{T: 1.5, Pose: ffHold},
			{T: 1.5, Pose: ffHit.With(pixelfx.Crouch.Is(4), pixelfx.Lean.Is(-2)), How: "snap"},
			{T: 1.75, Pose: ffHold},
			{T: 2.4, Pose: ffHold},
		},
		Hits: []pixelfx.Hit{
			{T: 0.42, Stop: 0.07, Shake: 0.16, Amp: pixelfx.Val(2)},
			{T: 1.5, Stop: 0.03, Shake: 0.08, Amp: pixelfx.Val(1)},
		},
	},
	New: newForceField,
}

ForceField is a glassy dome of hex plates over the hero: plates glint, tracers from the right slam into it, a ripple and cracks of light race across, and sparks glance off. It is registered as "scifi/force-field".

View Source
var Glitch = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Glitch",
		Desc:     "The hero's signal breaks up in bursts: an RGB split, slices torn sideways, rows smeared out, junk blocks and dead pixels, then snaps back clean.",
		Tags:     []string{"scifi", "glitch", "digital", "corrupt", "hologram", "status", "loop"},
		Size:     [2]int{88, 64},
		Origin:   [2]int{44, 54},
		Duration: glitchDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#14101f", "#3b1f5c", "#ff2e63", "#ff7aa8", "#2ef2ff", "#b4fbff", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(7)},
		},
	},
	Act: &pixelfx.Act{
		OnBody: true,
		Poses: []pixelfx.Key{
			{T: 0, Pose: glitchFine},
			{T: 0.3, Pose: glitchTwitchA, How: "snap"},
			{T: 0.37, Pose: glitchTwitchB, How: "snap"},
			{T: 0.44, Pose: glitchTwitchA, How: "snap"},
			{T: 0.53, Pose: glitchFine, How: "snap"},
			{T: 1.1, Pose: glitchTwitchB, How: "snap"},
			{T: 1.23, Pose: glitchFine, How: "snap"},
			{T: 1.7, Pose: glitchTwitchA, How: "snap"},
			{T: 1.8, Pose: glitchTwitchB.With(pixelfx.Crouch.Is(3)), How: "snap"},
			{T: 1.9, Pose: glitchTwitchA, How: "snap"},
			{T: 2, Pose: glitchTwitchB, How: "snap"},
			{T: 2.07, Pose: glitchFine, How: "snap"},
			{T: 2.4, Pose: glitchFine},
		},
	},

	ActorAlpha: func(float64, *pixelfx.Options) float64 { return 0 },
	New:        newGlitch,
}

Glitch breaks up the hero's signal in bursts: an RGB split, slices torn sideways, rows smeared out, junk blocks and dead pixels, then snaps back clean. It is registered as "scifi/glitch".

View Source
var Hologram = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Hologram",
		Desc:     "A floor projector throws a cone of light holding a turning wireframe model: scanlines roll through it, a data ring circles it, and it flickers, tears and jitters.",
		Tags:     []string{"scifi", "hologram", "projector", "wireframe", "display", "glitch", "ground", "loop"},
		Size:     [2]int{112, 104},
		Origin:   [2]int{56, 92},
		Duration: holoDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#050c1e", "#0a1f48", "#123b80", "#1d64b8", "#2e98e8", "#6cd0ff", "#c8f0ff", "#ffffff")},
			{Name: "metal", Default: pixelfx.Palette("#0e0d14", "#1e1c27", "#312e3e", "#4b4759", "#6f6a82", "#9d98b0")},
			{Name: "split", Default: pixelfx.Color("#ff4fd8")},
			{Name: "seed", Default: pixelfx.Num(21)},
		},
	},
	New: newHologram,
}

Hologram is a floor projector throwing a cone of light holding a turning wireframe model: scanlines roll through it, a data ring circles it, and it flickers, tears and jitters. It is registered as "scifi/hologram".

View Source
var Jetpack = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Jetpack",
		Desc:     "Twin thrusters fire straight down: white-hot cores with shock diamonds inside ragged flames, puffs that cool into smoke billowing below, lit by the fire.",
		Tags:     []string{"scifi", "jetpack", "thrust", "rocket", "fire", "smoke", "flight", "loop"},
		Size:     [2]int{96, 116},
		Origin:   [2]int{48, 30},
		Duration: jetDuration,
		Loop:     true,
		FPS:      30,
		BG:       "dark",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#2a0e12", "#5c1818", "#a02818", "#e0501a", "#ff8a2a", "#ffc23d", "#fff3a6", "#ffffff")},
			{Name: "metal", Default: pixelfx.Palette("#0e0d14", "#1e1c27", "#312e3e", "#4b4759", "#6f6a82", "#9d98b0")},
			{Name: "length", Default: pixelfx.Num(26)},
			{Name: "seed", Default: pixelfx.Num(30)},
		},
	},
	New: newJetpack,
}

Jetpack is twin thrusters firing straight down: white-hot cores with shock diamonds inside ragged flames, puffs that cool into smoke billowing below, lit by the fire. It is registered as "scifi/jetpack".

View Source
var LaserGrid = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Laser grid",
		Desc:     "Security lasers between two steel posts: red beams slide and scissor across, dust and haze light up only where they cut through, and the floor sweepers scorch and spark.",
		Tags:     []string{"scifi", "laser", "security", "trap", "hazard", "beam", "ground", "loop"},
		Size:     [2]int{128, 84},
		Origin:   [2]int{64, 76},
		Duration: laserDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#1a0408", "#4a0a12", "#8a1020", "#d01c2a", "#ff4a4a", "#ff9a90", "#ffe4e0", "#ffffff")},
			{Name: "metal", Default: pixelfx.Palette("#0e0d14", "#1e1c27", "#312e3e", "#4b4759", "#6f6a82", "#9d98b0")},
			{Name: "seed", Default: pixelfx.Num(31)},
		},
	},
	New: newLaserGrid,
}

LaserGrid is security lasers between two steel posts: red beams slide and scissor across, dust and haze light up only where they cut through, and the floor sweepers scorch and spark. It is registered as "scifi/laser-grid".

View Source
var Scanner = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Scanner",
		Desc:     "Brackets snap onto the hero, a scan line sweeps head to toe leaving a cooling outline, and a readout counts up to OK before it all lets go.",
		Tags:     []string{"scifi", "scan", "target", "hud", "tech", "status", "ui", "loop"},
		Size:     [2]int{112, 78},
		Origin:   [2]int{42, 58},
		Duration: scanDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#03140a", "#06301a", "#0c5a2c", "#16893e", "#2cc256", "#7cf08c", "#d0ffd4", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(22)},
		},
	},
	Act: &pixelfx.Act{
		OnBody: true,
		Poses: []pixelfx.Key{
			{T: 0, Pose: pixelfx.Pose{}},
			{T: 0.3, Pose: scanStiff, How: "snap"},
			{T: 1.75, Pose: scanStiff},
			{T: 1.85, Pose: scanOK, How: "snap"},
			{T: 2.5, Pose: scanOK},
			{T: 2.8, Pose: pixelfx.Pose{}},
			{T: 3.2, Pose: pixelfx.Pose{}},
		},
	},
	New: newScanner,
}

Scanner snaps brackets onto the hero, sweeps a scan line head to toe leaving a cooling outline, and counts a readout up to OK before letting go. It is registered as "scifi/scanner".

View Source
var TeleporterPad = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Teleporter pad",
		Desc:     "A steel pad glows on the floor, its rings rippling outward; a soft column of light rises off it and rings of light lift away, sparkles drifting up through them.",
		Tags:     []string{"scifi", "teleporter", "pad", "portal", "beam", "spawn", "ground", "loop"},
		Size:     [2]int{96, 104},
		Origin:   [2]int{48, 92},
		Duration: tpDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#120a26", "#26145a", "#3c2296", "#5a3ad2", "#7f66f0", "#b4a2ff", "#e6deff", "#ffffff")},
			{Name: "metal", Default: pixelfx.Palette("#0e0d14", "#1e1c27", "#312e3e", "#4b4759", "#6f6a82", "#9d98b0")},
			{Name: "seed", Default: pixelfx.Num(26)},
		},
	},
	New: newTeleporterPad,
}

TeleporterPad is a steel pad glowing on the floor, its rings rippling outward, with a soft column of light rising off it, rings of light lifting away and sparkles drifting up through them. It is registered as "scifi/teleporter-pad".

View Source
var TractorBeam = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Tractor beam",
		Desc:     "A hovering pod projects a cone of light to the floor; rocks tear loose in puffs of dust and spiral up spinning into the lens while rings of light climb the beam.",
		Tags:     []string{"scifi", "beam", "tractor", "lift", "abduct", "debris", "ground", "loop"},
		Size:     [2]int{120, 132},
		Origin:   [2]int{60, 114},
		Duration: tbDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#06161a", "#0b2e33", "#11505a", "#1a7f84", "#2bb5a8", "#7ef0c8", "#d6fff0", "#ffffff")},
			{Name: "hull", Default: pixelfx.Palette("#0d0f17", "#1c2030", "#2e3448", "#4a5470", "#7a86a8", "#b8c4e0")},
			{Name: "stone", Default: pixelfx.Palette("#1a1622", "#2e2838", "#4a4258", "#6d6480", "#9a90aa")},
			{Name: "seed", Default: pixelfx.Num(9)},
		},
	},
	New: newTractorBeam,
}

TractorBeam is a hovering pod projecting a cone of light to the floor: rocks tear loose in puffs of dust and spiral up spinning into the lens while rings of light climb the beam. It is registered as "scifi/tractor-beam".

View Source
var WarpIn = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Warp in",
		Desc:     "A beam slams down, rings run down it and a scanline paints the hero in from head to toe, white-hot pixels cooling to their own colors; the beam pinches shut in sparks.",
		Tags:     []string{"scifi", "teleport", "warp", "beam", "spawn", "arrive", "one-shot"},
		Size:     [2]int{192, 168},
		Origin:   [2]int{96, 128},
		Duration: warpInDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0b1030", "#152a63", "#1d4f9e", "#2582d2", "#36b9ee", "#8ae8ff", "#d4fbff", "#ffffff")},
			{Name: "width", Default: pixelfx.Num(15)},
			{Name: "seed", Default: pixelfx.Num(3)},
		},
	},
	Act: &pixelfx.Act{
		OnBody: true,
		Follow: pixelfx.Val(0),
		Poses: []pixelfx.Key{
			{T: 0, Pose: warpInPose},
			{T: 1.82, Pose: warpInPose},
			{T: 2.05, Pose: pixelfx.Pose{}.With(pixelfx.Crouch.Is(3), pixelfx.FX.Is(8), pixelfx.FY.Is(-19), pixelfx.BX.Is(8), pixelfx.BY.Is(-18), pixelfx.FFX.Is(4), pixelfx.FBX.Is(-3))},
			{T: 2.5, Pose: pixelfx.Ready},
			{T: 3, Pose: pixelfx.Ready},
		},
	},
	ActorAlpha: func(t float64, _ *pixelfx.Options) float64 {
		if t >= warpInDone {
			return 1
		}
		return 0
	},
	New: newWarpIn,
}

WarpIn slams a beam down, sends rings down it, and paints the hero in from head to toe as white-hot pixels cool to their own colors before the beam pinches shut in sparks. It is registered as "scifi/warp-in".

View Source
var WarpOut = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Warp out",
		Desc:     "The hero's outline flickers on, they flash white and break into light from the head down, streaming up a beam that lifts off the floor and pinches shut.",
		Tags:     []string{"scifi", "teleport", "warp", "beam", "despawn", "leave", "one-shot"},
		Size:     [2]int{128, 168},
		Origin:   [2]int{64, 128},
		Duration: warpOutDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0b1030", "#152a63", "#1d4f9e", "#2582d2", "#36b9ee", "#8ae8ff", "#d4fbff", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(4)},
		},
	},
	Act: &pixelfx.Act{
		OnBody: true,
		Follow: pixelfx.Val(0),
		Poses: []pixelfx.Key{
			{T: -0.3, Pose: pixelfx.Ready},
			{T: 0.1, Pose: warpOutSet},
			{T: 0.42, Pose: warpOutRaised, How: "snap"},
			{T: 2.6, Pose: warpOutRaised},
		},
	},
	ActorAlpha: func(t float64, _ *pixelfx.Options) float64 {
		if t < warpOutFlash {
			return 1
		}
		return 0
	},
	New: newWarpOut,
}

WarpOut flickers the hero's outline on, flashes them white and breaks them into light from the head down, streaming up a beam that lifts off the floor and pinches shut. It is registered as "scifi/warp-out".

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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