[WIP] dedicated servers

Discussion in 'Work-In-Progress Mods' started by cola_colin, October 10, 2014.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Right
  2. Quitch

    Quitch Post Master General

    Messages:
    5,842
    Likes Received:
    6,045
    One of the issues with this appears to be an inability to reconnect. Is that something modding can fix? The inability to reconnect would unfortunately make this not very useful for tournaments.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Hmm... From memory reconnect works like this:
    1) ask playfab "Am I in a game?"
    2) Use that lobbyid playfab returned to get the ip : port of the server
    3) reconnect

    If this is correct one needs to manage the steps 1 and 2 by hand. A first attempt to test if this assumption is correct would be to setup a server with spec-slots, have a player disconnect on purpose and try to reconnect by making the servers list show games that can be spectated or use the direct ip connect mod with your servers ip and port.
    If the server is intelligent enough to go "hey I know you! You're a player, there you go!" then my assumption is correct and we could build a little more code to have that "reconnect" button to show up.
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    https://forums.uberent.com/threads/wip-connect-buttons.65096/

    First draft of reconnect last night; needs lots of testing, and I haven't really looked into how the custom servers enter the game, but it looks like they use connect_to_game, so I should be able to capture the info.
    proeleert and cola_colin like this.
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I do this to enter a custom server:
    sessionStorage['gameHostname'] = '"176.31.115.99"'; sessionStorage['gamePort'] = '53999';window.location.href = 'coui://ui/main/game/connect_to_game/connect_to_game.html';
    proeleert likes this.
  6. Hexadecibel

    Hexadecibel New Member

    Messages:
    10
    Likes Received:
    6
    I'm getting the following error when I start the server:

    [17:02:32.614] INFO GameServerImpl::resetModUpdateAuthToken: Auth token reset to "5e6f2bbb-f130-4f03-9e9f-468497d2cd7f"

    [17:02:32.660] ERROR Script error: SyntaxError: Unexpected token ILLEGAL
    at loadState (main:115:17)
    at Function.forEach (thirdparty/lodash:3297:15)
    at main:121:3

    And apparently "sudo add-apt-repository ppa:chris-lea/node.jvims" doesn't work. was this meant to be "ppa:chris-lea/node.js"?

    EDIT:
    Got it working. Looks like I was using fancy quotes from the text editor. For anyone else with this issue, make sure you're using a a text editor that doesn't screw you over.
    Last edited: October 24, 2014
  7. squawkers13

    squawkers13 Member

    Messages:
    58
    Likes Received:
    11
    Is anyone running one of these?
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Yes, you can see a human readdable list of servers online here: http://planet.unfix.org/paservers/
    As you can see most of them run an outdated version of PA and therefore are invisible unless you happen to use that old version of PA as well.
    I've updated the Opteron server, which is the one I manage. There seems to be something wrong with the ingame name, which is displayed as undefined, but apart from that it seems to work.
  9. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
  10. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    @fuzzels how often does the human readable version update? The server I updated for some reason is not displayed, even though it is in the plain json
  11. ollic

    ollic New Member

    Messages:
    10
    Likes Received:
    9
    Does somebody know a way to query infos like current sim fps, player count or unit count from the server?
    I had the idea to make nice Munin graphs out of this...

    I know there is a built-in http server, but i didn't managed to get anything useful out of it.
  12. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I don't think the server side api has that info right now. The clients send it to pastats.com though, unless they decide to disable that.
  13. ollic

    ollic New Member

    Messages:
    10
    Likes Received:
    9
    i see.. i think i have to do a feature request then ;-)
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    @fuzzels Your server is still running the outdated 73939 ;)
  15. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    Thanks for noting. Apparently though the forum software does not seem to spam me thus I did not get a notice that way. Good that sometimes I peek in the forums though ;)

    It is now at 74525.

    I've also updated http://planet.unfix.org/paservers/ so that it shows the location of the server based on the given IP addresss and what the RIR tells us about it.
  16. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    75539 is out ;)
    cola_colin likes this.
  17. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    As I mixed up PTE and stable build editions, I fixed that situation by doing the trick from the palauncher.go and fetching the version numbers from the uber server.

    Thus http://planet.unfix.org/paservers/ now properly shows which edition one is running and/or if it is outdated.
  18. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
  19. ch1ll4x

    ch1ll4x New Member

    Messages:
    5
    Likes Received:
    2
    That's a great idea, would make life significantly easier!

    My only concern is storing the password on the box. I was tempted to write a 2-bit website that you could punch in your login details, then trigger the update, etc but never got around to it.
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    It's only your playfab password anyway, isn't it? A copy of PA is 6$ during sales.
    The main issue with auto updates is that it is rather hard to automatically apply modifications to the server scripts.

Share This Page