Forums
April 25, 2024, 09:13 PM

Author Topic: HostingBuddy updated  (Read 7768 times)

0 Members and 1 Guest are viewing this topic.

Offline CyberShadow

  • W:A maintainer
  • Full Member
  • *****

  • Moldova Moldova
  • Posts: 173
    • View Profile
    • Homepage
HostingBuddy updated
« on: July 28, 2015, 09:48 PM »
Hi,

As of 2015-07-28 21:30 UTC, an updated version of HostingBuddy is now live on WormNET.

This is mostly an internal overhaul (major restructuring plus port to the latest version of the programming language used), which will allow us to improve it at a faster pace and provide  better integration with other services.

The update does come with two small improvements:

 - HostingBuddy is now on the #PartyTime and #RopersHeaven WormNET channels, as well as #AnythingGoes.
 - Proper timeout detection has been added, which should resolve issues with dropped connections stalling games forever.

If you notice anything broken or out of place, please post here. You can also post feature requests to the HostingBuddy forum on our UserVoice site: http://feedback.worms2d.info/forums/78223-hostingbuddy . I'll be going through the suggestions there this week.

Known issues being worked on:
- HostingBuddy has a Netherlands flag.

On Steam: http://steamcommunity.com/app/217200/discussions/0/535151589908960047/
« Last Edit: July 28, 2015, 10:25 PM by CyberShadow »

Offline j0e

  • Sr. Member
  • ****

  • Canada Canada
  • Posts: 445
    • View Profile
Re: HostingBuddy updated
« Reply #1 on: July 28, 2015, 11:42 PM »
Awesome stuff as always. Thank you for your dedication, Vladimir.

Since you asked, one feature I have often wished for is a map blacklist for HB's wmdb function. This could be stored locally or more complicatedly with a shared blacklist or map rating system. IMO simple and easy would be better though.

