Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Experimental webserver (http://angband.oook.cz/forum/showthread.php?t=8378)

Gwarl May 7, 2017 21:00

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:

http://angband.live/

The code for the server is here:

https://github.com/OwenGHB/angband-webclient

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.

Estie May 7, 2017 22:46

So how do i create an account ? :)

Gwarl May 7, 2017 23:47

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.

bio_hazard May 9, 2017 02:55

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.

Gwarl May 9, 2017 12:50

Quote:

Originally Posted by bio_hazard (Post 120628)
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.

Gwarl May 17, 2017 20:23

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.

Gwarl May 23, 2017 22:16

The site is back up at a new address:
http://angband.live
Includes an extra variant, the development branch of V, and a live borg

Nick May 23, 2017 23:27

Quote:

Originally Posted by Gwarl (Post 121089)
The site is back up at a new address:
http://angband.live
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.

Gwarl May 23, 2017 23:49

Quote:

Originally Posted by Nick (Post 121092)
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.

Estie May 24, 2017 00:14

No way to display borg equipment and other stats ?


All times are GMT +1. The time now is 16:06.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.