
Multiplayer Deck of Cards - pkstn
https://deck.of.cards
======
kissgyorgy
Very cool idea!!! You can basically play ANYTHING with this. The only feature
missing that each player should be able to look their cards only in a way that
others can't see it.

Edit: Oh wow, it's not missing! If you put the card in top of the player icon,
only that player can reveal it, nice!!

~~~
Ascalaphus
What would be nice to really be able to play anything with it, would be a
selection of used cards. That would mean for example choosing if the deck goes
from Ace to King, or from 7 to King, or even if it contains jokers. Even more
advanced would be allowing multiple copies of cards, the game Doppelkopf for
example is commonly played with two cards each of (9)/10/J/Q/K/A for every
suit.

~~~
kissgyorgy
You can actually do that right now by putting unused cards aside, but it is a
little bit cumbersome, because shuffle will put it back.

~~~
pkstn
I mean game editor, I will add that :D

------
xtiansimon
Nicely done. Drag and click works well on my iPhone with my fat fingers. Zoom
also. I found the invisible boundary a little annoying. I laid out a Canfield
base, but found the invisible boundary only when I moved a card up to the
foundation. Grrr.

FWIW. Made me think, why have a boundary at all? Even better, why not have a
snap-to grid you can toggle? A preset layout (save option?) which best lays
out your gameplay.

Great job.

~~~
pkstn
Layout editor is something I've had in mind too – will work it!

------
roesel
This would be amazing to use when playing absolutely any card game with
friends who don't live close enough for a real game.

If this would be open-source and there was an easy way to modify some of the
actions to fit the most common operations to a particular game, it would
likely start as an engine for tons of other games/websites (Pokémon, Magic the
Gathering, Star Realms,...).

~~~
jacksnipe
Cockatrice is okay for Magic: the Gathering, though it could certainly be
improved a lot (I feel like XMage is really of the same flavor).

It’s a shame playing Magic requires a lot more features than, say, Bridge —
this is hardly exhaustive but in addition to needing to be able to put dice on
cards, you need to be able to select and reveal cards at random from all
zones, manipulate the top of your deck, create token cards, and tap/untap
cards. I feel that this presents a large UX problem.

