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

Add Story Mode Support #93

Merged
merged 82 commits into from
Jun 24, 2020
Merged

Add Story Mode Support #93

merged 82 commits into from
Jun 24, 2020

Conversation

azeemba
Copy link
Contributor

@azeemba azeemba commented Jun 23, 2020

This PR adds support for Story Mode in RLBotGUI.

Since this is a large review, here are some groupings of files to help:

Existing files that changed:

All of these were updated mostly to just add integration points between the existing GUI and Story Mode

rlbot_gui/gui.py
rlbot_gui/gui/css/style.css
rlbot_gui/gui/js/main-vue.js
rlbot_gui/gui/js/main.js
rlbot_gui/gui/main.html

Entrypoints

These are the files that are the main entry points for the Story logic.

rlbot_gui/gui/js/story-mode.js
rlbot_gui/story/story_runner.py

RLBot Specific logic

rlbot_gui/story/story_challenge_setup.py does all the heavy lifting of match creation and state updating
rlbot_gui/story/bots.json
rlbot_gui/story/challenges.json

Critical files

These are the files that have most of the important logic

rlbot_gui/story/story_challenge_setup.py
rlbot_gui/gui/js/story-challenges.js


Screenshots:

Navbar buttons

The button is disabled when it doesn't apply and have a tooltip when disabled.

rlbot-all-enabled

rlbot-state-setting-disabled

rlbot-story-disabled

Story Mode

rl-story-mode-udpated-start

rl-story-mode5

rl-story-mode10

Fixes #89 and fixes #90

Set the min and max height so the side bar remains reasonable.

Unrelated change couldn't be split out easily: renamed couple of story
css rules.
Since most match stats are 0's, we remove them. Maybe they will
work at some point but no point in cluttering the state
with it.

We also add a timestamp and upgrades/currency
The value can be 0, so can't do a simple boolean check
The goal is to have a declarative representation with some
keywords to trigger specific behaviors/restrictions.
Also show "completed" challenges differently
We refactored so only the story-challenges component has to worry about
it. We show different content when a player wins or loses.

We also change the selected city if the previous city has been
completed
The popup is also hooked up to show error if
not enough teammates are recruited.

Clicking ok launches the game too
Copy link
Contributor

@tarehart tarehart left a comment

Choose a reason for hiding this comment

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

This is a really nice piece of work! Feel free to ignore some of my comments, I think it's in good shape.

rlbot_gui/gui.py Show resolved Hide resolved
rlbot_gui/gui/imgs/story/sources.txt Show resolved Hide resolved
rlbot_gui/gui/js/main-vue.js Outdated Show resolved Hide resolved
rlbot_gui/gui/js/story-challenges.js Show resolved Hide resolved
rlbot_gui/gui/js/story-mode-start.js Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Outdated Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Outdated Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Outdated Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Outdated Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Outdated Show resolved Hide resolved
Copy link
Contributor Author

@azeemba azeemba left a comment

Choose a reason for hiding this comment

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

Thanks for that detailed review, it was very helpful!

rlbot_gui/gui/imgs/story/sources.txt Show resolved Hide resolved
rlbot_gui/gui/js/main-vue.js Outdated Show resolved Hide resolved
rlbot_gui/gui/js/story-mode-start.js Show resolved Hide resolved
rlbot_gui/story/bots.json Outdated Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Outdated Show resolved Hide resolved
rlbot_gui/story/story_challenge_setup.py Outdated Show resolved Hide resolved
Copy link
Contributor

@tarehart tarehart left a comment

Choose a reason for hiding this comment

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

Looks good! I'll ask a few people if they want a chance to review, then merge.

@tarehart tarehart merged commit 67e8670 into RLBot:master Jun 24, 2020
@azeemba azeemba deleted the story-rebased branch June 24, 2020 02:12
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.

Story Mode should block starting if RLBotPack is not already downloaded Add Story Mode support into RLBotGUI
2 participants