The problem this would address is that HB seems to fetch the same poor quality or bugged Wmdb maps over and over again. Maps that have been skipped are often chosen by HB again. The problem is compounded because there is no method via the Wmdb website itself to blacklist or flag offending maps except indirectly with the "complain/suggest" dialog. The lack of a blacklist is especially an issue with my favourite scheme, mole shopper, in which white background soil is very prevalent in the commonly-fetched maps. (I say commonly-fetched because I don't think the selection is purely random ?). White background soil makes it difficult and annoying to discern what is land and what is not. Fetching a lot of maps also can be painful for users with slow internet connections or who are using expensive cellular data to play.

As an extension, if a player joins a game and the host (or HostingBuddy) is using a map that the player has in his local blacklist, it could also warn the player that the map is bad so he could ask the host to change it.


I recently made another more important suggestion in the 'Disconnects' thread, however, that got buried with spam. Just hoping for any comment on this one, if you'll forgive me for posting a non-HB suggestion :-[ ;D:

Short version: unstable wi-fi internet connections often cause games to drop prematurely. The game does not seem to attempt to reconnect, even if the connection outage is very brief. Some kind of "keep alive" feature, in which the game would persistently and aggressively attempt to reconnect, would prevent many disappointing occasions where a very good game ends unnecessarily. This seems like a much simpler alternative to the proposed "resume from replays" suggestion that has been floating around. In my opinion this "keep games alive" feature would be the single greatest possible improvement for WA at this time.


Thanks so much for everything you've done for this game! Everyone appreciates it a lot... just not everyone can speak English or Russian to tell you that :)
« Last Edit: July 28, 2015, 11:44 PM by j0e »

Offline CyberShadow

  • W:A maintainer
  • Full Member
  • *****

  • Moldova Moldova
  • Posts: 173
    • View Profile
    • Homepage
Re: HostingBuddy updated
« Reply #2 on: July 28, 2015, 11:57 PM »
Thanks for the feedback, j0e.

I can't really think of a way to have customized settings without some sort of user registration system, or tying preferences to a nickname (which are impersistent and spoofable).

Are the map problems something we can address directly? HostingBuddy does have a bunch of map  preprocessing code, perhaps we can take advantage of that. Can you describe the problem in more detail, and provide some examples of bad and good maps?

As for the disconnects, yes, I'm aware of the gravity of that problem. It was the reason I started the disconnects thread. Unfortunately, even the simplest solution (attempt to reconnect on a dropped connection) is difficult to execute, because of how complicated and intertwined W:A's network code is (listening for and establishing new connections is something heavily tied to the frontend). It remains very high on our list.
« Last Edit: July 29, 2015, 12:12 AM by CyberShadow »

Offline j0e

  • Sr. Member
  • ****

  • Canada Canada
  • Posts: 445
    • View Profile
Re: HostingBuddy updated
« Reply #3 on: July 29, 2015, 02:15 AM »
The map pre-processing code should be able to fix the problem. The "bad" maps I'm talking about are:
  • Maps that display the "this map does not have black at position 0, please wait" error. These maps end up loading but with ugly white background soil.  I found several examples of these. Eg: http://wmdb.org/16374
  • Maps that have more than 64 colors and destructible terrain. Sometimes HB says "WMDB map requires some processing to fix (Map colour palette is too large (256) but could be reduced to 112.), please wait". Hostingbuddy should check to see if destructible terrain is enabled, and in those cases dither down to a maximum of 64 colors. Eg: http://wmdb.org/6247 In some instances, I noticed that HB does in fact dither the map down from 256 to 64 colors successfully though – eg. http://wmdb.org/23092 (even though I distinctly remember playing this one with white soil before and thus have habitually skipped it since)
  • Maps that are simply uploaded with the wrong (or unconventional) settings for the scheme. For example, roper maps without "water drops", or mole shopper maps with borders or without holes automatically placed. I found many examples of these. Some pre-processing checks could possibly look for some of these things and alert the host. For example: "This roper map does not have water drops. Type !wd to enable them". I can come up with a more comprehensive list if you want. Eg: http://wmdb.org/5068 (no holes), http://wmdb.org/13173 (has a border)
  • Maps which (less importantly) simply don't conform to my personal preferences. For example, I don't much care for ultra-long Rope Race maps that take hours to complete. And some maps are objectively just plain bad, eg: http://wmdb.org/586. But I can live with skipping these maps manually.


As I was searching for examples, I found two things interesting. First, I was not able to find any instances where the map being glitched was HB's fault, without displaying some kind of warning message. Assuming that not giving warnings for maps saved with the wrong/unconventional settings isn’t HB’s fault. Secondly, I realized there are a huge number of maps that I habitually skip every time just due to paranoia of it being glitched.

Would it be possible/feasible to store a personal blacklist locally on each user's PC? That way you don't have to tie nicknames to IPs or anything like that. And with a local blacklist, my personal preferences in maps wouldn’t affect others' ability to play unglitched maps. The only downside seems to be that messing with local files would probably require users to download an update. Perhaps automatic map caching might also then be possible ?.

Anyways, thank you for the response. I’m always happy to provide feedback. Also very glad to know that the disconnects issue is a priority!
« Last Edit: July 29, 2015, 02:17 AM by j0e »

Offline KinslayeR

Re: HostingBuddy updated
« Reply #4 on: July 29, 2015, 08:55 AM »
good, but now please update websnooper, so we are able to host by this, not only join and chat ;] that would be cool

Offline CyberShadow

  • W:A maintainer
  • Full Member
  • *****

  • Moldova Moldova
  • Posts: 173
    • View Profile
    • Homepage
Re: HostingBuddy updated
« Reply #5 on: July 29, 2015, 11:27 AM »
  • Maps that display the "this map does not have black at position 0, please wait" error. These maps end up loading but with ugly white background soil.  I found several examples of these. Eg: http://wmdb.org/16374

OK, there's definitely something going wrong there, since when that map is loaded in W:A, it looks fine. Something to do with how HostingBuddy generates the waLV chunk. I've asked Deadcode so we're investigating.

  • Maps that have more than 64 colors and destructible terrain. Sometimes HB says "WMDB map requires some processing to fix (Map colour palette is too large (256) but could be reduced to 112.), please wait". Hostingbuddy should check to see if destructible terrain is enabled, and in those cases dither down to a maximum of 64 colors. Eg: http://wmdb.org/6247 In some instances, I noticed that HB does in fact dither the map down from 256 to 64 colors successfully though – eg. http://wmdb.org/23092 (even though I distinctly remember playing this one with white soil before and thus have habitually skipped it since)

I suspect this is closely related to the above issue.

One thing to note, though, HostingBuddy does not dither down the map - it simply removes unused colors. W:A expects the host to send them a map with no more than 113 colors, even if some are never used, so HB simply reshuffles and compacts the palette to accommodate W:A's requirements.

  • Maps that are simply uploaded with the wrong (or unconventional) settings for the scheme. For example, roper maps without "water drops", or mole shopper maps with borders or without holes automatically placed. I found many examples of these. Some pre-processing checks could possibly look for some of these things and alert the host. For example: "This roper map does not have water drops. Type !wd to enable them". I can come up with a more comprehensive list if you want. Eg: http://wmdb.org/5068 (no holes), http://wmdb.org/13173 (has a border)

