Live data from Hacker News

Box3D, an open source 3D physics engine

box2d.org

121–130 of 135 posts

Re: Box3D, an open source 3D physics engine

#121

Earlier quoted context omitted.

Have you ever taken part in a legal dispute? The "whole point of law is to guarantee outcomes" sounds like someone who has not. The easiest, most "acceptable solution" is to obviously throw the oss maintainer who made your hundreds of millions possible a bone. It's not that complicated. Why you find this such an odd notion I find rather strange.

I find it strange you’re arguing for something beyond the licensing terms. Imagine if companies were run that way. "Hey, we did an especially good job mowing your lawn, so please pay us double. You have a rich house, you can afford it. Oh and if you don’t pay us, you’re a bad person and should feel bad." This is exactly the same argument: you’re saying the open source maintainer who knowingly released their code as o…

"Society doesn't work that way" from the guy who says "the whole point of law is to guarantee outcomes".

Ok buddy. Why is tipping the analogous model? Do the economics fit at all? Why is it tipping that is teaching us about the economics of oss? I also don't give the grocery store extra money just for "kindness". Why not go with that one? You think an oss maintainer reflecting on someone making hundreds of millions with their work is analogous to a server waiting to see what you write down on the check? Is that it? Who is the business (not) paying the server in this case? The oss maintainer is both the emotionally manipulative server and the benefiting business owner? Because "exposure"? Or are you saying they are stupid for not acting more like a business in the first place, meaning the two should become the one? Why are you putting a human in front of me and making me come to some sort of pseudo-moral judgement? What does my contract say? Is that your point?

I just have to level with you and say your argument is deeply unimpressive. You also repeat maxims like "you're owed what you ask for" as if this is self evident. Then you call other people fools and say what other people can and can't do, all from this position of supposed hard-nosed knowledge of the the real world and how things work when it's pretty clear you have no idea what you're talking about. Trying to go from grandstanding about tipping culture (go off) to some self evident law about how humans should share rewards in something like oss is not obvious, despite your brilliant legal and economic insights.

And feeling bad is not something you can legalize your way out of. Another comment already touched on this. You don't seem to understand the point being made. No one is claiming there is a legal obligation or there was some company to company transaction. You know not everything in life is a contract, right? Morals and law are not the same. Your inability to acknowledge this basic fact feels pretty antisocial to me. I'm not really impressed by your shallow attempt at diagnosing society, or whatever your move from tipping to identity theft was supposed to prove... it seems to me underlying your replies is a resistance to feeling guilt. Not to psychoanalyze you but frankly, the degree to which you don't seem to understand how simple this is and instead seem to think this is some kind of emotional scam (why are you making me feel bad about giving you pennies on the dollar when the contract said it was free) makes me, at the risk of violating the HN equivalent of the Goldwater rule, simply wonder who hurt you.

Re: Box3D, an open source 3D physics engine

#122

Earlier quoted context omitted.

I bet if you caught a homerun ball in a baseball game, you wouldn't give it to the kid next to you because "I don't owe the kid anything".

Depends on what the little kid intends to do with it. A lot of them collect MLB baseballs to sell them for cash.

> A lot of them collect MLB baseballs to sell them for cash.

You have evidence of this? Because it would be my first guess that the parent coerces their child to sell the ball.

Re: Box3D, an open source 3D physics engine

#123
post #55

Earlier quoted context omitted.

I used to work at Rovio (the creator of Angry Birds). Everyone was telling the story of a talk given by Peter Vesterbacka, the head of marketing. When it was time for questions, a man from the audience asked what physics engine the game uses. Vesterbacka gives the correct answer, Box2D, to which the person replied with another question. "Why isn't it mentioned in the credits? And by the way, I'm Erin Catto, the creat…

To the larger point, do you know if Rovio did support/pay Eric in any other way than that hoodie? Angry Birds generated $500M [0], supposedly. I would also not be surprised if the Rovio developers, designers, testers, etc. who worked on this game did not get a share of that $500M pie - I actually assume they didn't. But still, you know. Dare I say it - what about "fairness"? :-) [0] https://gameworldobserver.com/2023…

> I would also not be surprised if the [staff] on this game did not get a share of that $500M pie

That's almost certainly the case, yes. Anything like royalties / residuals is pretty much unheard of in gamedev. You do the work, you do the crunch, you don't talk about conditions, you don't talk about pay, you are actively hostile towards the 'U' word, your boss _________ ____ __ _____. For your service, you get the chance to be in the credits, provided your service continues after going "gold"[0], of course. Then you get laid off which is actually a win because you get to leave the company without getting blacklisted. Please forgive the gentle hyperbole, it's illustrative.

