Skip to content

Releases: sausheong/invadersapp

v0.4.0

Choose a tag to compare

@sausheong sausheong released this 29 Sep 12:25

Jev autopilot (optional)

The game can now be played by Jev, TypeSafe's System One model. It is compiled in only with the jev build tag, so the normal build (and the attached app) contains none of it.

go build -tags jev -o invaders
TYPESAFE_API_KEY=... ./invaders -jev     # or press j during play
  • Code predicts where the falling bombs and the alien formation will be, allowing for Jev's response time, and describes about 20 candidate spots for the cannon in plain language: whether it's safe to get there, and whether an alien will be in the line of fire on arrival
  • Jev picks the spot and decides when to fire; code steers the cannon there
  • Every decision is scored and shown on screen, logged per decision, and summarised live

In test sessions, 95% of moves made while safe survived, 82% of moves made under threat escaped, and 93% of Jev's shots hit, with a death roughly every 19 seconds.

Game fixes

  • Bombs already in the air could survive a hit on the cannon
  • Ctrl+C now closes the app cleanly

Download

invaders-v0.4.0-macos-arm64.zip is the plain macOS app for Apple Silicon (no autopilot). It is unsigned, so right-click → Open the first time. Build from source with -tags jev for the autopilot.

v0.3.0

Choose a tag to compare

@sausheong sausheong released this 29 Sep 10:59

Gameplay

  • Hold ←/→ to move smoothly; p pauses; q returns to the title screen
  • Score, high score and lives shown during play; 3 lives with respawn
  • Aliens speed up as their numbers drop; each wave starts lower and faster
  • 4 destructible shields
  • Only the lowest alien in each column drops bombs
  • Mystery UFO worth 50–300 points
  • High score saved between sessions
  • New title and game over screens, and explosions that linger

Fixes

  • Collision boxes now match each sprite's size
  • The alien formation turns and invades based on living aliens only
  • Clearing a wave starts the next one instead of leaving an empty screen
  • The cannon stays on screen; new games fully reset; only one game loop runs
  • Off-screen bombs are cleaned up; the fire sound only plays when a shot fires

Under the hood

  • The local HTTP server is gone: frames and key presses go through webview Bind directly to Go
  • All assets are embedded in the binary, so go run . works and the app bundle is just the executable
  • Steady 50 fps, a 2× crisp pixel window, and a much smaller JavaScript page
  • Code split into focused files with unit tests and a render snapshot test

Download

invaders-v0.3.0-macos-arm64.zip contains the macOS app for Apple Silicon. It is unsigned, so right-click → Open the first time.

v0.2.0

Choose a tag to compare

@sausheong sausheong released this 29 Sep 07:25

What's new

  • Upgraded to Go 1.26 and converted the project to a Go module
  • Replaced the archived zserge/webview with webview/webview_go
  • Replaced the archived faiface/beep with gopxl/beep/v2: the speaker is set up once and sounds are preloaded into memory
  • Removed jQuery and the unused Bootstrap files; the front end is now plain JavaScript
  • Fixed data races on the shared game state, a race in web server startup, and a missing background image reference
  • Added unit tests

Download

invaders-v0.2.0-macos-arm64.zip contains the macOS app bundle for Apple Silicon. It is unsigned, so right-click → Open the first time.