AGOT_LCG online play via web (again)

By Adun2, in 1. AGoT General Discussion

Hello everyone.

10 days ago, I posted a topic here about me being in the process of learning app development with web-sockets, and thought it a good idea to learn it by doing a web version of AGOT:LCG.

Back then I had sketched an alpha version, a "first draft". I got some feedback from widowmaker93, imrahil327 and dcdennis who recommended me to modify the concept into more of a sandbox where instead of the computer enforcing stuff, players have more freedom and enforce the rules themselves.

I did so, and now I have a new alpha, again a "first draft" of the new concept. You can try it here: aws.atehortua.com/thrones/

To make testing easier than the last time, multiplayer is disabled, so instead of needing to open two browser windows to try it out, you are now welcome to a game where there already is a computer "Dummy".

This way you can test the stuff you can do, like drawing/discarding/playing cards, moving cards around, taking gold, power, etc. The dummy will not do absolutely anything, but it's there, so you can even give the dummy control of some of your cards.

Also, to make testing easier, you don't get a normal/valid/official deck, but instead you get a huge deck with all the 160 cards from the core set. This makes it easy to test any particular card (like Tywin Lannister special gold features).

If there's still anybody around here interested in this, please give this a try, and post your findings here in this thread. I gave it a lot of thought, and the new design is the best fit I could come up with between the sandbox concept a-la-octgn and a web+websockets app. Only seasoned players could tell me wether this new concept shows promise (I've only been playing for a couple months)

I think the information shown on the 'Opponents' tab could be merged with the 'Summary' tab view to show a summary of the game so far, including/comparing both players. This Summary section should also include which round and phase the game is currently in. Also, I think the 'In Play' view should be the default view, where players are at least initially looking at a view of which cards have been played. The window will likely be big enough for most people to show the 'In Play' section, followed by the 'In Hand' section, and last could be the section which is currently at the top of the screen (the console section). The 'Actions' tab seemed to be blank when I would expect to see a list of possible actions to take given the current phase of the round.

vuldin said:

I think the information shown on the 'Opponents' tab could be merged with the 'Summary' tab view to show a summary of the game so far, including/comparing both players. This Summary section should also include which round and phase the game is currently in. Also, I think the 'In Play' view should be the default view, where players are at least initially looking at a view of which cards have been played. The window will likely be big enough for most people to show the 'In Play' section, followed by the 'In Hand' section, and last could be the section which is currently at the top of the screen (the console section). The 'Actions' tab seemed to be blank when I would expect to see a list of possible actions to take given the current phase of the round.

Hi, thank you for your comments.

You have right about the empty actions tab being misleading. I've, changed it so tha ***'s disabled when there is nothing to show inside.

Could you please clarify tour point about the 'In Play' tab being the "default view"? That tab shows which cards a you have played, and since you start the game with no cards played, that tab is empty, so I made the default one the "summary" tab which has the most actions available. I think you meant something specific by "default", that I'm failing to grasp.