I've pushed out a change that prints such map settings up-front when you load a map, as well as make more settings customizable for both PNG and random maps. We could also enforce map settings in the scheme configuration, e.g. enforce that maps have no borders in mole shopper games (i.e. the default overrides the map setting, but a user setting can override the default). Something like that is already done for Elite (Fruit island maps only, by default).

  • Maps which (less importantly) simply don't conform to my personal preferences. For example, I don't much care for ultra-long Rope Race maps that take hours to complete. And some maps are objectively just plain bad, eg: http://wmdb.org/586. But I can live with skipping these maps manually.

http://wmdb.org/586 seems to be rated low, so HostingBuddy should never pick it. Does it?

Would it be possible/feasible to store a personal blacklist locally on each user's PC? That way you don't have to tie nicknames to IPs or anything like that. And with a local blacklist, my personal preferences in maps wouldn’t affect others' ability to play unglitched maps. The only downside seems to be that messing with local files would probably require users to download an update. Perhaps automatic map caching might also then be possible ?.

It would require protocol changes, which are always a complicated and messy affair. This is basically Internet cookies, but for W:A. If we were to go into that direction, the most beneficial course would probably be to get rid of the chat interface and integrate HB into W:A's interface, (which all is ever so non-trivial of course). For now, I think we should approach the problem from other angles.

Offline Korydex

Re: HostingBuddy updated
« Reply #6 on: July 29, 2015, 12:28 PM »
Elite (Fruit island maps only, by default).
Bad idea imo

Re: HostingBuddy updated
« Reply #7 on: July 29, 2015, 02:39 PM »
What about giving us a skeleton of HB so we can implement our own one that would report league game and so on?

Offline Hussar

Re: HostingBuddy updated
« Reply #8 on: July 29, 2015, 08:40 PM »
what about to implement some helpful informations aabout TUS in HB games??

Offline j0e

  • Sr. Member
  • ****

  • Canada Canada
  • Posts: 445
    • View Profile
Re: HostingBuddy updated
« Reply #9 on: July 29, 2015, 08:51 PM »

OK, there's definitely something going wrong there, since when that map is loaded in W:A, it looks fine. Something to do with how HostingBuddy generates the waLV chunk. I've asked Deadcode so we're investigating.
Awesome! That explains why some of my own maps, which I’ve tested offline, end up with white soil when played via Hostingbuddy. I never figured out why this happened, but felt like a hypocrite for all the times I’ve complained about map authors not testing their maps. :-[

Quote from: CyberShadow
One thing to note, though, HostingBuddy does not dither down the map - it simply removes unused colors. W:A expects the host to send them a map with no more than 113 colors, even if some are never used, so HB simply reshuffles and compacts the palette to accommodate W:A's requirements.
How about an error message, in red, if destructible soil is present and the palette reshuffling fails to get the map to 64 or fewer colors?

Quote from: CyberShadow
It would require protocol changes, which are always a complicated and messy affair. This is basically Internet cookies, but for W:A. If we were to go into that direction, the most beneficial course would probably be to get rid of the chat interface and integrate HB into W:A's interface, (which all is ever so non-trivial of course). For now, I think we should approach the problem from other angles.
Instead of a local blacklist, would it be possible for players to downvote or report bad maps through a HostingBuddy command?

Quote from: CyberShadow
We could also enforce map settings in the scheme configuration, e.g. enforce that maps have no borders in mole shopper games (i.e. the default overrides the map setting, but a user setting can override the default). Something like that is already done for Elite (Fruit island maps only, by default).
Enforcing water drops and borders on for roper maps would be a great idea. Likewise borders off for mole shopper maps. Not all schemes are as simple as roper and mole shopper though. For example, some capture the flag maps are played with a border, but most of them without. The ‘attached scheme’ function helps a lot for the weird outlying cases. Being able to easily downvote maps via Hostingbuddy would be a further improvement.

Quote from: CyberShadow
I've pushed out a change that prints such map settings up-front when you load a map, as well as make more settings customizable for both PNG and random maps.
Is this a recent improvement? Having the map settings up-front is very nice. But it can be hard to notice (due to complacency) when something’s wrong, because most of the maps are saved correctly. It might be easier when previewing several maps if, for example, “with borders” was written with a different color than “no borders”. You’d notice without reading that 4 of the 5 maps you previewed have the same colors for all the options, but one stands out because, ah, it has a border.

All schemes should also display a warning if automatic worm placement is selected but manual placement is forced due to too many worms.  This would help for maps saved with the wrong settings like http://wmdb.org/9191 (mole shopper with no holes). Unwanted manual placement is also common in schemes played with a lot of worms such as Holy War and Bow And Arrows.

Quote from: CyberShadow
http://wmdb.org/586 seems to be rated low, so HostingBuddy should never pick it. Does it?
No, I can’t remember seeing it. I didn’t realize HB chose maps based on rating. Guess this was a bad example!
« Last Edit: July 29, 2015, 08:54 PM by j0e »

Offline CyberShadow

  • W:A maintainer
  • Full Member
  • *****

  • Moldova Moldova
  • Posts: 173
    • View Profile
    • Homepage
Re: HostingBuddy updated
« Reply #10 on: July 29, 2015, 09:10 PM »
Elite (Fruit island maps only, by default).
Bad idea imo

IIRC I got that from the rules of whatever league was running at that time. Nothing is in stone, so we can discuss changing the defaults if there is consensus.

What about giving us a skeleton of HB so we can implement our own one that would report league game and so on?

I can't make the code public. One reason is that it makes some evil things very easy to do, and I've been burned by releasing my code in the past. If you can put together a detailed document of your idea, I could look into implementing it, hopefully wouldn't be too hard. One thing you should keep in mind is that HB can't record replay files, because the on-wire and on-disk formats are quite different.

An alternative idea would be to expose an API which league authors can consume, but we'd need to discuss the exact feature set.

Offline Marko

  • What is custom title lol
  • Jr. Member
  • **

  • Croatia Croatia
  • HCP HCP clan

  • Posts: 84
  • Heart wants what the heart wants
    • View Profile
    • GitHub Profile
Re: HostingBuddy updated
« Reply #11 on: July 29, 2015, 09:11 PM »
Hi!
Not sure if it's update related, or you guys were updating something again, but today (like 3 hours ago) HB started disconnecting periodically.

Not sure what caused it, it started responding very slowly, asking me for allowsnooper all over again for a couple of times.
Sorry if it was server problem, just wanted to point out something may be breaking it. :)
Every time I come back to TUS, I realize my last signature was cringe

