Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: Dominion replay system alpha is live  (Read 7634 times)

0 Members and 1 Guest are viewing this topic.

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Dominion replay system alpha is live
« on: January 22, 2015, 02:22:37 am »
+13

itshappening.jpg

Since I'm too lazy to do all the web hosting properly, for now it's running through Heroku. URL is http://goko-replay.herokuapp.com/, enter the plain text log url, not the prettifier log url. I'm using the free plan of one dyno - this translates into "please don't make tons of requests and kill the server".

Very minimalist, it's very much still proof of concept, but I think it's sharable.

Click the line in the text log to display game state on that line.

If you run into a bug, first check it's none of the below:
  • It involves Throne Room, King's Court, Procession, or Counterfeit. They're currently not supported. Golem is kind of supported but I'm sure that's buggy too.
  • A card isn't removed from play when it should be.
  • The player bought nothing, then topdecked Alchemist, Scheme, Treasury, etc. during cleanup.

If it's none of those, then please give the log url, turn/line that shows the bug, and describe what's going on. Generally, a player having extra cards is a lower priority bug than a player not having the right card.

The biggest feature to add is showing how many cards you have left in your draw pile and how many actions/buys/money you have. With school starting I can't guarantee I'll be able to implement those promptly, but I do mean to get that working.

Comments/suggestions?
Logged
I have a blog! It's called Sorta Insightful. Check it out?

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: Dominion replay system alpha is live
« Reply #1 on: January 22, 2015, 04:29:29 am »
0

Very nice!

The difference between this and the existing prettifier is that you can see cards in play as well as deck contents, right?

Suggestions: I'd like to be able to look through games using the arrow keys as in the Prismata viewer, right/left for forward/back one step and shifted versions to step by turn instead.  It would also be great to see deck and discard separately so that we can judge decisions that might have depended on deck tracking.
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2706
    • View Profile
Re: Dominion replay system alpha is live
« Reply #2 on: January 22, 2015, 02:56:59 pm »
+1

http://archive-dominionlogs.goko.com/20141113/log.5145ea87e4b0bef57ec871af.1415920394431.txt

Here's a random game where I went for an engine (without +buy?) and later on you can't see all of the cards in your hand or in play because I have too many cards there.  It would be nice to have them go on a new line or something.  It happens on several turns, but just looking for one my turn 21 works.

Also, I don't see any action cards in the supply.

I also second the notion for making your deck and discard separate (maybe having full deck contents somewhere, then draw pile somewhere else, and discard pile somewhere else).

Still, very nice!
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Dominion replay system alpha is live
« Reply #3 on: January 23, 2015, 01:32:27 am »
0

Okay, so I did the HTML in a non-awful way. The cards in play should wrap onto a new line now.

Could you explain what you mean by not seeing any action cards in the supply? Are they not showing up at all, or are they cut off? You may need to click on the hand/play/supply area before scrolling if it doesn't all fit on your screen, since the log and the game state display are tied to different scrollbars.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2706
    • View Profile
Re: Dominion replay system alpha is live
« Reply #4 on: January 23, 2015, 01:36:12 am »
0

They're not showing up at all...
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Dominion replay system alpha is live
« Reply #5 on: January 23, 2015, 01:40:24 am »
0

Screenshot/browser? I'm able to see them on the newest version of Firefox.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: Dominion replay system alpha is live
« Reply #6 on: January 23, 2015, 04:52:20 am »
0

Screenshot/browser? I'm able to see them on the newest version of Firefox.

