Skip to content

StreamTanks v0.2.0 — Twitch Extension, C&C Relay Server, & Combat HUD Polish

Choose a tag to compare

@github-actions github-actions released this 17 Sep 07:56
· 53 commits to main since this release

StreamTanks v0.2.0

StreamTanks v0.2.0 marks a monumental milestone: introducing the official Twitch Extension and a high-performance Command & Control (C&C) relay server (st_cc_server). Stream viewers can now aim with an on-screen semi-circular protractor, set power, move, and fire directly from desktop and mobile Twitch apps in real-time. This release also brings visual polish to the OBS overlay, active tank indicators, casualty recaps, scrolling leaderboard tickers, and major performance optimizations.


🕹️ Highlights

1. Official Twitch Extension (ext-web)

  • Desktop Video Overlay (video_overlay.html): Transparent 1920x1080 overlay sitting right above the Twitch video player.
    • Interactive Protractor: Viewers click and drag a cyan neon needle along the 180° protractor arc with dynamic degree readout.
    • Tactical Controls: Adjustable power slider, movement buttons (< MOVE L, MOVE R >), and immediate action feedback ("LOCKED: FIRE 45° @ 80%").
    • Streamer Controls: Broadcasters and moderators can start matches directly from the video HUD.
  • Dedicated Mobile View (mobile.html):
    • Touch-optimized SVG protractor with degree tracking.
    • Custom vertical touch-drag power gauge column.
    • Generous touch targets for deployment, repositioning, and firing.
  • Zero-Setup Configuration (config.html): Extension connects automatically via standard Twitch JWT authentication.
  • Extension Asset Package: Packaged directly in the release as extension.zip for Twitch Developer Console upload.

2. Command & Control Relay Server (st_cc_server)

  • Cloud-hosted WebSocket relay (wss://st-cc.poundsigndesign.com) bridging local broadcaster game instances and Twitch viewers.
  • Secure Streamer Pairing Flow: Streamers claim their channel with a unique one-time in-chat verification code (%claim <code>), authenticated against Twitch IRC.
  • Stateless Twitch JWT Validation: Authenticates viewer identity and channel roles (broadcaster/moderator) with low latency.
  • Cross-Platform Pre-built Binaries: Released for Linux, Windows, and macOS (amd64 / arm64).

3. StreamTanks Local C&C Integration

  • Outbound WebSocket client in streamtanks connects seamlessly to the C&C relay server.
  • Streamers pair with %claim and host tokens are persisted securely in SQLite settings.
  • Real-time bi-directional synchronization: relays viewer chat commands to the game loop and broadcasts live game state, round countdowns, and active player lists to viewers.

4. In-Game OBS Overlay & Visual Polish

  • Active Tank Avatar Markers: Large avatars and floating nameplates mark the player currently taking action or firing.
  • Post-Game Casualty Recap: Summary board displaying total human and bot casualties at the end of each match.
  • Scrolling Leaderboard Ticker: Expanded leaderboard layout featuring a scrolling ticker for ranks 4–8 to showcase more community participants.
  • Streamlined Top HUD: Clean top status bar displaying current phase, remaining round time, and winner celebrations.

5. Performance & Engine Optimizations

  • Optimized Terrain Destruction: Refactored applyCrater heightmap deformation to eliminate redundant square root calculations during explosions.
  • Standardized Project Layout: Reorganized codebase into cmd/, internal/app/, and web/ packages.
  • Extended Test Suite: Expanded Go tests covering C&C client connections, HMAC authentication, and claim challenge flows, plus frontend Vitest suites for terrain calculations.

📦 Closed Issues

  • #38: Post-game casualty recap with player vs bot font sizing
  • #39: Widen leaderboard and add scrolling ticker for ranks 4-8
  • #40: Move winner avatar into top HUD box and remove redundant celebration text
  • #42: C&C host authentication via in-chat claim, DB settings, and admin console UI
  • #55: Optimize game state broadcast payload for Twitch extension
  • #56: Interactive protractor overlay & mobile UI for Twitch extension
  • #57: Command phase tank avatar markers & enlarged names to OBS overlay
  • #58: Active tank battlefield detection and synchronized input countdown
  • #59: Vertical power slider alongside protractor for mobile UX
  • #60: Reorganize Desktop Overlay: Top Action Bar & Tactical Firing Panel
  • #61: Extend protractor aiming hit area 50% inward on desktop and mobile

🚀 Getting Started

For Streamers (OBS Studio)

Download StreamTanks_windows_amd64.zip (or your OS archive) from the release assets below.
Run the executable:

./StreamTanks -channel <your_twitch_channel> -addr :8102

Add http://localhost:8102 as an OBS Browser Source (1920x1080) and manage your match via the admin console at http://localhost:8102/admin.

For Twitch Extension Deployment

Download extension.zip from the assets below and upload it directly to your Twitch Developer Console version assets.