Live data from Hacker News

Show HN: Boing

boing.greg.technology

91–100 of 156 posts

Re: Show HN: Boing

#92

Funny thing: this feels "realistic" because it’s not perfect physics. A perfectly simulated Hooke's law spring actually looks fake and too stiff. But if you let the animation wobble a bit more and slow down the damping, our brain reads it as weight and squishiness. It’s basically controlled sloppiness.

> this feels "realistic" because it’s not perfect physics. A perfectly simulated Hooke's law spring Confused. Perfect physics means perfectly simulating reality, not perfectly simulating an unreal idealized formula. Are you saying Hooke's law doesn't feel realistic or are you saying a simulator for a realistic spring doesn't feel realistic?

In reality, nothing is perfect. Materials are never 100% one material. Rustness is imperfection, the weight and material of the ball, and the place it's attached are also consideration points, how firmly it is attached, and with which material. A "perfect" simulation of the spring itself would have to consider all these variables, and they almost never do.

Re: Show HN: Boing

#93
post #6

Love this. Had to cheat, naturally. setInterval(()=>{const canvas=document.getElementById('canvas');const startX=266;const startY=198;const rect=canvas.getBoundingClientRect();const startClientX=rect.left+startX;const startClientY=rect.top+startY;let endClientX,endClientY,distance;do{endClientX=Math.random()*window.innerWidth;endClientY=Math.random()*window.innerHeight;const dx=endClientX-startClientX;const dy=endCli…

    while true; do curl -X POST -Ss https://respected-accordion-31461.ondis.co/boing &; sleep 0.1; done

Re: Show HN: Boing

#94

Earlier quoted context omitted.

> this feels "realistic" because it’s not perfect physics. A perfectly simulated Hooke's law spring Confused. Perfect physics means perfectly simulating reality, not perfectly simulating an unreal idealized formula. Are you saying Hooke's law doesn't feel realistic or are you saying a simulator for a realistic spring doesn't feel realistic?

In reality, nothing is perfect. Materials are never 100% one material. Rustness is imperfection, the weight and material of the ball, and the place it's attached are also consideration points, how firmly it is attached, and with which material. A "perfect" simulation of the spring itself would have to consider all these variables, and they almost never do.

And even if you somehow included "everything" with the "perfect" equations, you'll end up with a lot of stuff which does not have a good closed form solution anyways and good luck getting that running (e.g. the dynamics around the air resistance/sound generation) via approximations both accurate enough that it looks better than "faking it" and fast enough that it's actually usable interactively.

This leads to what GP was saying: many just cut things off at "Hooke's law simulates a spring, so I'll use that, but the rest is a bit too much to fit so I won't do it" but "Hooke's law simulates a spring but adding a bit of not-physics based fluff approximates all the rest" actually gives far superior results even though it doesn't only use perfect physics equations as the former did.

Re: Show HN: Boing

#95
This reminds me why simple single-purpose web toys used to be so satisfying. No account, no onboarding, no "upgrade to pro" - just a thing that does one thing well. The world counter is a nice touch without being gamified into oblivion..

Re: Show HN: Boing

#96

It doesnt boing rotationally, only in a straight line. Like the spring isn't really there. If I bend it right round to one side so the spring is curved I expect it to bounce round to the other side.

you are right - just improved this and I think it looks a lot better (deploying now) thanks!

The dream of agile exemplified

Re: Show HN: Boing

#97

Earlier quoted context omitted.

I have no sound on ff ios, volume 100%

Make sure to unmute your device - either using the physical mute rocker on older iPhones, or by disabling Silent Mode (tap the bell in the Control Center)

That already was the case; no sound

Re: Show HN: Boing

#98
post #6

Love this. Had to cheat, naturally. setInterval(()=>{const canvas=document.getElementById('canvas');const startX=266;const startY=198;const rect=canvas.getBoundingClientRect();const startClientX=rect.left+startX;const startClientY=rect.top+startY;let endClientX,endClientY,distance;do{endClientX=Math.random()*window.innerWidth;endClientY=Math.random()*window.innerHeight;const dx=endClientX-startClientX;const dy=endCli…

while true; do curl -X POST -Ss https://respected-accordion-31461.ondis.co/boing &; sleep 0.1; done

please don't, but I can't stop you. :-) thanks!

Re: Show HN: Boing

#99
post #80

Earlier quoted context omitted.

alright, I implemented a world boing counter :-) thanks for the great idea

Nice, could you share how you implemented it?

Flask + SQLite in WAL mode.

In-memory ip address rate limiting.

Hosted and deployed on a ~$20 EC2 server using the open source tool I've been working on, https://disco.cloud/

We were at ~120 requests/second earlier and it took it on, no sweat.

Post reply on HN