I see Kingdom cards in Firefox but not in Chrome (which explains why I didn't see that very useful new feature before!).  There's just a blank space under the basic cards where the Kingdom cards should be.
Logged

amalloy

  • Witch
  • *****
  • Offline Offline
  • Posts: 453
  • Respect: +620
    • View Profile
    • Twitch stream
Re: Dominion replay system alpha is live
« Reply #7 on: January 23, 2015, 02:29:17 pm »
0

itshappening.jpg

Since I'm too lazy to do all the web hosting properly, for now it's running through Heroku. URL is http://goko-replay.herokuapp.com/, enter the plain text log url, not the prettifier log url. I'm using the free plan of one dyno - this translates into "please don't make tons of requests and kill the server".

Very minimalist, it's very much still proof of concept, but I think it's sharable.

Click the line in the text log to display game state on that line.

If you run into a bug, first check it's none of the below:
  • It involves Throne Room, King's Court, Procession, or Counterfeit. They're currently not supported. Golem is kind of supported but I'm sure that's buggy too.
  • A card isn't removed from play when it should be.
  • The player bought nothing, then topdecked Alchemist, Scheme, Treasury, etc. during cleanup.

If it's none of those, then please give the log url, turn/line that shows the bug, and describe what's going on. Generally, a player having extra cards is a lower priority bug than a player not having the right card.

The biggest feature to add is showing how many cards you have left in your draw pile and how many actions/buys/money you have. With school starting I can't guarantee I'll be able to implement those promptly, but I do mean to get that working.

Comments/suggestions?

Pillage is shown as in-play even after it's trashed itself. Feast, I imagine, does the same thing. See http://goko-replay.herokuapp.com/replay/?log_url=http%3A%2F%2Fdominionlogs.goko.com%2F20141215%2Flog.516d31dbe4b082c74d7b3391.1418715862074.txt for an example: I play my first Pillage on turn 6, and it's still "in play" until the cleanup phase. This could matter eventually for things like Horn of Plenty.

In Chrome, I also don't see any action cards in the supply. The reason is not hard to see, though. The javascript console shows the error
Code: [Select]
Uncaught TypeError: Constructor Set requires 'new' on line 643, which reads
Code: [Select]
var done = Set(kingdomVictory.concat(kingdomTreasure)); So you want to change that to
Code: [Select]
new Set(...)
Logged

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Dominion replay system alpha is live
« Reply #8 on: January 23, 2015, 05:20:10 pm »
0

Yeah, the Pillage/Feast/Embargo/Hermit trash-from-play thing is known. Basically, it was a case I didn't want to deal with, so I pretend all cards that come into play stay there until end of turn (this also means Duration cards don't stay in play for next turn)

Just pushed a fix for the Chrome bug.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2706
    • View Profile
Re: Dominion replay system alpha is live
« Reply #9 on: January 24, 2015, 01:13:12 am »
0

Screenshot/browser? I'm able to see them on the newest version of Firefox.

