10 ms·
Deck.of.cards
- dannyobrien 4y agoFlashing back to cards.dll in Windows: https://catonmat.net/cards-dll https://catonmat.net/cards-dll
- mproud 4y agoMy family would often play cards when we get together. During the height of the pandemic, we would often play on https://playingcards.io https://playingcards.io.
- jkingsman 4y agoOh 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. Nice and slick as is, though
- nneonneo 4y agohttps://playingcards.io/ https://playingcards.io/ worked well for me and my family during the pandemic.
- mproud 4y agoExactly the same here!
- shp0ngle 4y agoIf you remove the "/old" from the URL, you can do just that
- nneonneo 4y agoMultiplayer didn't seem to work - nothing synced, buttons didn't work, and I couldn't even flip cards (Firefox). Single-player seems fine though.
- ehcjrvakzjtbe 4y agoCockatrice can do that, configured for magic by default if i remember correctly. Youll have to cough up image files for different card sets. 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 https://github.com/Cockatrice/Cockatrice
- hauxir 4y agothat's exactly what https://cardtables.online https://cardtables.online does
- pdm55 4y agoI think the card games here have multi-player options: https://cardgames.io/ https://cardgames.io/
- dminor 4y agoI've been hacking on something like that to learn Phoenix, will post it to HN when it's usable
- usrusr 4y agoThat, 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.
- pcl 4y agoI’ve been looking around the iOS App Store for exactly that app, for playing multiplayer card games with one dealer while on a train etc. Haven’t found the right thing yet, but the App Store is sooo spammy especially when it comes to card game apps. Does anyone know of such a thing? (As far as I know, the p2p requirements mean that on iOS at least, this cannot be implemented as a web app. Again, would love to learn that I’m wrong.)
- vedosity 4y agoOne might be able to do this with peer to peer networking through WebRTC. You still need a way to send each phone an SDP offer/answer but maybe this could be done with QR codes.
- pcl 4y agoBut that still depends on a pre-established route between the devices (shared wifi etc), right? Native apps can do WiFi Direct and BT and whatnot as well.
- usrusr 4y agoThis could be one of the rare opportunities for more backend-oriented people (well, "non-front-end" people) to make something end-user-interesting by taking some appropriately licenced UI and running with it: put an existing "card table" web client in a tauri app and add some "Desk Area Network" distributed backend. Might be a fun demonstration project for persons or orgs wanting to show off distributed consistency protocols. You might even add some blockchain to the mix if you have a thing for stale buzzwords. For a company with a product in the distributed consistency field, it could make a nice trade show booth giveaway: "this is actually our product, and you can even challenge each other on the plane back home, that's how special it is"
- mortenjorck 4y agoSomething 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.
- valbaca 4y agogo one level up: https://deck.of.cards/ https://deck.of.cards/
- pkstn 4y agoThe new version is in the root https://deck.of.cards https://deck.of.cards and includes multiplayer ;)
- owenpalmer 4y agoSuper cool, works well on mobile
- HDMI_Cable 4y agoOne (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!
- noizejoy 4y agoEven smaller nit-pick: what you’re describing would seem to be more “small screen size” rather than “mobile”
- HDMI_Cable 4y agoEven smaller nit-pick: it would have to be some combination of 'small screen size' and 'vertically-orientated' rather than just 'small screen size' :).
- noizejoy 4y agoeven more teensy weensy nit-pick: if the screen-size is small enough, even horizontal (landscape) orientation wouldn't help :-) :-)
- allenu 4y agoReally 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. [1] https://mastodon.social/@allenu/109952125506805902 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 4y agoWhat do you think makes them feel heavy? I agree but I can’t put my finger on what it might be.
- allenu 4y agoIt's probably the easing function and the fact that cards sort of snap to their final positions and hang out there briefly before moving again, such as in the shuffle animation. It gives them a feeling of friction you wouldn't get if they just moved right away.
- alexthehurst 4y agoI 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.)
- InitialLastName 4y agoAlso necessary: - The ability to shuffle the cards without the jokers.
- alexthehurst 4y agoI actually often skip this step with real cards. If a joker comes up, toss it and replace it from the deck.
- RheingoldRiver 4y agoAlso, 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.
- wlesieutre 4y agoShuffling doesn't reset flipped-ness, it looks like "flip" is the only action that puts all the cards facing the same way
- jordan_curve 4y agoDoes anyone know how one might go about implementing a feature like multiple select? I had a project doing something similar a while back and got pretty stuck on figuring out how to go about it
- karaterobot 4y agoVery satisfying animations. 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.
- taylorbuley 4y agoAnyone else rather hunt through source code to find the king easter egg than to actually click only kings and nothing in between?
- skeaker 4y agoEven easier, just hit the By Suit button at the top and all the kings will be sorted along the right side.
- cuttysnark 4y agoSource code reveals clicking all Kings adds Jokers to the deck, but also clicking all Aces will do the "Winning" sequence from Solitaire, aptly named "startWinning()"
- Caitlynmeeks 4y agoAw i was hoping it was gonna go to Gregg Turkington's Deck of Cards project https://www.heinetwork.tv/episode/deck-of-cards-teaser/ https://www.heinetwork.tv/episode/deck-of-cards-teaser/
- Caitlynmeeks 4y agohttps://www.youtube.com/watch?v=cv0EmWhd24Y https://www.youtube.com/watch?v=cv0EmWhd24Y
- bodge5000 4y agoDisappointed to see the website doesn't even feature a jitterbug mode as a tip of the hat to The Wizard of Oz (1h 52m)
- lexandstuff 4y agoI 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).
- jesse__ 4y agoNicely polished, I like 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. Chrome 111/Windows. Anyway, thanks for sharing :)
- cypherpunks01 4y agoI 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.
- deleted 4y ago[deleted]
- throwbadubadu 4y ago200 ms to be precise, definitely feature (a reasonable one) and not a bug (: card.js confirms: if (isFlippable && Date.now() - starttime < 200) { // flip sides
- bscphil 4y agoI don't think that confirms this is not a bug. It's a function that runs on the `mouseup` event, so it's presumably intended to activate on clicks that last less than 200 ms (anything longer is considered a click and drag). This issue triggers as a result of unexpected behavior - a click and drag that lasts less than 200 ms.
- 8n4vidtmkvmk 4y agowhenever i implement 'click' i always check that the final pos of the mouse is within a few pixels of the starting position.
- booleandilemma 4y agoWow, beautiful and polished looking on Firefox. 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.
- hauxir 4y agoreally cool, you can also check out https://cardtables.online https://cardtables.online it allows for multiplayer + cams
- notfed 4y agoI like that this essentially can simulate any card game. (Feedback: can't click "sort" on mobile due to placement of git banner.)
- newaccount74 4y agoExcept card games where you hide your cards from other players (ie. almost all of them)
- pkstn 4y agoTry https://deck.of.cards https://deck.of.cards it has multiplayer with "hands" area for four players ;)
- graypegg 4y agoI 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 :(
- wpietri 4y agoMentioning 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.
- Nashooo 4y agoSame! I think it is a solitaire Easter egg.
- Hbruz0 4y agoYes, I was surprised that it was able to recognize that the game ended. But then I beleive it's not that hard, just look if there are 4 decks in order
- tinix 4y agotouching the 4 kings sequentially triggers it
- throwbadubadu 4y agoAt some point after a few clicks text comes up which tells you this "secret", so yes, not much hidden easter egg ;)
- moss2 4y agonoooooo :(
- totetsu 4y agoThe stuff you should know podcast just released an episode on the history of playing cards that was interesting
- tambourine_man 4y agoGreat fun and awesome domain. Nicely done.
- jeron 4y agoReminds me of Mr. Doob's javascript recreation of winning solitaire https://mrdoob.com/lab/javascript/effects/solitaire/ https://mrdoob.com/lab/javascript/effects/solitaire/
- wg0 4y agoUsing it on a low end mobile device, the smoothness of animations and responsiveness is amazing.
- pazimzadeh 4y agoThis is neat, how hard would it be to make a 3D version of this, for VR/AR?
- mnsh 4y agoUpvote for just how smooth animation is. Loved it :)
- semiquaver 4y agoI like the even more secret Easter egg I found in the source :)
- xwdv 4y agoReminds me of how we used to play board games to pass the time while sailing ships in Ultima Online. Just simple dragging of pieces along a board without restrictions.
- pkstn 4y agoWow, 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 https://deck.of.cards Old one has nicer animation treats, but the new one has multiplayer as well :)
- phailhaus 4y agoVery cool! How did you implement multiplayer?
- pkstn 4y agoIt's using socket.io, pretty simple stuff.. Here's the car.js.org server-side as simple example: https://github.com/pakastin/car-ws/blob/master/server/index.js https://github.com/pakastin/car-ws/blob/master/server/index....
- BaRRaKID 4y agoBit of a nitpicking but the "sort" order is wrong. New decks come ordered Ace of Spades - King of Spades, Ace of Diamonds - King of Diamonds, King of Clubs - Ace of Clubs, King of Hearts - Ace of Hearts. The deck should start and end with Aces, and have two kings next to each other in the middle.
- pkstn 4y agoThat is true, i could actually finally fix that..
- ogab 4y agoAny idea why this is the order?
- BaRRaKID 4y agoNo idea, but it seems like it's intentionally made so that no matter the orientation of the deck (face up or face down), the first card you see (not counting jokers and ad cards) will always de an ace. The two suits of those aces are just the two most liked suits (ace and hearths). The curious part is that this order doesn't mean anything for card players, in fact it would probably be better for most games if the decks where printed in random order, but for magicians this order is really important for many effects. For example, if you perfectly shuffle the deck 8 times it will go back to it's original order.
- dang 4y agoRelated: Multiplayer Deck of Cards - https://news.ycombinator.com/item?id=20067301 https://news.ycombinator.com/item?id=20067301 - June 2019 (73 comments)
- vrglvrglvrgl 4y ago[dead]
- andirk 4y ago.cards is a TLD? What is the pretend use case for that?
- jug 4y agoThings went bonkers the last round of that. I mean, .google is a TLD. The upside is that this must be their end game. Can't make it much more liberal than this.
- andirk 4y agoThe most annoying one was .dev . Overnight, we all had to update our `/etc/hosts`, virtual hosts to use a different extension since .dev became a real thing. And the most ignored from a while ago: .mobi .
- slim 4y agogambling
- teddyh 4y agoMoney?
- pkstn 4y agoI have no idea, but it was a fun surprise that of.cards was available (not very cheap though). deck.of.cards is actually a subdomain :D
- deleted 4y ago[deleted]
- palsecam 4y agoWow, I’ll definitely steal the shuffling animation for https://FreeSolitaire.win/ https://FreeSolitaire.win/ Thanks for sharing!
- pkstn 4y agoFeel free ;)
- robertlagrant 4y agoI like the jokers.
- Heyso 4y agoSo.. that's just a card moving simulator ? I am missing something crazy or why does this have that many points on Hacker news ?
- spyremeown 4y agoDon't you think it's just neat? I think it's neat.
- joss82 4y agoSimulating playing cards is surprisingly hard. Doing so flawlessly at consistent 60fps in a mobile browser is quite the feat, don't you think?
- alexb_ 4y agoIt wasn't surprisingly hard back when Flash wasn't ripped from all browsers.
- trufas 4y agoOnly if you ignore the flawlessly at 60 fps part.
- chrisco255 4y agoAnd the mobile browser part.
- mattl 4y agoOr even the desktop browser part. If you were on Windows or a Mac, maybe you had access to Flash player.
- buddhistdude 4y agoCan someone explain what the technical challenges are? On first glance this seems like something one could implement on a weekend, I am sure that's not the case.
- brianfpeters 4y agohttps://www.f2f.games/ https://www.f2f.games/ 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 4y agoI tried to launch the links, but when Google Play Store comes it says it is for older versions of Android only (I'm on the latest, 13 )
- DoryMinh 4y agocan I put the card back to the deck?