This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-07-10
Channels
- # announcements (1)
- # babashka (17)
- # biff (7)
- # calva (6)
- # clerk (5)
- # clj-on-windows (1)
- # clojure (59)
- # clojure-austin (17)
- # clojure-brasil (1)
- # clojure-europe (40)
- # clojure-nl (2)
- # clojure-norway (103)
- # clojure-sweden (9)
- # clojure-uk (8)
- # clojurescript (8)
- # cursive (25)
- # data-science (5)
- # datalevin (7)
- # datomic (4)
- # emacs (8)
- # etaoin (13)
- # hyperfiddle (26)
- # lsp (8)
- # malli (7)
- # off-topic (9)
- # polylith (13)
- # releases (2)
- # sql (7)
How to know when a component is fully rendered on this client? When a player presses a button to start a timer, some cards with terms should show. Problem is, the player presses the button and the cards only render a second or two later, putting them at a disadvantage.
How can I only start the timer when I know the cards are fully mounted and visible to the player? Some kind of on-mount event?
Or maybe use :visibility "hidden" | "visible"
instead of conditional rendering?
what is the cause of the delay
I guess mounting of cards or sending of card data to client? The data is already available but I only render the card when time starts. Presumably sending it over when card is drawn (happens up-front), but using :visibility should solve?
I'm seeing about 150ms round-trip latency to Fly's Johannesburg region (very bad) on my mesh WiFi connection, but only 50ms on 4G. Should be like 20ms. (doubt that adding more memory to machine would lower latency)
Ok, yeah you'll need to work around Electric's deficiencies by preloading the data. Electric currently emits quite disoptimal network (e/for in particular creates undesired round trips). Electric v3 is the starting point for solving that. In the meantime you can try to flatten the amount of client/server nesting by lifting IO "to the top" (i.e., move entire e/for blocks to the client so that everything it might need is local before the e/for runs). Also, yes, manipulating visibility is helpful
ThinkFast, the word-guessing party game is now playable at https://thinkfast.fly.dev/ Written in 1152 lines of Electric Clojure. “Find Nearby Games” sorta broken rn, but you can scan the QR code to join or copy link to invite others to your game. Currently everyone can see the card in play - will fix so players on your team can’t see it. Enjoy the mario easter egg if you wait out a full round with sound on :). Will add more terms and category-based expansion card decks, e.g. “Formula 1”, “80s Music,” etc. Always surprised at how much logic goes into modelling the state of even a 'simple' board game.
Very nice! • Obviously the "Nearby Games" part is more of a placeholder currently, but it could do with filtering to show only games with active players, sorting by distance, and mapping to list the players in each game. • Needs instructions in the "Geolocation not available" message, to say how to switch it on
What are you using for the radial timer?
Gameplay-wise, I haven't tried with people, but my instinct would be to add more time, and decrease over subsequent rounds. alternatively, less terms, and increase the number
@U058CTJ4P2L yeah was thinking of calculating a handicap for strong players, e.g. "Tommy has a -3 second handicap," or to balance teams with stronger & weaker players. In ZA the difficulty goes up every round because we play it as a drinking game.
Fixed "Find Nearby Games": https://thinkfast.fly.dev/(:thinkfast.main!nearby)/ although it takes you straight to the Play screen instead of lobby. Should take you to Lobby, but need more state because game could have already started. Just press "< game lobby" to join a team. Will fix. It will find any games created in last 2 hours within 5km of you. Now show's game owner's player name.
@U058CTJ4P2L for donut chart timer, see .pie CSS at /thinkfast.css
Thanks! I decided in the end to just use linear dom/progress
, but I might come back to the donut later 🙂
👍:skin-tone-2: didn’t know about the <progress> element
Thinkfast is now https://explaingame.com/ – playable at http://explaingame.com (much better domain than the Fly dot io one). • Built over 2 weekends in ~1,600 lines of Electric Clojure. No other tech stack other exists today in which I could have built a real-time, multiplayer "board game" in this time frame, with this level of polish. • The goal of ExplainGame is to get your teammates to say the words on your card before the timer runs out, using only word association clues, i.e. you as the explainer cannot say the words on the card. • Fixed repeating words bug, where seen words were appearing again before players ran out of cards (words can only repeat after you run out of cards) • Took 1st step toward monetization: users are now prompted to buy an expansion card deck when they run out of free cards. Will add cool categories like Cars, Golf, Rugby, etc. Still working on payment stuff.
posted "Show HN: I made an explanation party game in Electric Clojure" (ExplainGame) /me dons scaling goggles
Excellent! Well described. In the UK, and possibly elsewhere, the popular published version of the game is called Articulate. It's fairly well-known, and might help explain the concept (or be worth including in metadata or whatever)
thx @U058CTJ4P2L, edited with mention of Articulate.
I'd leave more comments and upvotes, but I'm monstrously busy & don't have an account. Hopefully someone else will 😃
How do I turn off the exception logging when a client disconnects their websocket connection because they closed the tab? For me, this is expected, e.g. logs are filled with:
2024-07-10T18:53:57.854 app[e286765db13686] jnb [info] ERROR hyperfiddle.electric-ring-adapter: Websocket error
2024-07-10T18:53:57.854 app[e286765db13686] jnb [info] java.nio.channels.ClosedChannelException: null
... +20 more lines
logback.xml
Thinkfast is now https://explaingame.com/ – playable at http://explaingame.com (much better domain than the Fly dot io one). • Built over 2 weekends in ~1,600 lines of Electric Clojure. No other tech stack other exists today in which I could have built a real-time, multiplayer "board game" in this time frame, with this level of polish. • The goal of ExplainGame is to get your teammates to say the words on your card before the timer runs out, using only word association clues, i.e. you as the explainer cannot say the words on the card. • Fixed repeating words bug, where seen words were appearing again before players ran out of cards (words can only repeat after you run out of cards) • Took 1st step toward monetization: users are now prompted to buy an expansion card deck when they run out of free cards. Will add cool categories like Cars, Golf, Rugby, etc. Still working on payment stuff.
posted "Show HN: I made an explanation party game in Electric Clojure" (ExplainGame) /me dons scaling goggles