I see Kingdom cards in Firefox but not in Chrome (which explains why I didn't see that very useful new feature before!).  There's just a blank space under the basic cards where the Kingdom cards should be.

Yeah, I'm using Chrome.  That's probably it.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Seprix

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5607
  • Respect: +3676
    • View Profile
Re: Dominion replay system alpha is live
« Reply #10 on: January 27, 2015, 02:03:21 am »
0

Cards for Chrome support would be neat.

Things to add would likely be some sort of interface where you can skip between turns and see what is in your hand and opponent's hand using the log as a guide, though that would likely be pretty annoying to do. :/
Logged
DM me for ideas on a new article, either here or on Discord (I check Discord way more often)

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Dominion replay system alpha is live
« Reply #11 on: January 27, 2015, 02:52:22 am »
0

Cards for Chrome support would be neat.

Things to add would likely be some sort of interface where you can skip between turns and see what is in your hand and opponent's hand using the log as a guide, though that would likely be pretty annoying to do. :/

Could you clarify?

The supply card issue should be fixed in Chrome. It works on the most recent version of Chrome on Windows for me, but it may be broken for other OSes/other versions.

I'm also not sure what you mean by interface where you can skip between turns. Right now, if you click on a line in the log, it should show highlight that line and show what's in each player's hand at that time. Something like a play/FF/rewind interface would be nice to have though.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

TheExpressicist

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 200
  • Respect: +203
    • View Profile
Re: Dominion replay system alpha is live
« Reply #12 on: January 27, 2015, 10:29:35 am »
0

Cards for Chrome support would be neat.

Things to add would likely be some sort of interface where you can skip between turns and see what is in your hand and opponent's hand using the log as a guide, though that would likely be pretty annoying to do. :/

Could you clarify?

The supply card issue should be fixed in Chrome. It works on the most recent version of Chrome on Windows for me, but it may be broken for other OSes/other versions.

I'm also not sure what you mean by interface where you can skip between turns. Right now, if you click on a line in the log, it should show highlight that line and show what's in each player's hand at that time. Something like a play/FF/rewind interface would be nice to have though.

Suggestion: use visual images of the cards instead of placeholders. I created the following object which (I think) follows the same format as your script that has a link to each card's image.

http://jsfiddle.net/Lqpmvkee/

Then you could implement by updating createCard:

 function createCard(cardname) {
                var sp = document.createElement("span");
                if (types.hasOwnProperty(cardname)) {
                    sp.className = types[cardname];
                }
                sp.innerHTML = "<img src='"+cardLinkURLs[cardname]+"' width='50'>";
                return sp;
            }
« Last Edit: January 27, 2015, 05:25:40 pm by TheExpressicist »
Logged

flies

  • Minion
  • *****
  • Offline Offline
  • Posts: 629
  • Shuffle iT Username: flies
  • Statistical mechanics of hard rods on a 1D lattice
  • Respect: +348
    • View Profile
    • ask the atheists
Re: Dominion replay system alpha is live
« Reply #13 on: January 27, 2015, 10:43:25 am »
0

http://goko-replay.herokuapp.com/replay/?log_url=http%3A%2F%2Fdominionlogs.goko.com%2F20150126%2Flog.5075b25251c30da02a09b898.1422312253831.txt

Quote
An exception was raised when attempting to construct game states

on chrome and IE for my windows 7 laptop
Logged
Gotta be efficient when most of your hand coordination is spent trying to apply mascara to your beard.
flies Dominionates on youtube

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Dominion replay system alpha is live
« Reply #14 on: January 27, 2015, 06:47:28 pm »
0

http://goko-replay.herokuapp.com/replay/?log_url=http%3A%2F%2Fdominionlogs.goko.com%2F20150126%2Flog.5075b25251c30da02a09b898.1422312253831.txt

Quote
An exception was raised when attempting to construct game states

on chrome and IE for my windows 7 laptop

...ah. Okay, so what's happening here is that I got super sick of trying to get Counterfeit/Procession to work and skipped them to get the alpha online. Except, that means there's no code handling them at all so it makes everything break. I thought I made the backend more redundant in the case where it created the wrong game state, but it looks like I forgot that case.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Dominion replay system alpha is live
« Reply #15 on: February 07, 2015, 02:07:41 am »
+2

Just deployed an update. I'm hitting a wall in getting the parser to track all cards in draw and discard correctly, but I don't think I'll have much more free time in the upcoming future, so I wanted to send out the partial work I have now.

The game state you see is based on how much the backend code was able to parse. If it was able to figure out the draw and discard, it'll display them. If it wasn't, it'll track total cards and cards in hand. If it can't do that, then you're out of luck.
 
Sample game from me played today: http://goko-replay.herokuapp.com/replay/?log_url=http%3A%2F%2Fdominionlogs.goko.com%2F20150206%2Flog.516d4e77e4b082c74d7b91f6.1423271683581.txt

Sample game from the Haggler cage match: http://goko-replay.herokuapp.com/replay/?log_url=http%3A%2F%2Fdominionlogs.goko.com%2F20150205%2Flog.51201cbee4b04e88c8da4f9a.1423183803427.txt
Logged
I have a blog! It's called Sorta Insightful. Check it out?

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3412
    • View Profile
Re: Dominion replay system alpha is live
« Reply #16 on: February 07, 2015, 02:37:33 am »
0

Great work, Titan, I know this is very difficult, so I applaud you for coming this far.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

pubby

  • Minion
  • *****
  • Offline Offline
  • Posts: 548
  • Respect: +1046
    • View Profile
Re: Dominion replay system alpha is live
« Reply #17 on: February 10, 2015, 10:20:22 pm »
0

Is it possible to see how much money and actions you have at a given moment?
Logged

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2854
    • View Profile
Re: Dominion replay system alpha is live
« Reply #18 on: February 22, 2015, 03:10:36 am »
+2

Is it possible to see how much money and actions you have at a given moment?

Had some free time today, so I added this, + VP chip and coin token tracking.

Again, this is only for logs that don't have weird edge cases.
Logged
I have a blog! It's called Sorta Insightful. Check it out?
Pages: [1]
 

Page created in 0.1 seconds with 21 queries.