Posted March 11, 2026 by Pirate Games
Sandbox Mode:
F8 (or L2+R2 on controller) from demo mode enters sandbox mode.
Existing bot seamlessly becomes player-controlled.
Enemies scatter and stop spawning (reusing invader mode logic).
global.sandbox_mode flag added throughout the codebase.
Spawning System:
F2 spawns a hostile (invader) bot — targets player and sidekick bots.
F3 spawns a friendly (sidekick) bot — targets invader bots only.
F11 removes last spawned bot (LIFO stack).
Hard cap of 10 bots.
Bot slots free up when bots die naturally.
sandbox_bot_stack and sandbox_bot_count track everything in obj_game.
Allegiance System:
New flags: is_invader_bot and is_sidekick_bot on obj_player.
New flags: from_invader_bot, from_sidekick_bot, owner on all hitbox objects.
Sandbox collision blocks added to all 6 hitbox collision events.
Friendly fire correctly prevented based on allegiance.
Bot AI:
Sandbox bots use a copy of invader AI but with dynamic target finding.
Target finding scans all obj_player instances and picks nearest hostile.
No target → bot walks to arena centre and idles.
Player Control:
F1 hands off control to AI (becomes sidekick bot).
F1 again reclaims control of watched sidekick bot.
F1 when no player exists spawns a fresh player instance.
global.sandbox_f1_used flag prevents double-firing on same frame.
Player respawns in centre with 3 seconds invincibility (alarm 10).
Visuals:
Sidekick tinted gold in sandbox mode.
Invader bots keep the cyan invader tint.
Player has no tint.
"SANDBOX MODE" flashing text drawn from obj_game's draw GUI.
Screen flash only triggers when player-controlled instance is hit.
Bug Fixes:
Sandbox bots no longer trigger leaderboard/game over on death.
global.demo_mode_dying no longer incorrectly set when sandbox bots die.
snd_you_lose no longer plays when sandbox bots die.
global.sandbox_mode correctly blocks room progression and enemy respawning.
Input condition updated so sandbox bots don't copy player inputs.