haxball / haxball-issues

115 stars 43 forks source link

Wrap script inside map file #1442

Open AnddyAnddy opened 3 years ago

AnddyAnddy commented 3 years ago

There are more and more maps becoming playable only if we play them in a room having the matching script, and both are totally dissociated. With no script, the map is useless and unplayable.

Merging both in a .hbs2 file would make things way easier as we do not require a special room to play the map. I'll take the example of one of the most played map in the world, real soccer https://hbanz.org/realsoccer/ With this script, the real soccer map is playable without any human interaction Without, it is unplayable in 2021, and there are plenty of maps in this case, actually most of the top maps in haxmaps: BFF futsal, RS, Volleyball, Ping pong, Mario kart, F1 and the list is long...

genals commented 3 years ago

The other way around is already possible, see your example. Then you just have to share the script and not the map :) It would also be more difficult to implement larger projects, since you could definitely only have one file for the script and the map. I am afraid that the effort for Basro is too great to implement it that way for the benefit that can be derived from it.

AnddyAnddy commented 3 years ago

The purpose is to be able to switch between a dozen of maps in the same room without having a 100000 lines script, everyone can put any map, a few people can host decent rooms with scripts, the benefit would be actually huge

Changing map in a single room is easier than moving from room to room to play with the same people.

genals commented 3 years ago

I think I see your point. You mean that the host offers tools with the script to keep the room going well and all map related things are handled by the script inside the map file?

AnddyAnddy commented 3 years ago

The point is that the functionning playable system of a map doesn't depend on the host's script we play in. The map should be a "standalone", you load it anywhere and you play it and it works, even in non headless host

Basically yes to what you said

AnddyAnddy commented 3 years ago

Typically there are Haxball Olympic Games organized soon, and in order to test the 21 game modes (~16 maps if we remove regular haxball), we litterally need 16 dedicated rooms (or a room bundling some modes) but an "All maps in one script" idea would take thousands of lines Knowing that some modes are more popular than others and there will be ping issues everywhere due to the players coming from all around the world, the room organization is chaotic and would be DRASTICALLY easier if the script to play the map was in the hbs, "invisible" to the players and not technically difficult to make