A complete reference of every feature GoSprite64 provides, organized by section.
| Feature | Description | Docs |
Game interface | Init(), Update(), Draw() lifecycle for your game | Game Loop |
Run(g Game) | Starts the 60 FPS game loop with fixed timestep | Game Loop |
| 288x216 canvas | Fixed logical resolution for all drawing APIs | Fixed Canvas |
| 16-color palette | Built-in named colors: Black, White, Red, etc. | Colors |
| Feature | Description | Docs |
ClearScreen() | Fills the screen with black | Drawing Primitives |
ClearScreenWith(c) | Fills the screen with any color | Drawing Primitives |
FillRect(x1,y1,x2,y2,c) | Draws a filled rectangle | Drawing Primitives |
DrawRect(x1,y1,x2,y2,c) | Draws a rectangle outline | Drawing Primitives |
DrawLine(x1,y1,x2,y2,c) | Draws a 1px line (Bresenham for diagonals) | Drawing Primitives |
DrawText(str,x,y,c) | Draws text using the built-in 8x8 font | Drawing Primitives |
DrawImage(src,x,y) | Draws a Go image.Image at logical coordinates | Drawing Primitives |
DrawWorldImage(src,x,y,cam) | Draws an image offset by camera position | Drawing Primitives |
| Feature | Description | Docs |
LoadSpriteSheet(path) | Loads a .sheet file from the cartridge filesystem | Sprite Sheets |
SpriteSheet.FrameCount() | Returns the number of frames in the sheet | Sprite Sheets |
SpriteSheet.FrameWidth() | Returns the pixel width of a single frame | Sprite Sheets |
SpriteSheet.FrameHeight() | Returns the pixel height of a single frame | Sprite Sheets |
DrawSprite(sheet,frame,x,y) | Draws a sprite frame at logical coordinates | Sprites |
DrawSpriteWithOptions(...) | Draws with flip, scale, rotation, blend, and alpha | Sprites |
DrawWorldSprite(...) | Draws a sprite offset by camera position | Sprites |
DrawWorldSpriteWithOptions(...) | World-space sprite with full draw options | Sprites |
DrawSpriteOptions | Struct: FlipH, FlipV, ScaleX/Y, Rotation, Origin, Blend, Alpha | Sprites |
BlendNone, BlendMasked, BlendAlpha | Blend mode constants for sprite drawing | Sprites |
| Feature | Description | Docs |
AnimationSet | Collection of named animation clips loaded from .anim files | Animation Player |
AnimationClip | A single animation: name, FPS, and frame indices | Animation Player |
NewAnimationPlayer() | Creates a player that drives sprite frame changes | Animation Player |
AnimationPlayer.Play(clip) | Starts playing a clip from the beginning | Animation Player |
AnimationPlayer.Advance(ticks) | Advances the animation by N ticks (call each frame with 1) | Animation Player |
AnimationPlayer.Frame() | Returns the current sprite sheet frame index | Animation Player |
AnimationPlayer.SetLoop(bool) | Enables or disables looping | Animation Player |
AnimationPlayer.Pause/Resume/Stop/Restart | Playback control | Animation Player |
AnimationPlayer.Playing() / Done() | Status queries | Animation Player |
| Feature | Description | Docs |
NewFont(sheet, glyphs, lineHeight) | Creates a font from a sprite sheet and glyph map | Custom Fonts |
Font.DrawTextEx(text, x, y, align) | Draws text with left/center/right alignment | Text Alignment |
Font.MeasureText(text) | Returns pixel width and height of rendered text | Custom Fonts |
Font.WrapText(text, maxWidth) | Inserts newlines to fit text within a pixel width | Text Alignment |
FormatScore(score, width) | Formats an integer with leading zeros | Custom Fonts |
AlignLeft, AlignCenter, AlignRight | Text alignment constants | Text Alignment |
| Feature | Description | Docs |
NewParallaxConfig(speeds...) | Configures multi-layer parallax with speed factors | Parallax Scrolling |
ParallaxConfig.LayerOffset(layer, camX, camY) | Returns the scroll offset for a given layer and camera | Parallax Scrolling |
ParallaxLayer | Defines SpeedX and SpeedY multipliers (0.0 = static, 1.0 = full speed) | Parallax Scrolling |
| Feature | Description | Docs |
StartTransition(style, frames) | Begins a fade transition over N frames | Transitions |
FadeToBlack, FadeFromBlack | Transition style constants | Transitions |
Transition.Advance() | Steps the transition forward one frame | Transitions |
Transition.Draw() | Renders the transition overlay | Transitions |
Transition.Done() / Active() / Stop() | Status and control | Transitions |
| Feature | Description | Docs |
SetDrawRegion(x, y, w, h) | Restricts drawing to a sub-rectangle (for split-screen) | Draw Regions |
ResetDrawRegion() | Pops the most recent draw region | Draw Regions |
DrawRegion.Clip(...) | Offsets and clips coordinates to region bounds | Draw Regions |
DrawRegion.ContainsPoint(x, y) | Hit-tests a local coordinate against the region | Draw Regions |
| Feature | Description | Docs |
IsButtonDown(button) | Returns true while a button is held (port 0) | D-Pad and Buttons |
IsButtonJustPressed(button) | Returns true on the frame a button is first pressed (port 0) | D-Pad and Buttons |
StickPosition(deadzone) | Returns analog stick X/Y in [-1.0, 1.0] (port 0) | Analog Stick |
PlayerButtonDown(port, button) | Per-port button check for multiplayer | Multi-Controller |
PlayerButtonJustPressed(port, button) | Per-port just-pressed check | Multi-Controller |
PlayerStickPosition(port, deadzone) | Per-port analog stick | Multi-Controller |
IsControllerConnected(port) | Checks if a controller is plugged in | Multi-Controller |
ConnectedControllers() | Returns the number of connected controllers | Multi-Controller |
SetRumble(port, enabled) | Turns the Rumble Pak on or off | Rumble |
| Button constants | ButtonA, ButtonB, ButtonZ, ButtonStart, ButtonDPadUp/Down/Left/Right, ButtonL, ButtonR, ButtonCUp/Down/Left/Right | D-Pad and Buttons |
| Feature | Description | Docs |
NewInputRecorder(playerCount) | Creates a recorder that captures per-frame controller state | Input Replay |
InputRecorder.CaptureFrame(player, input) | Records one frame of input | Input Replay |
InputRecorder.Finish() | Finalizes recording into ReplayData | Input Replay |
NewInputPlayer(data) | Creates a player that replays recorded input | Input Replay |
InputPlayer.NextFrame(player) | Returns the next frame of recorded input | Input Replay |
InputPlayer.Done() / Reset() | Playback status and restart | Input Replay |
| Feature | Description | Docs |
RegisterAudioBundle(bundle) | Registers VADPCM audio assets before the game loop starts | SFX and Music |
PlaySoundEffect(id) | Triggers a one-shot sound effect | SFX and Music |
PlayMusic(id) | Starts background music playback | SFX and Music |
StopMusic() | Stops the current music track | SFX and Music |
SetSoundEffectVolume(v) | Sets SFX volume (0.0 to 1.0) | SFX and Music |
SetMusicVolume(v) | Sets music volume (0.0 to 1.0) | SFX and Music |
sequence.NewPlayer() | Creates a MIDI-like sequence player | Sequence Player |
sequence.Player.Play/Stop/Pause/Resume | Sequence playback control | Sequence Player |
sequence.Player.SetTempo(bpm) | Sets playback tempo | Sequence Player |
sequence.Player.SetLoop(start, count) | Configures loop points | Sequence Player |
| Feature | Description | Docs |
GameState interface | Enter(), Update(), Draw(), Exit() for each screen | State Machine |
NewStateMachine(initial) | Creates a state machine with an initial state | State Machine |
StateMachine.Switch(state) | Replaces the top state (calls Exit then Enter) | State Machine |
StateMachine.Push(state) | Overlays a new state (for pause menus, dialogs) | State Machine |
StateMachine.Pop() | Removes the top state and returns to the one below | State Machine |
StateMachine.Update() / Draw() | Delegates to the top state | State Machine |
| Feature | Description | Docs |
NewTimer(frames) | Creates a countdown timer | Timers |
Timer.Tick() | Advances by one frame; returns true on the finishing frame | Timers |
Timer.Done() / Progress() / Remaining() | Status queries | Timers |
Timer.Reset() / ResetWith(frames) | Restart the timer | Timers |
NewRepeatingTimer(interval) | Creates a timer that fires every N frames | Timers |
RepeatingTimer.Tick() | Returns true on trigger frames | Timers |
RepeatingTimer.Count() | Returns how many times it has triggered | Timers |
| Feature | Description | Docs |
NewMenu(items) | Creates a D-pad-navigated menu from MenuItem entries | Menus |
Menu.HandleInput() | Reads the controller and moves the cursor; returns true on confirm | Menus |
Menu.Draw() | Renders the menu with cursor indicator | Menus |
Menu.MoveUp() / MoveDown() | Manual cursor movement (skips disabled items) | Menus |
MenuItem | Struct: Label, Disabled, OnConfirm callback | Menus |
| Feature | Description | Docs |
save.Storage interface | Uniform API for EEPROM, SRAM, and FlashRAM | Save Data |
save.ReadAll(s) / WriteAll(s, data) | Read or write the entire save storage | Save Data |
save.Checksum(data) | Additive checksum for save integrity | Save Data |
| Storage types | StorageEEPROM4K (512B), StorageEEPROM16K (2KB), StorageSRAM (32KB), StorageFlashRAM (128KB) | Save Data |
| Feature | Description | Docs |
Vec2 | 2D vector with X, Y float32 fields | Vectors |
Add, Sub, Scale, Negate, Abs | Arithmetic operations | Vectors |
Length, LengthSq, Normalize | Magnitude and normalization | Vectors |
Dot, Distance, DistanceSq | Products and distances | Vectors |
Lerp, Rotate, Angle | Interpolation and rotation | Vectors |
Min, Max | Component-wise min/max | Vectors |
| Feature | Description | Docs |
Rect | Axis-aligned rectangle: X, Y, W, H | Rectangles |
RectFromCenter(center, w, h) | Creates a rect centered on a point | Rectangles |
ContainsPoint, ContainsRect, Overlaps | Spatial queries | Rectangles |
Intersection, Expand, Center | Rect operations | Rectangles |
| Feature | Description | Docs |
Clamp(v, lo, hi) | Restricts a value to a range | Easing Functions |
Lerp(a, b, t) | Linear interpolation | Easing Functions |
InvLerp(a, b, v) | Inverse lerp (returns 0-1 ratio) | Easing Functions |
Remap(v, inMin, inMax, outMin, outMax) | Maps a value from one range to another | Easing Functions |
MoveToward(current, target, maxDelta) | Moves toward target by at most maxDelta | Easing Functions |
EaseInQuad, EaseOutQuad, EaseInOutQuad | Quadratic easing | Easing Functions |
EaseInCubic, EaseOutCubic, EaseInOutCubic | Cubic easing | Easing Functions |
SmoothStep(edge0, edge1, x) | Hermite interpolation | Easing Functions |
| Feature | Description | Docs |
NewGrid[T](cols, rows) | Creates a generic 2D grid | Grid Utilities |
Get, Set, Clear, Fill | Cell access and bulk operations | Grid Utilities |
ScanRow, ScanCol | Run-length scanning for matching groups | Grid Utilities |
CountValue, FindAll, Neighbors4 | Queries and spatial helpers | Grid Utilities |
| Feature | Description | Docs |
math3d.Mat4 | 4x4 matrix with multiply, perspective, ortho, lookAt, translate, rotate, scale | 3D Math |
math3d.Vec3 / Vec4 | 3D and 4D vectors with arithmetic, dot, cross, normalize | 3D Math |
math3d.Viewport | Maps clip-space to screen coordinates | 3D Math |
scene3d.NewScene() | Creates a 3D scene graph | Scene Graph |
scene3d.Node | Scene graph node with transform, children, and render function | Scene Graph |
scene3d.NewMeshNode(name, dl) | Creates a node that renders a display list | Scene Graph |
scene3d.NewPerspectiveCamera(...) | Creates a perspective camera node | Scene Graph |
scene3d.NewOrthoCamera(...) | Creates an orthographic camera node | Scene Graph |
scene3d.DrawScene(scene) | Traverses the scene graph and renders | Triangle Rendering |
gfx.DisplayList | GPU command buffer for triangle rendering | Display Lists |
| Feature | Description | Docs |
dma.CartToRDRAM(offset, dst) | DMA transfer from cartridge ROM to RDRAM | DMA Transfers |
dma.SRAMRead / SRAMWrite | Direct SRAM access via DMA | DMA Transfers |
dma.NewPool(base, size) | Memory pool with head/tail allocation | Memory Pools |
dma.NewSegmentTable() | Segment address translation table | DMA Transfers |
rspq.NewQueue() | RSP task queue for submitting microcode tasks | RSP Task Queue |
rspq.Load(microcode) | Loads RSP microcode | RSP Task Queue |
n64os.NewMessageQueue(size) | OS-level message queue for event handling | N64 OS Primitives |
n64os.NewScheduler(events, fn) | Task scheduler for graphics and audio | N64 OS Primitives |
n64os.NewEventRouter() | Routes hardware events to message queues | N64 OS Primitives |
n64os.NewTimer(queue, msg, interval) | OS-level timer with message delivery | N64 OS Primitives |