Starblast Game Recorder

Recording + replay via WebSocket simulation with user data protection

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
Julia1233
日安装量
0
总安装量
3
评分
0 0 0
版本
1.8.8
创建于
2025-11-02
更新于
2025-11-03
大小
37.5 KB
许可证
GPL-3.0-or-later
适用于

📹 Starblast Game Recorder v1.8.8

A powerful userscript for recording and replaying Starblast.io WebSocket game sessions with automatic data sanitization, mouse movement tracking, and frame-by-frame playback control.

🎮 Quick Start

Toggle UI: Press Shift + R to show/hide the recorder panel in the top-right corner.

📝 Recording Features

  • ⚫ START - Begin recording WebSocket messages (incoming/outgoing) + mouse movements
  • ⏹ STOP - Stop active recording and prepare for save
  • 🔄 Auto - Auto-start recording when game data detected (checkbox toggle, persistent)
  • Session Name - Custom naming for recordings (auto-populated with timestamp)
  • 💾 SAVE - Export recording as .json file to downloads folder

Recording Details

  • Captures: All WebSocket messages (↓ incoming, ↑ outgoing) + mouse coordinates (X/Y)
  • Format: Compact JSON with relative timestamps for each message
  • Auto-sanitization: Removes ecp_key, key, steamid, uid before saving
  • File size: Shown in console (KB) before download

▶️ Playback & Replay

  • 📥 IMPORT - Load any previously exported .json recording file
  • 🎬 REPLAY - Start replay mode (creates fake WebSocket for playback)
  • ⏸ PAUSE / ▶ RES - Pause/resume playback during replay
  • ⏹ STOP - Stop playback and restore normal game mode
  • ⚡ Speed Slider - Adjust playback speed from 0.25x to 4x
  • Timeline Scrubber - Seek to any point in the recording

Playback Info

  • Live display: Current time / Total duration
  • Recording metadata: Session name, duration, message count
  • Status indicator: Shows when replay mode is active

🔒 Privacy & Security

Automatic data sanitization: All recordings are cleaned before export:

  • ecp_key → Empty string
  • key → Empty string
  • steamid → null
  • uid → Removed

Safe to share! Export recordings to friends without exposing account credentials or authentication tokens.

Mouse data: Records relative mouse coordinates with screen resolution for accurate scaling during replay.

⚙️ Keyboard Shortcuts

ShortcutFunction
Shift + RToggle recorder UI visibility

💡 Usage Tips

  • Check Auto checkbox to enable automatic recording on game join (persists in localStorage)
  • Session name auto-fills with timestamp format: session_HH:MM:SS
  • Press STOP before SAVE to finalize message count and duration
  • Use high playback speeds (2x-4x) to quickly review long sessions
  • Timeline scrubber allows frame-by-frame navigation during playback
  • Mouse coordinates scale automatically to current window size
  • Replay mode blocks user input to prevent interference with playback
  • Hide UI with Shift+R while recording for clean footage

📊 Status Indicators (Live During Recording)

  • 🔴 Recording - Shows: ↓(incoming) ↑(outgoing) 🖱(mouse moves) | duration
  • Auto Ready / Auto OFF - Auto-record toggle state
  • ⚠️ 100s+ - Triggers if recording exceeds 100 seconds
  • Ready / No data - Idle state or empty recording
  • ✅ Saved! - Confirmation after successful export

🎮 Replay Mode Behavior

  • Fake WebSocket: Creates simulated server connection for clean replay
  • Message delivery: All recorded WebSocket messages replayed in exact order with timing
  • Mouse replay: Mouse movements scaled to current window dimensions
  • User input blocked: Prevents accidental game actions during playback
  • Overlay hidden: Game overlay auto-hides during replay for cleaner view
  • Refresh required: Refresh page after playback completes to restore normal mode

📋 Recording File Format (JSON)

  • n: Recording name
  • m: Array of messages with type, data, relative timestamp
  • d: Total duration (milliseconds)
  • c: Message count
  • v: Format version (1)

🐛 Troubleshooting

  • Auto-record not starting? - Check that "🔄 Auto" checkbox is enabled and game sends valid data
  • Session name field not editable? - Click the text input to focus it before typing
  • SAVE button disabled? - Stop recording first (click STOP button)
  • Replay won't start? - Click REPLAY button first, then join the game
  • Playback stuttering? - Try lowering playback speed or closing other browser tabs
  • Mouse replay inaccurate? - Replay window size should match original recording resolution
  • File not downloading? - Check browser download settings and popup blockers

📝 Technical Details

  • Runs at: document-start for early WebSocket interception
  • WebSocket wrapping: Intercepts send(), addEventListener('message'), and onmessage property
  • Data types supported: Blob, ArrayBuffer, TypedArray, string
  • Playback simulation: Creates fake WebSocket with event listeners
  • Mouse tracking: Records absolute coordinates with screen dimensions

📝 License & Credits

License: GPL-3.0-or-later

Author: Julia1233

View Full License