Page 1 of 1

HTML5 vps update

PostPosted: May 12th, 2018, 8:11 am
by socrates
https://github.com/haxball/haxball-issu ... dless-Host

Basro has released this update to allow for lightweight vps hosting where the game and sounds are not rendered. Anyone able to try? Hopefully its better for people having problems.

I guess this can even be used on regular hosts if the host isn't playing.

To use it go to https://html5.haxball.com/headless and open your browser console (right click and inspect element or F12 Developer tools).
Then on the console tab make sure your layer is the top level html5.haxball.com
Then you can enter commands as detailed by basro.
var room = HBInit({ roomName: "My room", maxPlayers: 16 }); will open a basic 16 man room called My Room.

Re: HTML5 vps update

PostPosted: May 12th, 2018, 10:01 am
by socrates
When I host this way using just my regular host then cpu usage doesn't go above 1%.

Should be good for any cheaper vps which struggled to render the game.

Based on basro's instructions I'm also wondering if the following things are possible:
- set the game to automatically pause if someone types p in chat (even if they arent admin)
- add some voteban or votekick logic to the room

It would be good for hosting pubs as you could leave the room open permanently and it would automatically assign admins if players leave etc.

Re: HTML5 vps update

PostPosted: May 12th, 2018, 3:38 pm
by Yawn
socrates wrote:When I host this way using just my regular host then cpu usage doesn't go above 1%.

Should be good for any cheaper vps which struggled to render the game.

Based on basro's instructions I'm also wondering if the following things are possible:
- set the game to automatically pause if someone types p in chat (even if they arent admin)
- add some voteban or votekick logic to the room

It would be good for hosting pubs as you could leave the room open permanently and it would automatically assign admins if players leave etc.


This would get abused, especially in public by trolls :/

Re: HTML5 vps update

PostPosted: May 12th, 2018, 3:53 pm
by socrates
Yawn wrote:
socrates wrote:When I host this way using just my regular host then cpu usage doesn't go above 1%.

Should be good for any cheaper vps which struggled to render the game.

Based on basro's instructions I'm also wondering if the following things are possible:
- set the game to automatically pause if someone types p in chat (even if they arent admin)
- add some voteban or votekick logic to the room

It would be good for hosting pubs as you could leave the room open permanently and it would automatically assign admins if players leave etc.


This would get abused, especially in public by trolls :/


Well they wouldn't be admin ofc - so anyone doing this would be visible and could be banned.

Another nice thing savi did when testing earlier was a !switch command which would automatically swap all of red and blue team. (not when the game has started ofc).

Re: HTML5 vps update

PostPosted: May 12th, 2018, 5:46 pm
by lajz
I tried that with friend on my vps. He was able to get a bot to write goal scorers on chat (e.g. Team RED scores- goal xy assist yz), getting an admin with "login" (generated token on his site). Sadly we did it on flash, right after HTML came out. We lost motivation to do it since everyone moved to new version of haxball.

Re: HTML5 vps update

PostPosted: January 2nd, 2019, 1:39 pm
by Grep
I did this a $5 VPS [per month] and managed to create a bot which calculates successful passes, goals, assists, etc and determines who was man of the match!