Experimental webserver

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gwarl
    Administrator
    • Jan 2017
    • 1025

    Experimental webserver

    Okay I know I have two threads already but for the sake of having a releveant title here's a new one.

    I've set up a server where you can login and play angband or an available variant online:

    A home for angband on the web. Play games, upload characters, join discussions.


    The code for the server is here:



    It's still very much in an experimental stage. It isn't pretty yet but you can play angband on it.

    Features I'm going to add soon are spectating, recording, and watching recorded games. I want to add simple per-game chatrooms where spectators can comment on live games. Then there are long term plans I have - I'll keep the thread updated as I go.

    Pull requests etc welcome.
    Last edited by Gwarl; May 23, 2017, 21:17.
  • Estie
    Veteran
    • Apr 2008
    • 2347

    #2
    So how do i create an account ?

    Comment

    • Gwarl
      Administrator
      • Jan 2017
      • 1025

      #3
      Hitting register once gives the 'confirm password' field, if you hit register again and the passwords match you get an account. It's surprisingly hard to make login forms that aren't horribly confusing - I know this one needs work, I just thought I'd send it live rightaway rather than waiting to get everything perfect.

      Comment

      • bio_hazard
        Knight
        • Dec 2008
        • 649

        #4
        Cool- Angband worked (via Firefox on OSX if it matters). It feels a little slower than normal but not too horrible. I'll have to figure out the commands- tried to quit and ended up closing out my whole browser lol.

        Definitely excited to try Pos- I haven't played yet because of the whole osx thing.

        Comment

        • Gwarl
          Administrator
          • Jan 2017
          • 1025

          #5
          Originally posted by bio_hazard
          Cool- Angband worked (via Firefox on OSX if it matters). It feels a little slower than normal but not too horrible. I'll have to figure out the commands- tried to quit and ended up closing out my whole browser lol.

          Definitely excited to try Pos- I haven't played yet because of the whole osx thing.
          The angband process is actually running on the remote server so there will be latency depending on your connection (the server is in Europe). This means it will be straightforward to add spectating facilities.

          Although now I think about it if angband were compiled directly into wasm one could serve up binaries to be run on the client and then open a socket to the server to share the output between users, which would alleviate the cpu load on the server. It would not be quite as secure against cheating but that probably isn't a huge concern. I might try that at some point, but this works for now and I need to build interfaces for the site anyway.

          And yeah, making it easy to try new variants without hunting them down and compiling them was a big motivation behind doing this. The setup process for each variant is slightly different though. I'll start adding more in one by one, Sil is a high priority but it's particularly difficult to work with and will need me to make a few changes to the code to get the directory/save file handling more in line with other variants.

          It would be nice to eventually get the entire angband plus repository compiled and available to play.
          Last edited by Gwarl; May 9, 2017, 11:57.

          Comment

          • Gwarl
            Administrator
            • Jan 2017
            • 1025

            #6
            Spectating games is now possible (the list of live games is somewhat buggy), but will be more fun after I add a chat box - possibly embedding the irc channel. Code changes are on github. In no particular order the other things to do next are updating poschengband to the latest version, adding routines to get, compile and replace the latest version of the V development branch, use ttyrec for recording games, and provide links to download character dumps. Expanding the list of variants would also be nice (NPP and ToME 2.4.~ are at the top of the list. No Sil yet, sorry).

            After all that, I'll add a game mode to use a current competition savefile/variant, hopefully by the time the next one comes around.

            Comment

            • Gwarl
              Administrator
              • Jan 2017
              • 1025

              #7
              The site is back up at a new address:
              A home for angband on the web. Play games, upload characters, join discussions.

              Includes an extra variant, the development branch of V, and a live borg

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9637

                #8
                Originally posted by Gwarl
                The site is back up at a new address:
                A home for angband on the web. Play games, upload characters, join discussions.

                Includes an extra variant, the development branch of V, and a live borg
                Excellent.

                One slight issue with the borg - when I first go to it, the sidebar doesn't show (or sometimes shows partially and with some other stuff in it), then after a while it appears and is all good after that.
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • Gwarl
                  Administrator
                  • Jan 2017
                  • 1025

                  #9
                  Originally posted by Nick
                  Excellent.

                  One slight issue with the borg - when I first go to it, the sidebar doesn't show (or sometimes shows partially and with some other stuff in it), then after a while it appears and is all good after that.
                  Yeah, it happens when spectating any game and I know why. When things happen on the screen in angband, it only modifies the characters which have changed, and when you spectate you're getting updates, but not the set of characters that are leftover which the player can see. I tried caching outputs but that slowed things down considerably. Then I tried using a hack and sending the player a single command to hit ^R when a spectator connected - but the libraries I'm using for the terminal emulator aren't very well documented and I'm not sure how to send it escape sequences and although angband will recognise the characters ^R as a refresh screen command it could be disruptive to a player or the borg. I'm pondering how best to solve it. I might just have been caching frames badly.

                  Next is working on an inline chat (the borg might get an alice style chatbot), recording games and providing links to character/screen dumps etc.

                  Comment

                  • Estie
                    Veteran
                    • Apr 2008
                    • 2347

                    #10
                    No way to display borg equipment and other stats ?

                    Comment

                    • Gwarl
                      Administrator
                      • Jan 2017
                      • 1025

                      #11
                      Originally posted by Estie
                      No way to display borg equipment and other stats ?
                      There should be 3 other panels, but I think I might have accidentally deleted the .prf file. I'll take another look at it tomorrow but I want to just leave this borg run a little while and see how it is in the morning. There's no routine yet for automatically starting/restarting the borg. Eventually there'll be a metaborg, who manages a small family of borgs, adjusting their borg.txt files and monitoring their performance. Although it would probably be more helpful to see what parts of the borg could be recycled for a new borg that will play 4.1

                      Comment

                      • Estie
                        Veteran
                        • Apr 2008
                        • 2347

                        #12
                        Originally posted by Gwarl
                        There should be 3 other panels, but I think I might have accidentally deleted the .prf file. I'll take another look at it tomorrow but I want to just leave this borg run a little while and see how it is in the morning. There's no routine yet for automatically starting/restarting the borg. Eventually there'll be a metaborg, who manages a small family of borgs, adjusting their borg.txt files and monitoring their performance. Although it would probably be more helpful to see what parts of the borg could be recycled for a new borg that will play 4.1
                        Oh and while youre at it, please please make it use randarts! I want to see some silly equipment, and what better way to fish for it that having a tireless borg working.

                        Comment

                        • Pete Mack
                          Prophet
                          • Apr 2007
                          • 6883

                          #13
                          This is great! I forgot how lousy a player the Borg is. Just saw it melee a red jelly. :/ (And no, it's not a HT.) Playing CL27, DL9.

                          Comment

                          • Pete Mack
                            Prophet
                            • Apr 2007
                            • 6883

                            #14
                            Gwarl--what version of angband is it? If it's a new one, can you post the updated source to the Borg? It'd be fun to work on strategy. I've always been put off by working on the mechanics.
                            Edit:
                            Never mind. I see above. (3.0.x)
                            Last edited by Pete Mack; May 24, 2017, 02:54.

                            Comment

                            • Estie
                              Veteran
                              • Apr 2008
                              • 2347

                              #15
                              Kobold warrior. It hasnt died yet, so thats something.

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