Offline CyberShadow

  • W:A maintainer
  • Full Member
  • *****

  • Moldova Moldova
  • Posts: 173
    • View Profile
    • Homepage
Re: HostingBuddy updated
« Reply #12 on: July 30, 2015, 02:49 AM »

OK, there's definitely something going wrong there, since when that map is loaded in W:A, it looks fine. Something to do with how HostingBuddy generates the waLV chunk. I've asked Deadcode so we're investigating.
Awesome! That explains why some of my own maps, which I’ve tested offline, end up with white soil when played via Hostingbuddy. I never figured out why this happened, but felt like a hypocrite for all the times I’ve complained about map authors not testing their maps. :-[

Still looking into this.

Quote from: CyberShadow
One thing to note, though, HostingBuddy does not dither down the map - it simply removes unused colors. W:A expects the host to send them a map with no more than 113 colors, even if some are never used, so HB simply reshuffles and compacts the palette to accommodate W:A's requirements.
How about an error message, in red, if destructible soil is present and the palette reshuffling fails to get the map to 64 or fewer colors?

Hopefully this won't be necessary after the graphics issue is fixed. I've added the map color count to the map description displayed when loading a map (not yet deployed). Note that HostingBuddy has no control over the text color in the game lobby.

Quote from: CyberShadow
It would require protocol changes, which are always a complicated and messy affair. This is basically Internet cookies, but for W:A. If we were to go into that direction, the most beneficial course would probably be to get rid of the chat interface and integrate HB into W:A's interface, (which all is ever so non-trivial of course). For now, I think we should approach the problem from other angles.
Instead of a local blacklist, would it be possible for players to downvote or report bad maps through a HostingBuddy command?

Yeah, we can look at anonymous flagging if other approaches aren't satisfactory. Will need to coordinate this with WMDB probably.

Quote from: CyberShadow
We could also enforce map settings in the scheme configuration, e.g. enforce that maps have no borders in mole shopper games (i.e. the default overrides the map setting, but a user setting can override the default). Something like that is already done for Elite (Fruit island maps only, by default).
Enforcing water drops and borders on for roper maps would be a great idea. Likewise borders off for mole shopper maps. Not all schemes are as simple as roper and mole shopper though. For example, some capture the flag maps are played with a border, but most of them without. The ‘attached scheme’ function helps a lot for the weird outlying cases. Being able to easily downvote maps via Hostingbuddy would be a further improvement.

Can we make a list of some sensible defaults that will apply to the great majority of maps?

Quote from: CyberShadow
I've pushed out a change that prints such map settings up-front when you load a map, as well as make more settings customizable for both PNG and random maps.
Is this a recent improvement? Having the map settings up-front is very nice. But it can be hard to notice (due to complacency) when something’s wrong, because most of the maps are saved correctly. It might be easier when previewing several maps if, for example, “with borders” was written with a different color than “no borders”. You’d notice without reading that 4 of the 5 maps you previewed have the same colors for all the options, but one stands out because, ah, it has a border.

Yes, I implemented displaying the settings yesterday. Can't do much about the color.

All schemes should also display a warning if automatic worm placement is selected but manual placement is forced due to too many worms.  This would help for maps saved with the wrong settings like http://wmdb.org/9191 (mole shopper with no holes). Unwanted manual placement is also common in schemes played with a lot of worms such as Holy War and Bow And Arrows.

Unfortunately HostingBuddy can't predict if the game can successfully arrange all worms on the map, because that requires knowledge of the respective algorithm. Maybe this can be improved from the game's side, such as warning users ahead client-side, or being able to surrender during the worm-placing stage.

I'll add display/control of automatic placement holes to HostingBuddy soon.

Quote from: CyberShadow
http://wmdb.org/586 seems to be rated low, so HostingBuddy should never pick it. Does it?
No, I can’t remember seeing it. I didn’t realize HB chose maps based on rating. Guess this was a bad example!

Sorry, I meant not user rating, but moderator appraisal (good graphics / etc.)


Hi!
Not sure if it's update related, or you guys were updating something again, but today (like 3 hours ago) HB started disconnecting periodically.

Not sure what caused it, it started responding very slowly, asking me for allowsnooper all over again for a couple of times.
Sorry if it was server problem, just wanted to point out something may be breaking it. :)