------
hauxir
I made a very similar project:
[https://cardtables.online](https://cardtables.online)

It also offers chat communication and webcam over webrtc!

~~~
pkstn
Cool wow, yeah! I’ve thought about chat feature..

------
itsananderson
Cool idea. I see some weird rendering issues on my retina Mac. Is that a known
issue?
[https://www.dropbox.com/s/uq18mm1q9braipa/Screenshot%202019-...](https://www.dropbox.com/s/uq18mm1q9braipa/Screenshot%202019-06-01%2011.22.09.png?dl=0)

Mainly what I see is the face cards are rendered HUGE and the pips in the
centers of the cards seem jumbled.

I tried playing solitaire, but gave up when it came time to flip through the
deck 3 cards at a time. Going through the first time would be OK. Resetting
for subsequent passes would be really painful.

~~~
pkstn
Wow, that’s really weird, need to look on that..

I will create different game modes, solitaire is definitely one of the first
ones!

------
londons_explore
If someone plays a game with me with this, I'm totally going to be spending
time between every turn in the Dev console figuring out a one-liner to reveal
as-yet unturned cards...

~~~
kissgyorgy
It could be done that server doesn't send the information what card it is
until absolutely necessary, so you could not do that.

~~~
tialaramex
Cryptographers are really interested in card games as a model of information
problems, so there are pre-existing algorithms for how to do stuff for card
games in which different players have different information about the state,
but everybody can prove to their satisfaction that the others aren't cheating
- without a trusted server at all.

[https://en.wikipedia.org/wiki/Mental_poker](https://en.wikipedia.org/wiki/Mental_poker)

~~~
pkstn
Server is the single-source-of-truth and only share the info about card
value/suit when clicking your own card or common cards

------
Kimitri
Love it! Is there a way to select which cards to shuffle? I tried to play
solitaire (with house rules) but got stuck when I wanted to reshuffle the draw
deck.

~~~
pkstn
Hmm.. that would actually require some kind of game editor / custom game mode
– let's see..

~~~
Kimitri
I was actually thinking about a designated shuffling area on the board. All
cards moved to the shuffling area would be shuffled but the rest would be kept
untouched. The area could surround the deck by default.

------
rogerallen
Excellent! I've wanted to make something just like this for our family. Are
you going to work to make the site self-sustaining or is this just for fun?

~~~
pkstn
Both

I have lots of ideas how to make it even more fun! And will open source it
also soon..

------
plorntus
Nice been waiting for something like this. Maybe some ideas can be borrowed
from TabletopSimulator eg. Custom cards etc to allow a larger selection of
games.

~~~
pkstn
I will open source this – let's hope people will create customized
cards/decks!

------
thibautg
That's an awesome domain name! I've tried house.of.cards and it redirects to
deck.of.cards ;-)

~~~
pkstn
Haha yeah, I was lucky to get that

------
YeGoblynQueenne
Nice but I think I found you a little bug. Some of the figures are displayed
with numbers in the corners. It looks like it's the number of the pips on the
preceding or following card.

Frex, my last draw of three cards was: Ace of space, King of hearts, 8 of
diamonds, but the king had an 8 instead of a K in the corners.

Edit: Aw. HN markup removes suit symbols :(

Further edit: It looks like some of your cards are drawn with one image
superimposed on another. So actually the figures that have the numbers in the
corner are a figure with another card that is not a figure on top.

Should be a quick fix :P

Last edit I promise: It looks like this:

[https://imgur.com/a/I9CJqGG](https://imgur.com/a/I9CJqGG)

~~~
pkstn
Oh damn, I’ll fix that ASAP

------
ken
Great idea! The card graphics don't look as nice for me as they did in your
blog post, though: [https://imgur.com/a/RrjMifa](https://imgur.com/a/RrjMifa)

~~~
pkstn
I’m pretty sure that has been some kind of a caching issue, does it work
already?

------
chc-sc
Yoo somebody play my game
[https://deck.of.cards/play/5cf24587743bbd7cc4047e52](https://deck.of.cards/play/5cf24587743bbd7cc4047e52)

------
sdan
Like the animations. Nice simple website.

~~~
pkstn
Thanks! Here’s how they’re done: [https://medium.com/@pakastin/javascript-
playing-cards-part-3...](https://medium.com/@pakastin/javascript-playing-
cards-part-3-animations-7099f9f5dea4)

------
kzzzznot
This is a really cool idea! I'm making a browser poker app just to play with
friends but idea was to have it specific to poker with a similar UI to
pokerstars, 888 etc.

Never considered emulating actually just having a deck of cards on the page,
using the same level of trust you have between people irl. Any plans to add
stuff like chips or scoring?

~~~
pkstn
Maybe, let’s see..

~~~
flavor8
Awesome! Another vote for (a simple way) to do chips.

I've wanted to have poker games with my team (which is distributed) for a long
time. This is 90% of the way there.

Update - I just found pokerchips.io. Check it out; it has a simple interface
which does everything you'd need.

~~~
pkstn
Others have requested chips too, so will add. But first need to open source

------
ColinWright
I'm sure others have reported this, but there's some kind of odd bug:

[https://www.solipsys.co.uk/images/OddPlayingCards.png](https://www.solipsys.co.uk/images/OddPlayingCards.png)

Pretty sure it's wrong to have numbers and Kings on the same card.

~~~
allannienhuis
heh, ya I missed two aces because of that bug :P

~~~
pkstn
Whoops, sorry about that – fixing now!

------
sexyflanders
Today I learned that .cards is a TLD

~~~
pkstn
Haha, yeah

------
looperhacks
Weird. It always yields the same card - shuffling just changes which card

~~~
learnstats2
Move the card off the top of the deck. You are turning only the top card face
up and face down.

~~~
looperhacks
I did that. At one point I had like 10 aces of heart lying on the table.

~~~
pkstn
That's weird. It might've had a bug. Now enhanced a lot and should work so
much better!

------
ddtaylor
Fisher Yates for shuffle?

What is the key scheduling used for multiplayer?

~~~
pkstn
Fisher yates yeah! Server is the single-source-of-truth, so no way to peek
cards

------
wired_devil
Nice! I am only missing a way to move a pile of cards.

~~~
pkstn
That's actually something I've already tested out, so probably coming soon!
Hit test + long-press-and-drag should do it!

------
fiatjaf
Now make a forum where to read replies you have to organize paper on a table.

------
umen
What backend you are using ?

~~~
pkstn
node.js + express + MongoDB + socket.io

