-
Notifications
You must be signed in to change notification settings - Fork 26
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
Tournament overlay #23
base: master
Are you sure you want to change the base?
Conversation
Add GameTickPacket listener
Fix Arrays
Add Tournament Overlay
Add small configurability and fix some issues
Voting system
Before merging we should probably have some kind of setting for changing/refreshing the overlay. We should also let users know the overlay should be 1920x1080 at all times to fit correctly. |
CSS: #votes > div {
...
transition: width 0.5s;
rotation: 180;
} to give votes a smooth transition. |
Another thing to consider is to maybe add the requirements for all bot types to requirements.txt, e.g.
|
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.
I loaded up http://localhost:8000/overlay.html and it seems to work nicely, very cool!
Got one comment though.
@@ -6,5 +6,5 @@ rlbot==1.* | |||
pip | |||
|
|||
gevent | |||
eel |
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.
Doesn't need to be part of this PR, just reminding myself: We should probably copy my branch of the eel source code right into this repo until it gets merged in and published.
If we accidentally publish an installer without my special branch, html, css and js will get cached for a long time on our users' browsers and it'll be a real mess.
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.
https://github.com/tarehart/eel/archive/master.zip
should be used instead then
|
||
|
||
def start(): | ||
gui_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'gui') | ||
eel.init(gui_folder) | ||
|
||
options = {} | ||
packet_reader = GameTickReader() |
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.
If Rocket League is not running, the GUI will hang forever on startup waiting for the dll to be injected.
I'd very much like for the GUI to be able to open without any dependency on Rocket League or successful injection, both for the sake of the user experience, and also to avoid having every single bug related to those get blamed on the GUI.
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.
Any clue how to implement this better?
rlbot_gui/gui/overlay.html
Outdated
SETTING = "RLBot" | ||
EXPERIMENTAL_FEATURES = false | ||
TWITCH_CHANNEL = "rlbotofficial" | ||
FPS = 60 |
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.
This takes up a significant amount of CPU for me, and gui.py is only refreshing the data once per second. I changed this to 1 on mine and it performs much better.
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.
Odd, my CPU doesn't break a sweat. I'll keep this in mind, but the reason it's high is because with lower values the goal splash animation can appear up to a full second too late. As I suggested, we should probably set a config for this stuff.
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.
Ideally we want to do it like this:
eel.start('main.html', size=(1000, 800), block=False, callback=on_websocket_close, options=options,
disable_cache=True)
def refresh_gtp():
global game_tick_packet
game_tick_packet = packet_reader.get_packet()
time.sleep(1/120)
th = threading.Thread(target=refresh_gtp).start()
while not should_quit:
do_infinite_loop_content()
eel.sleep(1.0)
th.join()
Auto-open RL, Nice animation for votes
This will improve accuracy in overlay
Update the packet more often
I think its in a stable enough state...
Do we push to prod? 👀