Yeah, a few crasher bugs as part of the porting. I've been fixing these as the automatic crash reports come in.

Offline CyberShadow

  • W:A maintainer
  • Full Member
  • *****

  • Moldova Moldova
  • Posts: 173
    • View Profile
    • Homepage
Re: HostingBuddy updated
« Reply #13 on: July 30, 2015, 02:51 AM »
what about to implement some helpful informations aabout TUS in HB games??

What information specifically?

TUS and HB are rather distinct entities, hosting doesn't have much directly in common with leagues. Though we've discussed e.g. making !map load maps from TUS as well.

Maybe you mean the Help bot in #Help?

Offline j0e

  • Sr. Member
  • ****

  • Canada Canada
  • Posts: 445
    • View Profile
Re: HostingBuddy updated
« Reply #14 on: July 30, 2015, 05:00 AM »
what about to implement some helpful informations aabout TUS in HB games??

What information specifically?

TUS and HB are rather distinct entities, hosting doesn't have much directly in common with leagues. Though we've discussed e.g. making !map load maps from TUS as well.

Maybe you mean the Help bot in #Help?
I think he might mean adding another way to distinguish HB-hosted TUS games from open public games? The hoster can of course use the !phost (private host) command, but people are sometimes lazy and don’t bother PMing everyone the password. I guess you could write “!thost roper” or !host tus roper” and the game would show up as “TUS Roper for j0e” or maybe better “League Roper for j0e”.


Quote from: Cybershadow
Can we make a list of some sensible defaults that will apply to the great majority of maps?
I’ll try. Feel free to add anything, anyone:

Roper/proper:
-Borders on
-Water drop on

Mole shopper, Shopper, Fly shopper, Fort, Holy war, Burning girders, Bazooka and grenades, Supersheeper, Darts:
-Borders off

All schemes with destructible terrain (Mole shopper, Fort, Holy war, Burning girders, Bazooka and grenades, Capture the flag, Bow and arrows, Sheep fort, ‘Other’):
-Disable “Snow” background soil texture if using a png map. There’s nothing technically wrong with it, but it can be hard to distinguish between the foreground and background. Snow background can be almost as annoying as the dreaded white background.

Quote from: CyberShadow
Quote from: j0e
I've pushed out a change that prints such map settings up-front when you load a map, as well as make more settings customizable for both PNG and random maps.
Is this a recent improvement?

Yes, I implemented displaying the settings yesterday. Can't do much about the color.
Wow, very quick work! I see that it now displays whether a given setting is due to enforced defaults or saved in the map. Is the water level info new too?

Really great work Cybershadow :). Thanks for all the detailed replies.
« Last Edit: July 30, 2015, 05:05 AM by j0e »