Skip to content

Port state setting sandbox#111

Merged
NicEastvillage merged 12 commits into
masterfrom
state-setting-sandbox
Jun 7, 2026
Merged

Port state setting sandbox#111
NicEastvillage merged 12 commits into
masterfrom
state-setting-sandbox

Conversation

@VirxEC
Copy link
Copy Markdown
Contributor

@VirxEC VirxEC commented Jun 2, 2026

Behavior is extremely similarly to the old v4 sandbox. Uses a canvas, updates at 20hz, can drag objects around.

Add new debug rendering controls and compact UI layout.

"Connecting to RLBotServer..." only happens while it's waiting for a match config.

Everything is reset and the connection gets closed when the user clicks out of the sandbox. Reconnecting with rlbot v5 is super duper fast so it's not an issue and we save on all the processing that would've been happening for no reason.

image image image image image

@NicEastvillage
Copy link
Copy Markdown
Contributor

NicEastvillage commented Jun 2, 2026

Immediate thoughts:

  • The field rendering is missing something that indicates which side of the field is the blue/orange half.
  • Would be cool to have a "Save state" and "load saved state" buttons akin to the "Rewind 5 seconds". Combined with the game freezing, users can setup and repeat any scenario with this.
  • In the debug rendering panel, I think we can remove the "(BOT)" suffix and just do "(SCRIPT)" for scripts.

@VirxEC VirxEC marked this pull request as draft June 2, 2026 15:40
@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 2, 2026

image

@VirxEC VirxEC marked this pull request as ready for review June 2, 2026 17:05
@VirxEC VirxEC requested a review from NicEastvillage June 2, 2026 17:05
@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 2, 2026

image image image image

@NicEastvillage
Copy link
Copy Markdown
Contributor

Speaking of Performance Monitor setting in #114, once the setting can be adjusted in the sandbox, its start value should of course match that in the MatchConfig. Just a note.

@NicEastvillage
Copy link
Copy Markdown
Contributor

There's a random line on the top and right in the canvas. I think the field image is off by 1 pixel in both directions.
billede

@NicEastvillage
Copy link
Copy Markdown
Contributor

Tried it out and found a few things:

If no match has been started this session, the Sandbox page will just say "Connecting..." forever when you try to connect. We should probably indicate that it needs a running match to work. We could for instance add a small message like "waiting for match info..." underneath. Or is that too indirect?

The rendering of the arena is pointless while "Watch Game" is off. I think we should draw some instructions on top of the arena rendering in that case. For example: "Enable 'Watch Game' to drag and drop objects around."
billede

The first time I dragged a bot, I got this error and disconnected. On reconnect, things were working.
billede

Dragging the players/ball around while "Freeze game" is active does not move the players/ball in the game until "Freeze game" is disabled. Is this a core/API issue?

The save/load state does not save/load the angular velocity of the ball - this becomes clear if you save a kickoff state.

Found RLBot/core#167 when toggling bot rendering.

This menu stays open even after you click an item.
billede

@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 5, 2026

Dragging the players/ball around while "Freeze game" is active does not move the players/ball in the game until "Freeze game" is disabled. Is this a core/API issue?

This is a game issue. When the game is unfrozen, everything teleports to where it's supposed to be.

@VirxEC VirxEC force-pushed the state-setting-sandbox branch from 04b6feb to 8f2e0b0 Compare June 5, 2026 02:34
@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 5, 2026

image

@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 5, 2026

If no match has been started this session, the Sandbox page will just say "Connecting..." forever when you try to connect. We should probably indicate that it needs a running match to work. We could for instance add a small message like "waiting for match info..." underneath. Or is that too indirect?

I just changed the text to "Waiting for match start..." which I think is clear and direct.

@VirxEC VirxEC marked this pull request as draft June 5, 2026 04:32
@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 5, 2026

This menu stays open even after you click an item.

I might consider this a separate issue

@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 5, 2026

It works 🎉

image

@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 5, 2026

Implemented the watch game helper text overlay:

image image

@VirxEC VirxEC marked this pull request as ready for review June 5, 2026 16:33
@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 5, 2026

K @NicEastvillage I think I did everything

Copy link
Copy Markdown
Contributor

@NicEastvillage NicEastvillage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some nitpicks. Looks good otherwise! Banger feature.

Comment thread sandbox.go Outdated
Comment thread frontend/src/pages/StateSettingSandbox.svelte Outdated
Comment thread frontend/src/pages/StateSettingSandbox.svelte Outdated
@VirxEC
Copy link
Copy Markdown
Contributor Author

VirxEC commented Jun 6, 2026

This PR is good to go now 🔥

VirxEC added 4 commits June 6, 2026 16:39
- Change SandboxSetRendering from slice to single status
- Emit sandbox:error when connection is lost unexpectedly
- Refactor rendering toggle into separate function
- Update go-interface dependency
@VirxEC VirxEC force-pushed the state-setting-sandbox branch from 16d6116 to c94f096 Compare June 6, 2026 21:43
@NicEastvillage NicEastvillage merged commit 27c66f0 into master Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants