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

Tournament overlay #23

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Tournament overlay #23

wants to merge 22 commits into from

Conversation

IamEld3st
Copy link
Member

I think its in a stable enough state...
Do we push to prod? 👀

@Martmists-GH
Copy link
Member

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.

@Martmists-GH
Copy link
Member

Martmists-GH commented Mar 6, 2019

CSS:

#votes > div {
    ...
    transition: width 0.5s;
    rotation: 180;
}

to give votes a smooth transition.

@Martmists-GH
Copy link
Member

Another thing to consider is to maybe add the requirements for all bot types to requirements.txt, e.g.

selenium
websockets
openpyxl
tabulate
...

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.

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
Copy link
Contributor

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.

Copy link
Member

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()
Copy link
Contributor

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.

Copy link
Member

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?

SETTING = "RLBot"
EXPERIMENTAL_FEATURES = false
TWITCH_CHANNEL = "rlbotofficial"
FPS = 60
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member

@Martmists-GH Martmists-GH Mar 8, 2019

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()

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.

3 participants