About offering actions based on "the current phase of the round", I've been stuck and unable to start developing that part, because I'm unsure about how to do it. In the previous version (I don't know if you tried it) the program had the game workflow coded in, but a few guys here recommended to adopt a more "sandbox" approach. The old way, computer knew what phase it was in, and tried to enforce workflow, but then things like a card that allows for one more intrigue challenge, or certain events, didn't work. This new version went the sandbox way, It's up to the players what phase they are in (and they can very easily launch that extra intrigue challenge afforded by some card, or even go back forgivingly, much more like playing in real life.

Since now it is the players who drive the workflow, I'm unsure about what device to include to allow the computer to be aware of what phase are players in. There could be a moderator (for example: the current first player) with access to actions like "declare the round to have advanced to the next phase". But then that could perhaps be abused by some people when they are 1st player. If I make it a vote, it'd be cumbersome to the players, but perhaps would be better. I don't know. ¿how does OGTN (or your tool of choice) implement it?

About the layout and the window being "big enough", I intend this to work on 7" tablets (and I test it on mine), which is not really that big, and thats why I went with the space-saving tabs. If the layout was a single tall vertical page, it'd require too much scrolling to play on a 7" tablet. I'll experiment a bit with other layouts tho.

Set up a seperate site for this app in my opinion. a place where we can all discuss this thing and get it going into an A+ state. I think it has HUGE potential as a browser based alternative to OCTGN but working out all the kinks using FFG forums as a home base wont work. I look fwd to testing this thing when I have more time.

Please, please take a look at this site: http://www.gempukku.com/gemp-lotr/hall.html

This is a web-based Lord of the Rings TCG site that widowmaker mentioned before. You'll need to sign up but all you need is a user name and password. When you enter the game hall, you'll see players waiting to play and chatting. Click on a "Watch game" tab.

You won't be able to see it, but each player can see their hand of cards along a bottom row that one watching the game can't see, and of course the rest of it will look the same to viewer or player. If you could divide up the page like that, with Plots along one side, a window for stats like power, number of cards in hand, etc., and rows of player areas that resized as cards got added to the "table," I think that would be spectacular.

There are so many features he has built in to that site, like a timer, that are really cool, and best of all, I've never had a crashed game. Even when you lose connection to the server, you can just refresh and pop back in.

I think what you're doing has a ton of potential. OCTGN is great, but not everyone can (or wants to) use it. In fact, I think one could make an argument for automating many/all of the options like you were doing and like LotR does, since we already have a "sandbox" option in OCTGN. There is a lot to be said for how streamlined the automation is, not the least of which is teaching newer players even while it's a bit more unforgiving of misclicks. The sandbox method may mean less coding for you, however, so that you wouldn't have to meticulously write code for each interaction and exception that is possible. I'm just guessing about that, however. But I'd highly recommend you take a look at the gempukku site for some ideas...

longclaw said:

Please, please take a look at this site: http://www.gempukku.com/gemp-lotr/hall.html

This is a web-based Lord of the Rings TCG site that widowmaker mentioned before. ... If you could divide up the page like that, with Plots along one side, a window for stats like power, number of cards in hand, etc., and rows of player areas that resized as cards got added to the "table," I think that would be spectacular. There are so many features he has built in to that site, like a timer, that are really cool, and best of all, I've never had a crashed game. Even when you lose connection to the server, you can just refresh and pop back in.

Hi, thanx for your comments.

I went ahead and checked gemp-lotr. It looks nice. I'm not sure how such a layout coudl support four players, but it definitely looks pretty. I'll think about it to see if I come up with some ideas.

About the automation, the people who recommended the sandbox mode were right. I originally wanted something as streamlined as dominion.isotropic, but this is AGOT:LCG, and when I realized I'd have to become able to clarify every single timing issue, exception, and the hundreds of rules questions in order for it to even work, I knew I'd never have a system "finished enough" for me to play with peace of mind. So even though I had to redo 80% of the code, I went through with it, and I don't think I'm ever going back to the "automated way".

I just uploaded a new version, The Dummy is gone and multiplayer is back on, to allow for checking of the Challenges system, which is very basic (it's just a sandbox, the computer won't even try to check for Stealth, nor add up STR, etc). Altough basic, and alpha, techically now the app allows 2 players to play a game (altough the deck still is "the whole core cards").

Hope u have some time to try it out

dcdennis said:

Set up a seperate site for this app in my opinion. a place where we can all discuss this thing and get it going into an A+ state. I think it has HUGE potential as a browser based alternative to OCTGN but working out all the kinks using FFG forums as a home base wont work. I look fwd to testing this thing when I have more time.

For now there are just not enough people interested to warrant a separate place, but once the need becomes evident, I'll do something about it.

maybe i am dumb but i cant figure out how to get a game started. do you have to play with at least 2 players now? i guess if there is no one there to accept my invite i cannot test at all?

Also, my friend says he is getting this error. Is this a problem on your end or because he is behind a firewall?

Connection to server appears to be broken. This may be due to a temporary network problem or the server has gone is offline or very busy. The connection may return automatically or you may try to reconnect/restart your app."

I am getting this error when loading the web app:

"Ooops..

Connection to server appears to be broken. This may be due to a temporary network problem or the server has gone is offline or very busy. The connection may return automatically or you may try to reconnect/restart your app."

At the same time, dcdennis is using it without this error message on Google Chrome. I have tried this on IE and FireFox.

I am attempting this at work, but am not sure if that has anything to do with it.

What do you think may cause this for me and not others at the same time?

This looks pretty amazing. Keep up the good work!

Hello Adun,

I just wanted to say thank you for creating this, I really am not a big fan of the octgn method of playing and this would be much better in my opinion. Keep up the hard work! If I can do anything to help let me know.

Thanks

dcdennis said:

maybe i am dumb but i cant figure out how to get a game started. do you have to play with at least 2 players now? i guess if there is no one there to accept my invite i cannot test at all?

Also, my friend says he is getting this error. Is this a problem on your end or because he is behind a firewall?

Connection to server appears to be broken. This may be due to a temporary network problem or the server has gone is offline or very busy. The connection may return automatically or you may try to reconnect/restart your app."

Hi. Yes, I went on to test the challenges actions, so I took out the Dummy and re-enabled multiplayer, which means that in order to get through the welcome window into a game window, you need another "player" to join you. You can accomplish this by using two separate broser windows to enter the application, altough one of them has to be in "incognito/privacy" mode (or just juse two different browsers, like Firefox and IExplorer). Then just invite yourself in one window and accept the invitation in the other one

About your friend, I'm not really sure what could be happening. Once in a while the site goes offline for a few minutes when I upload a new version. Firewalls pose no problems, however I know that because of websockets (for bidirectional stuff like instant notification of stuff your opponents do) the game won't work across a proxy.

Bomb said:

I am getting this error when loading the web app:

"Ooops..

Connection to server appears to be broken. This may be due to a temporary network problem or the server has gone is offline or very busy. The connection may return automatically or you may try to reconnect/restart your app."

At the same time, dcdennis is using it without this error message on Google Chrome. I have tried this on IE and FireFox.

I am attempting this at work, but am not sure if that has anything to do with it.

What do you think may cause this for me and not others at the same time?

If you are connecting from a corporate network, I think the most likely culprit would be a coproate proxy. companies often use a transparent/hidden proxy not just to save bandwidth but also to block access to facebook, twitter, etc. This app uses websockets (a permanent TCP connection between server and browser, istead of intermitent requests/responses), which means it can (and needs to) push stuff from the server to the browser (such as changes in the "game world"), but also means it can't possibly work through a proxy.

I'm kind of on the fence about which version I like. The automation has it's perks such as having built in reminders of what you can and cannot initiate challenges with. Checks for Stealth, total STR, it adds power to the houses and characters as needed. Gives you all the options for actions you have available during any given phase, cards you can marshall, and automates phases such as setup, dominance, taxation, and the like. I love the idea. But sandbox is more forgiving of mistakes as you can take back actions as long as your opponent is OK with it.

The more I think about it the more I'm with Longclaw on this. I love the automation option. I can understand if you don't want to go that direction but nothing would be sweeter that having a site like Gemp-LotR for Thrones. We already have a sandbox style system(even though I can't use it) in OCTGN that is widely used. I'm not saying that I won't use your site if you decide to make it sandbox style. I would relish the opportunity to play online on my Mac, cause It will be a cold day in hell when I put that Windows crap on my Macbook. :)

Good luck with the site. It seems a little clunky right now with the different tabs and buttons to click in order to take actions. It is a little confusing on where to go in order to take different actions. Some actions which aren't even available which should be(such as taking a mulligan). Maybe it should be a mix of automation and sandbox. Automate phases like Setup, Plot, Draw, just allow for the option to do player actions when appropriate(pre-plot, post-plot, pre-draw, pre-challenge, etc...) but make phases like marshaling, and challenges more sandbox. I don't know how this would be possible, but maybe the best of both worlds is the way to go here?

After taking into consideration the suggestions from vuldin, longclaw, dcdennis, Bomb, Staton, and SerArthurDayne, I've made many changes to the app.

If you test it now you'll see that:

Main Changes:

* The representation of cards in hand and in play has changed to horizontal, panels of mini-images, somewhat similar to gemp-lotr

* The tabs have been removed, the area below the "console" is now one single page, with different areas, some of which were integrated. You'll find most actions concetrated in the "summary" area.

* Asking the user for choices is no longer performed in an "actions tab" (tab that no longer exists) but in a modal "dialog".

* Players get dealt their 7 setup cards as soon as they enter the game.

Smaller Changes:

*New Action: "Switch plot decks with another player" (required by the Varys Lannister card.

* New Actions related to play attachments in an opponents card (Targaryen style)

* New Actions related to giving control of a card to an opponent and placing it in his play area

* New Action: Mulligan, only available at the start of the game

* Other smaller convenience actions, and cosmetic changes.

* Bug fixes

Hey this is looking very good. Maybe the 'In Play', 'In Hand', and 'Attachments' sections could be combined somehow to better represent what it would look like in an in-person game? It's good that the 'Cards in Play' and 'Attachments in Play' sections are inside the same section of the page, but this isn't all that evident at first glance. I would think the 'Plot card' section should be above your hand and 'In Play' section, since that is the card that best determines what is going on during a specific round. I'm just thinking of ways the layout could be more realistic in comparison to an in-person melee game. Also, It seems that the 'Opponent' section contains information that would best be included in the 'Summary' section.

During the setup phase, cards are played face down until all players have laid their cards down and then they are turned over at the same time. I don't see where the option is to lay down these cards face down during this phase, and really it should always be this way during the setup phase (shouldn't be a choice in other words).

EDIT: Also, I would strongly suggest that there be some work towards including other people in the development and/or maintenance. Think about all the different types of card relationships that can take place just in the core set alone.. there is bound to some problems that will need to identified and worked out. Just allowing for players to submit bugs with the details of their current game automatically included would be a great first step, but I think this type of project would warrant being added to github under a GPL license. This obviously a choice you should make yourself, but the earlier others are able to get involved in the project the easier it will be to get people involved and the faster it will be to ensure this project becomes successful.

Wow, this is developing very nicely. As someone who uses a Mac and never figured out how to get OCTGN to run on his computer, I'm very excited about seeing a browser-based alternative. This has made some fantastic progress in just the last few days.

One suggestion: perhaps have the split between the two halves of the console be vertical instead of horizontal. There's a lot of blank space most of the time on the right of the screen, and so far it seems to require an awful lot of scrolling. I think it would be a bit more functional in a vertical configuration.

it is shapping up nicely. i have another suggestion. you must implement more simplified controls where possible. for example, right now in order to put a card into play you need to scroll to it, click action, then click 'put into play'. This is the most common function in the game and has to be done over a hundred times per match. it really needs to be a simnple drag and drop otherwise this would be a deal breaker for me. too repetitive at the moment.

A few changes added today:

* General re-arrangement of the layout, for it to be more compact, require less scrolling, and waste less of the "blank space on the right", that alpha5099 mentioned.

* The revealing of cards during setup is now simultaneous, as it should be. (Thanx to vuldin for the heads up)

* The revealing of chosen plot cards is now simultaneous, as it should be.

* The "go on to next phase" action was chanegd so that during he setup phase it is not available until all players have chosen setup cards, and during Plot phase it wont be available until all players have chosen a new plot. However, the general flow of phases remains player driven, unlike the original "more automated" version of this app.

* The first button (Current Phase's "Actions") was tuned to include certain actions from decks/hand/pools/opponents that are relevant to the current phase.

* The "attachments in play" panel, won't appear if you have no attachments in play.

A few more changes today, thanks to dcdennis' advice:

The following actions can now be performed by dragging and dropping the mini-card images around:

* Putting a card in play

* Giving control of a card to an opponent (non-attachments)

* Attaching a card to another card of your own

* Attaching a card to a card of your opponent (preserving control of the attachment)

* Returning a card or attachment to your hand

* Move an attachment to a different card (yours or your enemies)

Also, the "Attachment sin Play" panel was shrinked and moved to the right of the "Cards in Play" panel, so as to save space and thus make dragging/dropping easier.

I have my doubts about the possible performance under load of this drag-n-drop (because it's validated server-side), so if you try it, and notice drag-n-drop to be slow, please post about it here.

When I first start a new game, I see that 7 cards are already drawn for me. My first reaction is that I need to start the Setup phase task of playing the cards I can at that point, so I click action underneath the cards and choose to play them that way. This is a mistake from what it seems though, because those cards don't get played face down.

What does seem to work for this step in some way is clicking 'Actions' next to Setup and choosing 'Play cards for a total value of 5 (Setup)'. There are two problems with this method:

  1. Instead of interacting with the cards in our hand (as expected) we need to know to choose this action from an entirely different section of the page. It would make more sense to have this option available from each card's 'Action' button.
  2. When the cards are chosen to be played in this way, the only notification to either player that this has been done is in the console at the top of the screen which says that setup cards have been played by the specific player. I think it would be important strategically to show the cards laid out on the board to both players, but especially to the opponent. The reason is because it will give the opponent information on what to expect when the cards are flipped (ie. how many characters, how many locations, how many shadow cards, etc.). This type of information would be hard to adequately relay by just printing 'player x played this many cards during the setup phase' in the console.

Thanks for the continuing improvements!

Vuldin, I'm afraid I don't understand your second point. You are under no obligation to 'show' your opponent during the setup phase how many of each card type you've laid out- the only information you have is the number of cards that your opponent lays out. "Player x plays #y of cards in setup" seems perfect to me.

This is coming along great !

imrahil327 said:

Vuldin, I'm afraid I don't understand your second point. You are under no obligation to 'show' your opponent during the setup phase how many of each card type you've laid out- the only information you have is the number of cards that your opponent lays out. "Player x plays #y of cards in setup" seems perfect to me.

I don't think anyone would consider this implementation to be inherently flawed if it couldn't work the way I described it above for the players during the Setup phase. At the same time, I think that allowing this functionality (which seems to be the de facto standard for the game) would be understandable and appreciated by some players.

I don't think it is the standard. I would never lay out my setup like that.