-
Notifications
You must be signed in to change notification settings - Fork 54
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
Render map preview on scenario selection screen #1515
Conversation
d109f9b
to
5d13695
Compare
923c9e5
to
6fbffcc
Compare
9911189
to
4c466dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 I have a few nitpicks and questions, but overall I like the improvements and the refactoring. 🙂
I can look into terminal color output - there was a library for pretty Doc, but I think it only had basic colors.
14ea605
to
4fc25c8
Compare
When I do |
4fc25c8
to
fbb80b0
Compare
Yep, had a size zero |
Fixes the lag issue noted in #1515. # Demo 1. First, launch a toplevel scenario: ``` scripts/play.sh -i data/scenarios/blank.yaml ``` 2. Then use <kbd>Ctrl</kbd>+<kbd>q</kbd> to quit to the scenario selection menu. 3. Notice when using up-arrow to select the "Classic" and "Creative" scenarios, there is a delay as the preview is computed for the first time. 4. Finally, when subsequently selecting back and forth between the two again, notice that the lag is gone, as the cache is being used.
Closes #353
Also towards #1415
Also adds a new top-level command to render a scenario map to the console.
Most of the work for this feature entailed identifying the subset of
GameState
that is actually needed for rendering the world, so that the required information can be retrieved from just theScenario
rather than having to instantiate an entireGameState
.Potential follow-ups
classic
orcreative
. May want to do caching of some kind. The other "challenge scenarios" render without perceptible delay.Demos
Scenario selection preview
Command-line map rendering
and