[HN Gopher] Development Notes from xkcd's "Machine"
___________________________________________________________________
Development Notes from xkcd's "Machine"
Author : chromakode
Score : 312 points
Date : 2024-05-08 17:09 UTC (5 hours ago)
(HTM) web link (chromakode.com)
(TXT) w3m dump (chromakode.com)
| bell-cot wrote:
| FWIW, HN's April 6th item on this, with 14 comments:
|
| https://news.ycombinator.com/item?id=39953514
| abathur wrote:
| I'm just the tiniest bit disappointed to have confirmation that
| mods probably didn't wait around for one of my zero-element
| machine submissions (I imagine I called it "patience is a
| virtue", given how long _I_ had to sit around waiting to click
| submit on it) to eventually pay off :)
| em-bee wrote:
| what are you referring to?
| abathur wrote:
| Some tiles are ~solvable without building anything.
|
| Sometimes this is dead-simple (the balls just drop from the
| top on through).
|
| Sometimes, they'll solve if you're patient enough (the balls
| pile up, shift around, and sooner or later enough of them
| exit within the time window necessary to trigger the submit
| UI).
|
| Edit: to finish connecting the dots just in case--I waited
| quite a while for one, probably at least 10 minutes--to do
| this. When the clearance rate for a machine is poor, it will
| usually drop back under the submit threshold very quickly. In
| these cases, you have to watch very carefully to be prepared
| to submit in the brief window that the submit UI is enabled.
| The OP suggests that during moderation they generally waited
| 30 seconds for a submitted machine to do the thing before
| they moved on.
| aiiane wrote:
| We also set up the minimum requirement for the submit
| button to be unlocked to not be too strict, to avoid
| frustrating people, but held a bit of a higher standard for
| the things we selected to be part of the public machine. So
| designs that only just barely work well enough to
| occasionally unlock the submit button are probably too
| unreliable to get selected for inclusion (but we made
| occasional rare exceptions if the submission was
| particularly interesting / inspired for other reasons).
| chromakode wrote:
| I saw yours! We do inevitably bias for tiles with some content
| in them, since otherwise the viewing experience would be quite
| boring. :)
| abathur wrote:
| I stand corrected! :)
|
| In my defense, I did personally find it quite suspenseful to
| wait for my vague sense that chaos would eventually reward me
| to cash out.
|
| Now that I reflect, I might have also called it "WU WEI". I
| know I also used that for (at least) one of my zero-element
| submissions.
|
| Also--apologies if the "ONLY FANS" submissions wore out their
| welcome. I'm sure I wasn't the only one, but I was probably a
| fair fraction :)
| sdwr wrote:
| As a nerd, I hunger for consistency. This wasn't - it took
| snapshots and handwaved them together.
|
| Can't help but feel it would have been a lot better with
| constrained physics and automated submissions.
|
| The current version is probably more fun to be on "the inside"
| of, evaluating submissions and stitching them together, but at
| the expense of the finished product.
| NBJack wrote:
| I may be missing something, but that seems to be an apples to
| oranges comparison.
|
| How is your turn based app example analogous to a complex
| physics simulation? And what exactly do you consider about the
| app's multiplayer to be the bar?
| sdwr wrote:
| Edited since, but what that game does is let you participate
| asynchronously in a completely distributed way. It's a real
| miracle of game design.
|
| This one is kludging from every angle. They're cheating with
| the physics, they're cheating with who sees what, they're
| cheating by handpicking levels. It results in an experience
| that isn't grounded, because none of the foundational
| dimensions are real.
| junon wrote:
| You're asking a lot from an April fools joke from a comic
| creation team.
|
| Also, what you're asking for is very hard to do with
| physics engines as they exist now. Simulating a bunch of
| non-static elements like that is incredibly expensive.
| NBJack wrote:
| As much as I hate to spoil the illusion, the kludging you
| mentioned is basically the sum of the natural drawbacks
| faced in virtually all game design. Whether it's a skybox,
| an NPC, or a virtual bullet, it's all basically cheating
| through constraints and illusions.
|
| Great example: Space Engineers, a very popular game in
| which you can build ships, bases, etc. with an incredible
| consideration for automation, moving things around, etc.
| One of my favorites. But the game intentionally (1) limits
| the top speed of all entities to 100m/s, (2) doesn't
| actually simulate orbital mechanics despite having planets,
| and (3) forces you to construct things on a 'grid'. All of
| these constraints are arguably shortcomings, but they also
| enable the physics engine to live and collisions to work.
| sfink wrote:
| As a nerd, I love to see carefully maintained illusions that
| give a convincing impression of something much more grand going
| on than is actually happening. Games that push for more and
| more realism make me wonder why I don't just wander around the
| real world. Games grounded in realism but augmented with
| nonrealism (magic, special powers, added knowledge, selective
| relaxation of physical laws, ...) are fun.
|
| Your "constrained physics" seems to mean adding constraints to
| make it implementable. I want constraints aimed at making it
| cool or fun, _and_ implementable. Which is what this project
| did.
|
| Plus: if you tell me something is smoke and mirrors, I get
| excited. "Ooh! How did you time the smoke? Oh, this mirror is
| half-silvered?! That's awesome, I wouldn't have thought of
| that! What would happen if..."
| its_ethan wrote:
| I feel like I'm missing something - why do certain elements
| seemingly only effect a specific color of ball in the machine? I
| assume it's to prevent the colors from getting totally jumbled
| up, but it doesn't seem like that's explained in this write up?
| chromakode wrote:
| We gave each ball different physical properties. Yellow balls
| are light and have lots of air drag. Green balls are massive.
| Red balls are very bouncy. This allows physical sorters to be
| designed.
| its_ethan wrote:
| Oh neat! Thanks for the reply to clarify that - I like having
| different properties as a concept added to the machine!
| junon wrote:
| Ohhhhhh this makes so much more sense. I was confused about
| how that was working with some of the designs. Thanks for
| explaining!
| pimlottc wrote:
| Ah, I was confused by this as well, this information is
| missing from the article. I couldn't find any explanation
| about the colors in the application either.
| Rudism wrote:
| The thing I'm most confused about is I thought xkcd was one guy
| named Randall's webcomic, but this post makes it sound like there
| are several people involved in creating the comics. Is that the
| case? Does Randall still draw them or is it like a company with a
| whole creative team now?
| aidenn0 wrote:
| I believe his April 1st "comics" have always been coded by
| someone else; there's been development notes by the
| developer(s) like this posted after each one.
| aiiane wrote:
| Most comics are just Randall, but there are a handful of people
| who contribute to the occasional more unique / interactive
| comics, such as the April Fools ones.
| saganus wrote:
| I am actually a little relieved because everytime one of these
| interactive XKCD comic is published I wonder how does Randall
| find enough time to work on them, plus What If, etx.
|
| Of course there are some people that simpliy are hyper
| productive, but the level of detail and complexity of these
| comics always made me feel a bit "inadequate" :)
| nolongerthere wrote:
| tbf, I don't think he has another job, so if he's only
| creating 3 comics a week and writing his books, there is def
| enough time as a side project to put out a fun annual comic
| that requires a bit of work, obviously it would need to be
| planned well in advance, which it appears this was not.
| saganus wrote:
| Right. Maybe the workload is manageable, especially for
| someone with the amount of experience he has, nevertheless
| the breadth of the stuff he does is what amazes me the
| most.
|
| Just programming one of those interactive comics must be
| quite a challenge, to then add the story, the wittiness,
| depth, etc is what blows me away.
| benlivengood wrote:
| Why are there no cats in the current machine??
| drewtato wrote:
| The explainxkcd wiki says that cats were added later, and that
| permalinks go to a snapshot of the machine. So it's possible
| all the cats are lower in the machine, or the permalink is from
| before cats were added. There's some cats at the bottom of the
| machine right now. https://xkcd.com/2916/#xt=2&yt=105&v=1402
| windowshopping wrote:
| Honestly every time I start to think I'm rather quite good at
| frontend development, someone posts something like this and makes
| me feel like an intern by comparison. To have built this in 3
| weeks is Herculean to me. It probably would have taken me 3 weeks
| to figure out the physics context alone.
| FredPret wrote:
| I bet it helps to have a physics PhD on the dev team. It still
| sure is amazing
| Max-Ganz-II wrote:
| I love this XKCD.
|
| I have a bookmark for it, and whenever I want to kick back a bit,
| perfect.
|
| However, I've noticed that it has a tendency to go blank (i.e.
| fail and stop working) when multiple colour spectrum triangles
| are in play and in particular when they are on top of each other.
|
| I'd really like to see some additional objects to place into the
| machine.
|
| One other problem I have is that the "perma-link" button doesn't
| seem to do anything. When I come back to the URL, my machine
| isn't there.
| aiiane wrote:
| Permalinks are only for machines that have already been
| approved via the moderation queue as part of the shared public
| machine. Submitting a machine only submits it as a candidate
| for inclusion, it doesn't guarantee that your submission is the
| one picked for the slot.
| mihaaly wrote:
| Reminds me of this from my young adult years, I wasted sooo much
| time on this very happily:
|
| https://www.myabandonware.com/game/the-incredible-machine-1m...
| windowshopping wrote:
| It says in the post that this is what inspired the project.
| iamtedd wrote:
| What was the rationale for simulating the machine with physics,
| and not simply creating an animation engine?
| sfink wrote:
| Because the machine is a physics simulation. Where users can
| set up simulated physical objects like barriers and bumpers,
| and you want the animation to display a simulation of what
| happens according to the laws of physics.
|
| I think you may be missing the point if you think this is an
| animated rendering of a static setup?
| simonmic wrote:
| Wow! What a work of art!
|
| A few more links for the record (don't read too soon, possible
| spoilers):
|
| https://www.reddit.com/r/xkcd/comments/1bxg43b/xkcd_2916_mac...
|
| https://www.explainxkcd.com/wiki/index.php/2916:_Machine
|
| https://github.com/xkcd/incredible
| Waterluvian wrote:
| I can't help but hear the Blue Ball Machine music from the YTMND.
| ralferoo wrote:
| Reading this write up is funny, because I had no idea this is
| what was happening. There didn't seem to be an explanation of
| what was going on. I didn't know it was a shared experience, just
| that various random things seemed to be chaotically happening. I
| completed a couple of tiles and I guess submitted them as I
| thought that was how you got to "the next level", but gave them
| really stupid names like "test 1b" - mostly this is because I
| assumed it was single player and only I'd be seeing the name!
|
| I also got bored after creating a couple of tiles. I scrolled
| around and saw very complicated things, but didn't realise they
| were submissions, just starting points for solving the level...
|
| I guess I was the April Fool!
| itslennysfault wrote:
| I was adding a lot of "bonk" elements and I seem to have murdered
| rapier... Uncaught Error: recursive use of an
| object detected which would lead to unsafe aliasing in rust
| at jt (rapier_wasm2d_bg.js:4836:11) at
| 4ea5626ea4b1e4145572.module.wasm:0xf061c at
| 4ea5626ea4b1e4145572.module.wasm:0xf0638 at
| 4ea5626ea4b1e4145572.module.wasm:0xb5e7b at H.remove
| (rapier_wasm2d_bg.js:1051:14) at l.remove
| (collider_set.js:87:18) at y.removeCollider
| (world.js:343:28) at PhysicsContext.tsx:258:15
|
| Also, this is super fun, and I'm sad I didn't learn about it when
| it was still live. It'd be really really cool if people could
| still permalink individual machines created. I know that might be
| an issue for storage. Maaaaaybe just base64 encode the JSON into
| a URL param??? Please?? I'd love to create weird maps and share
| them with people.
| aiiane wrote:
| It's still live. https://xkcd.com/2916/
|
| Machines that make it into the overall public version can be
| permalinked, but there's no permalinks for individually created
| things that don't get selected via the moderation queue. This
| was an intentional decision to avoid the risk of hosting
| unmoderated user-generated content on the comic's domain.
| utopcell wrote:
| I don't know _what_ I 'm seeing, I missed the Apr/5 xkcd update,
| but this is fascinating! :-)
| TacticalCoder wrote:
| It is reminiscent of the very old DOS game "The Incredible
| Machine": you receive a certain number of various items (fans,
| conveyor belts, basket balls, tennis balls, cat, mouse (cat would
| follow mouse upon seeing it), mirror, candles, etc.) and with the
| items you had, you had to solve a problem like, say: _" To win
| the level, you must send 32 tennis balls above the wall"_.
| stavros wrote:
| Yep, the second sentence in the article has a link to
| Wikipedia.
| CSMastermind wrote:
| I totally didn't realize it was collaborative. I thought I was
| only building rooms for myself lol.
|
| Several years ago XKCD released a comic that was different
| depending the browser, operating system, ip, and referrer you use
| to view it.
|
| I know people uncovered hundreds of versions of it but I never
| heard a detailed write up about how it worked or how many comics
| there were available.
|
| Does anyone know if they ever figured it out?
| chromakode wrote:
| Umwelt! Explain xkcd has a great writeup on it:
| https://www.explainxkcd.com/wiki/index.php/1037:_Umwelt
| TheAceOfHearts wrote:
| I wish they had a way of easily figuring out if any of the
| machines you built made it into the final version or not. Maybe
| for a future design it would be neat to store the titles of
| previous submissions in something like local storage and you
| could provide a notification.
| aiiane wrote:
| A member of the community has been creating an index:
| https://github.com/scpso/incrediblexkcd
| lukan wrote:
| "Machine is rendered entirely using the DOM. During early dev I
| was leery I'd reaching the end of my rope perf-wise. I expected
| I'd eventually ditch DOM rendering for PixiJS or canvas when it
| got too slow. However, I wanted to see how far I could take it
|
| ...
|
| I've heard comparisons drawn between modern browsers and game
| engines, with their tightly optimized GPU rendering and DOM /
| scene graph. The similarities have never felt more apt."
|
| The DOM might have become faster, but using the GPU directly via
| Pixi is still a world above in terms of performance and using
| Pixi could have made everything more smooth. But dev time was
| limited .. and the result is still impressive.
| chromakode wrote:
| Agreed. DOM started as a prototype and I stayed on it primarily
| for dev speed due to momentum (and some React DX things -- I
| checked out the Pixi React binding but decided not to go down
| that rabbit hole). It's amazing how efficient Pixi is!
___________________________________________________________________
(page generated 2024-05-08 23:00 UTC)