The situation may have improved (slightly)[1] with ~actors as SAG-AFTRA was a growing influence in the industry some years ago. I'm a bit out of the loop on that side of things, though.

[0] not that anyone ships after going gold anymore

[1] improved slightly relative to "I'm the voice of Niko Bellic and I got paid in Famista cassettes" -- no this is not a true story, I'm actually not even a voice actor.

Re: Box3D, an open source 3D physics engine

#124
post #46

Yes! This is exciting to see. Erin Catto is such a cool hacker. Thank you, Erin, for sharing your code with the open source community. There wasn't anything about determinism in the announcement, but I'd really love to see some more about that, too. Trying to use Unity's built-in physics to make a networked billiards game is quite troubling, when none of the clients can happily agree on what happened.

PhysX itself (assuming Unity still uses PhysX, but any major physics engine will be the same) is unlikely to be your problem, although it is possible that Unity compiles it with undesirable optimisations, or some aggressive multithreading strategy, etc.

In any case, it's quite likely that the physics simulation is not being initialised with identical state on each instance, so the physics engine -- even if it claims to be deterministic -- cannot be expected to arrive at the same solution across instances. From the scripting layer atop Unity (et al.) you are essentially out of luck. You don't have the requisite control/access to guarantee the simulation input is consistent.

To expand on the "quite likely" variance in the simulation input, there's an unending list of possibilities, so just a couple of points: Unity is really really big and complicated. The physics engine in Unity is not primarily there to be a FEATURE: physics engine. It's a general purpose collision system, and it's fundamental to Unity's whole world/scene/components. It's always running. Stuff that has nothing to do with what you see as your simulation can affect your simulation.

My unopinionated advice is: read Glenn Fiedler's classic networked physics articles[0].

My opinionated advice is: you're making a game where the physics is the whole game. It's also a very nicely contained problem space. Write your own physics simulation. It's gameplay code. Also, typical rigid body physics engines certainly can do a billiards sim, but they aren't actually that good at it.

[0] http://gafferongames.com

Re: Box3D, an open source 3D physics engine

#125
post #62

Earlier quoted context omitted.

To the larger point, do you know if Rovio did support/pay Eric in any other way than that hoodie? Angry Birds generated $500M [0], supposedly. I would also not be surprised if the Rovio developers, designers, testers, etc. who worked on this game did not get a share of that $500M pie - I actually assume they didn't. But still, you know. Dare I say it - what about "fairness"? :-) [0] https://gameworldobserver.com/2023…

I find it odd how we frame fairness in regards to open source software. He licensed his software as MIT. It says anyone can you use it without owing the author anything. So how is it unfair? To be clear, I think that open source maintainers deserve much more, but I don't understand why we rarely inspect the licenses as the source of the problem.

I think box2d was zlib licensed at the point angry birds was made. Not that the sentiment changes.

Re: Box3D, an open source 3D physics engine

#126

Earlier quoted context omitted.

I find it strange you’re arguing for something beyond the licensing terms. Imagine if companies were run that way. "Hey, we did an especially good job mowing your lawn, so please pay us double. You have a rich house, you can afford it. Oh and if you don’t pay us, you’re a bad person and should feel bad." This is exactly the same argument: you’re saying the open source maintainer who knowingly released their code as o…

"Society doesn't work that way" from the guy who says "the whole point of law is to guarantee outcomes". Ok buddy. Why is tipping the analogous model? Do the economics fit at all? Why is it tipping that is teaching us about the economics of oss? I also don't give the grocery store extra money just for "kindness". Why not go with that one? You think an oss maintainer reflecting on someone making hundreds of millions w…

Fair, to be honest.

Re: Box3D, an open source 3D physics engine

#127

Earlier quoted context omitted.

I love your articles. Used some techniques almost 10 years ago for hobby projects. Box2D/3D would make physics synchronisation a lot easier.

Thank you. I agree, Box3D is great! Maybe Erin will even add rollback determinism at some point. That would be a huge step forward for network physics rollback!

Hey Glenn, what do you mean by 'rollback determinism'? Is there some particular thing missing from Box3D now that makes it difficult to synchronize with solely the inputs?

My reading of Box3D's docs is that it has 'cross platform determinism', and 'recording/replay'? Isn't that sufficient?

Synchronize inputs, determine if inputs were 'mispredicted', if so, rollback the physics world, apply the changed inputs and resimulate?

