haxball / haxball-issues

115 stars 43 forks source link

Option for loading headless rooms quickly #893

Open Wazarr94 opened 5 years ago

Wazarr94 commented 5 years ago

Hello, it's me again.

Many times, for training, for competitive match or for a random public room, i create my own room using the haxball standard menu.

And everytime I think : "Damn, creating manual rooms like we used to now completely sucks, when compared to headless rooms". The problem of the headless API is that we need to go on a separate website, copy paste our code, and then we got access to the room. It's time everyone can access the magic of headless API.

The solution I imagine in my dreams is the following dialog menu:

image

First, a button that would allow us to load a script from our computer Second, a button that would allow us to load the last 3 scripts we loaded, as they are stored in IndexedDB. Third (which doesn't appear on the image), basic scripts provided by HaxBall (if you need some, I would be glad to help).

Thanks for watching, hopefully the image made you as excited as I am.

anarcer commented 5 years ago

If we do decide to implement something like this, Basro please don't drop the support for current way of loading scripts. The advantages of current method:

You are able to append other library scripts that your current script may rely on. (You won't be able to do this in just one js file, because the object from library script in a browser pack can't' be loaded in the same execution as the bot script). So we won't be able to use other library objects in our scripts if we only have the ability to specify one js file for the bot script.

Do think this is a neat idea, just want to make sure we aren't breaking backward compatibility here for some of the other scripts.

Wazarr94 commented 5 years ago

Are you talking about the plugin systems like haxroomie or haxilium does ?

Because otherwise, most of the scripts in haxball are just 1 js file that doesn't rely on anything else. Also, in my head, it's something that loads simple scripts. If that feature got implemented, it would mostly be for using a training script.

The headless page should stay up obviously !