Wow, thanks for sharing my Deck.of.Cards project! Just to let you guys know, this one is the old version. Newer version is in the root https://deck.of.cards
Old one has nicer animation treats, but the new one has multiplayer as well :)
I played a game of solitaire but as I was moving my kings onto their suit's stack at the end I triggered the joker easter egg and the entire deck got put back into one pile :(
Mentioning this got me to play a game of solitaire with it as well. The primitiveness of it felt oddly fun. An yes, I did the exact same thing when went to put my last king back.
Really cool stuff. I like how "heavy" the cards feel during the animation.
I've been working on something similar, but for arbitrary index card notes and played around with some very basic animations. You can see a quick video of it here [1]. After I got a basic prototype working, there was just something satisfying about collecting all the cards, shuffling them, and then re-distributing them into a grid.
I noticed that deck.of.cards doesn't have a flip animation, but maybe that's a good thing. The typical animation you see when a card is just flipped by rotating about one of the axes just "feels" wrong to me. It breaks the illusion somehow, but maybe there's a better way to do it.
EDIT: Turns out the following behavior is intentional, but I'll leave the statement here so the child comments make sense.
I wanted to point out what may be a bug .. if I quickly drag a face-down card off the deck and release the LMB right away, it flips face-up, however if I leave the mouse button depressed for ~0.5s, it stays face-down. Maybe this is intentional, but I feel like it's a bit of a weird behavior either way.
I think it's a feature, works really nicely on a phone - if you tap, flick the card and quickly release, it lands face up as if you're throwing the card on the table as you deal. Whereas if you drag it more slowly into place, it will remain face down as if you are sliding it on the table. Feels pretty natural on touchscreen.
I tried setting up a game of solitaire (on desktop with a mouse) and it got tedious really fast. What I wished for right away was:
- Ability to drag a selection region and move multiple cards together (like, say, the deck)
- Ability to align cards to each other (I found myself testing modifier keys while dragging to see if this was a hidden feature, but alas.)
I think rather than dragging a region, which might get fiddly, I’d like to be able to hold down on a card and have it make a deck with all of the other cards it’s overlapping.
Also, the cards in the should-be-face-down deck seem to sometimes be face-up when I remove the top card. I played with it a bit before dealing cards, though, like "fan," "sort," "poker," etc, so I'm thinking maybe it doesn't properly reset the face-down-ness when you click "shuffle."
FWIW I don't think the Kings easter egg is a good idea as-is. Maybe require a modifier key like "Click the kings while holding down the `K` key." Otherwise someone might have to click all kings while playing Free Cell and have their game ruined, that's no fun.
Oh man this would be awesome to have as a shared web space where I could play arbitrary card games with friends like a hyper restricted Tabletop Simulator.
That, but through a federated local bluetooth mesh instead of a server is something that I'd appreciate a lot. Restricted to in-person opportunities, but liberating from not only the need for a deck but also from the need for a reasonably suitable table surface. And obviously a play on the "everybody just starting at their phones instead of interacting" trope.
Something like that could be a fantastic foundation for prototyping deck-based (e.g. Hanabi, Exploding Kittens) board games. With a little automation, you could go from the latest design file to a virtually playable deck in seconds.
I think the website linked might be a tip of the hat to the Turkington cut of Deck of Cards. It wouldn't be the first time; I've seen many other websites posted here that mention "codes", which insiders know are references to another of Gregg's characters, the great agent Kinkton from Decker Classified (15 minutes run time).
I don't know how people hate on Flash. A teenager could make great games that ran at 60fps on a Pentium II. Today we're impressed that you can slide some cards around with Javascript.
It needs some form of multi-card selection, so that I can grab a stack of cards and move, shuffle, or flip them as a group. I tried to play a game of solitaire, then got to the part where you can reuse the cards in your discard pile, and realized that there was no way to have it shuffle those cards, or even to just flip them all over.
It would be cool if when I clicked and dragged a card and let go of the mouse button, the cards slid a bit, to simulate them sliding them across the table.
I could see some people not liking that though, best to make it configurable.
One (very small) nitpick on mobile: it’s very hard to press the ‘Sort’ button, as the ‘Fork me on GitHub’ logo covers most of the button. Other than that, this is great!
multiplayer card games on android. Keep you own hand private. See the cards on the table. Took more than a weekend, but I knew nothing of android or kotlin at the time.
[+] [-] pkstn|3 years ago|reply
Old one has nicer animation treats, but the new one has multiplayer as well :)
[+] [-] graypegg|3 years ago|reply
[+] [-] wpietri|3 years ago|reply
[+] [-] moss2|3 years ago|reply
[+] [-] allenu|3 years ago|reply
I've been working on something similar, but for arbitrary index card notes and played around with some very basic animations. You can see a quick video of it here [1]. After I got a basic prototype working, there was just something satisfying about collecting all the cards, shuffling them, and then re-distributing them into a grid.
I noticed that deck.of.cards doesn't have a flip animation, but maybe that's a good thing. The typical animation you see when a card is just flipped by rotating about one of the axes just "feels" wrong to me. It breaks the illusion somehow, but maybe there's a better way to do it.
[1] https://mastodon.social/@allenu/109952125506805902
Edit: You may need to hover over the GIF in the link to get the animation to start. Kind of unexpected behavior.
[+] [-] social_quotient|3 years ago|reply
[+] [-] jesse__|3 years ago|reply
EDIT: Turns out the following behavior is intentional, but I'll leave the statement here so the child comments make sense.
I wanted to point out what may be a bug .. if I quickly drag a face-down card off the deck and release the LMB right away, it flips face-up, however if I leave the mouse button depressed for ~0.5s, it stays face-down. Maybe this is intentional, but I feel like it's a bit of a weird behavior either way.
Chrome 111/Windows.
Anyway, thanks for sharing :)
[+] [-] cypherpunks01|3 years ago|reply
[+] [-] throwbadubadu|3 years ago|reply
card.js confirms:
if (isFlippable && Date.now() - starttime < 200) { // flip sides
[+] [-] jeron|3 years ago|reply
https://mrdoob.com/lab/javascript/effects/solitaire/
[+] [-] alexthehurst|3 years ago|reply
- Ability to drag a selection region and move multiple cards together (like, say, the deck) - Ability to align cards to each other (I found myself testing modifier keys while dragging to see if this was a hidden feature, but alas.)
[+] [-] ajanuary|3 years ago|reply
[+] [-] RheingoldRiver|3 years ago|reply
FWIW I don't think the Kings easter egg is a good idea as-is. Maybe require a modifier key like "Click the kings while holding down the `K` key." Otherwise someone might have to click all kings while playing Free Cell and have their game ruined, that's no fun.
[+] [-] InitialLastName|3 years ago|reply
- The ability to shuffle the cards without the jokers.
[+] [-] jordan_curve|3 years ago|reply
I had a project doing something similar a while back and got pretty stuck on figuring out how to go about it
[+] [-] jkingsman|3 years ago|reply
Nice and slick as is, though
[+] [-] nneonneo|3 years ago|reply
[+] [-] usrusr|3 years ago|reply
[+] [-] shp0ngle|3 years ago|reply
[+] [-] ehcjrvakzjtbe|3 years ago|reply
There is a client and a server, so not super easy, but not hard if you have any sysadmin experience. I had a server up for almost a year once
https://github.com/Cockatrice/Cockatrice
[+] [-] pkstn|3 years ago|reply
[+] [-] dminor|3 years ago|reply
[+] [-] mortenjorck|3 years ago|reply
[+] [-] hauxir|3 years ago|reply
[+] [-] valbaca|3 years ago|reply
[+] [-] Caitlynmeeks|3 years ago|reply
https://www.heinetwork.tv/episode/deck-of-cards-teaser/
[+] [-] lexandstuff|3 years ago|reply
[+] [-] Caitlynmeeks|3 years ago|reply
[+] [-] bodge5000|3 years ago|reply
[+] [-] Heyso|3 years ago|reply
[+] [-] moolcool|3 years ago|reply
[+] [-] joss82|3 years ago|reply
Doing so flawlessly at consistent 60fps in a mobile browser is quite the feat, don't you think?
[+] [-] spyremeown|3 years ago|reply
[+] [-] dannyobrien|3 years ago|reply
[+] [-] taylorbuley|3 years ago|reply
[+] [-] skeaker|3 years ago|reply
[+] [-] dang|3 years ago|reply
Multiplayer Deck of Cards - https://news.ycombinator.com/item?id=20067301 - June 2019 (73 comments)
[+] [-] palsecam|3 years ago|reply
Thanks for sharing!
[+] [-] pkstn|3 years ago|reply
[+] [-] karaterobot|3 years ago|reply
It needs some form of multi-card selection, so that I can grab a stack of cards and move, shuffle, or flip them as a group. I tried to play a game of solitaire, then got to the part where you can reuse the cards in your discard pile, and realized that there was no way to have it shuffle those cards, or even to just flip them all over.
[+] [-] notfed|3 years ago|reply
(Feedback: can't click "sort" on mobile due to placement of git banner.)
[+] [-] newaccount74|3 years ago|reply
[+] [-] andirk|3 years ago|reply
[+] [-] booleandilemma|3 years ago|reply
It would be cool if when I clicked and dragged a card and let go of the mouse button, the cards slid a bit, to simulate them sliding them across the table.
I could see some people not liking that though, best to make it configurable.
[+] [-] mproud|3 years ago|reply
[+] [-] owenpalmer|3 years ago|reply
[+] [-] HDMI_Cable|3 years ago|reply
[+] [-] brianfpeters|3 years ago|reply
multiplayer card games on android. Keep you own hand private. See the cards on the table. Took more than a weekend, but I knew nothing of android or kotlin at the time.
[+] [-] martyvis|3 years ago|reply