Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenario option to customize initial view center #2244

Open
byorgey opened this issue Dec 28, 2024 · 2 comments
Open

Scenario option to customize initial view center #2244

byorgey opened this issue Dec 28, 2024 · 2 comments
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. G-World An issue having to do with world design, world generation, etc. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Feature A new feature to be added to the game. Z-User Experience This issue seeks to make the game more enjoyable to play.

Comments

@byorgey
Copy link
Member

byorgey commented Dec 28, 2024

Is your feature request related to a problem? Please describe.
By default, the view always starts out centered on the base robot. But if the base robot is not centered in the map, this can mean that part of the map is off the screen. Of course the user can always scroll the map (unless explicitly disabled) but for scenario design it would be nice to have the option to specify where the view is centered. This would also mean that for such scenarios the view would not follow the base robot as it moves around (unless the player explicitly recentered the view on the base).

Describe the solution you'd like
A new optional viewcenter field under world which takes either a robot name or a location tuple.

@byorgey byorgey added Z-User Experience This issue seeks to make the game more enjoyable to play. Z-Feature A new feature to be added to the game. C-Low Hanging Fruit Ideal issue for new contributors. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. G-World An issue having to do with world design, world generation, etc. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. labels Dec 28, 2024
@byorgey byorgey changed the title Scenario option to customize beginning view center Scenario option to customize initial view center Dec 28, 2024
@byorgey
Copy link
Member Author

byorgey commented Dec 28, 2024

Concretely, we could move the definition of the ViewCenterRule type to the swarm-scenario library, and include a field with this type in PWorldDescription.

@byorgey
Copy link
Member Author

byorgey commented Dec 28, 2024

A few reasons this is trickier than I thought:

  • In the specification of a world we will want to specify a robot to view by name, whereas at runtime it should be specified by RID.
  • There can be many world specifications in a scenario (a default world + subworlds), and each one could have its own view center rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. G-World An issue having to do with world design, world generation, etc. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Feature A new feature to be added to the game. Z-User Experience This issue seeks to make the game more enjoyable to play.
Projects
None yet
Development

No branches or pull requests

1 participant