Just for context: I implemented state-sync netcode into box2d in 2018 and shipped multiple real games using it - and I work on netcode professionally.

I'm planning on adding full netcode support for box3d and releasing it as part of a larger framework.

https://box2d.org/documentation3d/md_simulation.html#autotoc...

Re: Box3D, an open source 3D physics engine

#128

Earlier quoted context omitted.

Thank you. I agree, Box3D is great! Maybe Erin will even add rollback determinism at some point. That would be a huge step forward for network physics rollback!

Hey Glenn, what do you mean by 'rollback determinism'? Is there some particular thing missing from Box3D now that makes it difficult to synchronize with solely the inputs? My reading of Box3D's docs is that it has 'cross platform determinism', and 'recording/replay'? Isn't that sufficient? Synchronize inputs, determine if inputs were 'mispredicted', if so, rollback the physics world, apply the changed inputs and resi…

Hi! Rollback determinism is a term invented by Erin Catto here:

https://box2d.org/posts/2024/08/determinism/

Physics engines like Box3D have a significant amount of internal state and caching, like contact caching, and other things to speed things up.

I've talked to Erin a lot about stuff like: "Hey, what if I want to do an FPS or a vehicle, but I want to roll back only the character or vehicle, like in an FPS?"

From these discussions (and many other inputs I'm sure) Erin has had a big think about determinism, and come up with his own determinism and replay stuff.

In the article he uses the term "rollback determinism" to mean you'd be able to synchronize (or at least invalidate) any of this caching so that it doesn't affect the way the simulation replays if you were to rollback the simulation fully and then change the state only for a few objects.

For example, if you were to rewind and replay a physics simulation just for say the player predicted object like a vehicle and any objects that it happens to touch, expanding these objects out recursively as they touch other things.

Or if you were to do rollback on the player controller like we normally do in FPS, and the player started predicting a physically simulated door they push into, and then any other object the door pushes and so on, this sort of thing.

This should not affect you if you only step the physics simulation ahead with inputs, and do the GGPO thing where you copy fork, and step that sim ahead with predicted inputs, throw away, copy fork and predict again... that's already deterministic today.

cheers

Re: Box3D, an open source 3D physics engine

#129

Earlier quoted context omitted.

Hey Glenn, what do you mean by 'rollback determinism'? Is there some particular thing missing from Box3D now that makes it difficult to synchronize with solely the inputs? My reading of Box3D's docs is that it has 'cross platform determinism', and 'recording/replay'? Isn't that sufficient? Synchronize inputs, determine if inputs were 'mispredicted', if so, rollback the physics world, apply the changed inputs and resi…

Hi! Rollback determinism is a term invented by Erin Catto here: https://box2d.org/posts/2024/08/determinism/ Physics engines like Box3D have a significant amount of internal state and caching, like contact caching, and other things to speed things up. I've talked to Erin a lot about stuff like: "Hey, what if I want to do an FPS or a vehicle, but I want to roll back only the character or vehicle, like in an FPS?" From…

I see. This helps a lot thank you.

Thank you for your time. I respect you deeply and have valued your work.

For box2d, in the past I added a function to delete the entire contact cache and then I experimented with either calling that every single frame on both client and server, or only during a rollback.

In one game, I did the former and in most others, I did that latter.

In those box2d games, the entire world was predicted/resimulated, including remote players. A smart smoothing technique was used on remote players to dampen network artifacts. It worked well, even sniper rifles worked well. (The player movement had a certain flavor)

I am currently building something custom on top of Jolt, but will experiment with box3d.

The smart detection of what needs to be resimulated is something I'm just about to start on.

My mind is turning on how partial resimulation could be done on top of box3d's 'keyframe' recording system....

Re: Box3D, an open source 3D physics engine

#130

Earlier quoted context omitted.

Depends on what the little kid intends to do with it. A lot of them collect MLB baseballs to sell them for cash.

> A lot of them collect MLB baseballs to sell them for cash. You have evidence of this? Because it would be my first guess that the parent coerces their child to sell the ball.

At least a dozen times this season I've personally witnessed small kids talking about what they could buy with the money they would get from selling a foul ball that someone gave to them (out of guilt or public pressure) while their parents asked if they wouldn't rather keep it for the memories.

However, my home team is the Dodgers, so the experience is probably different in other markets where the local team sucks and nobody cares about the players (like the Anaheim Angels, where fans are more likely to throw the ball back onto the field than keep them).

Post reply on HN