[ back to Tom 7 Radar ]

p
e
r
s
o
n
a
l
Our first non-physical system (07 Dec 2010 at 23:05)
During some spare time this fall I've been porting the physics library Box2D to Standard ML so that I can use it in my quixotic hobby of making video games (in Standard ML, with overly complex technology). I have some debugging now to do, and like with sound software the bugs in physics code are sometimes just really fun or interesting or hilarious. This was pretty much the first behavior that could remotely be described as physical from the porting effort, and to me it is a gem:

I get knocked down, but I get up again.


What's happening here is the polygon is falling to hit a solid object below it. When it strikes, a force is applied which obviously should make it go tumbling off to the left. I think (I haven't actually tracked down this bug yet, because as soon as I saw this I decided to make something to save animated gifs of bugs because I knew I'd be seeing more and want to save some) that what's happening is some simple sign or winding-order error that causes the angular force to be the opposite of what it should be. So instead of falling over, objects like this one experience the opposite force, which makes them wobble to stand up on their tippy toes, Chumbawumba style. It's remarkably stable. I'm kinda interested now in making some video games where the physics are nearly realistic, except for some fundamental error like this. I think it could be pretty fun to figure out how to move in such worlds with unintuitive but consistent behavior.
c
o
m
m
e
n
t
dwrensha (gs9666.sp.cs.cmu.edu) – 12.08.10 08:51:23
Sweet. Just in time for another broken-physics Ludum Dare.
c
o
m
m
e
n
t
Nels (gs5048.sp.cs.cmu.edu) – 12.08.10 09:37:28
I GET KNOCKED DOWN!
c
o
m
m
e
n
t
Reed (inetnar10x.ft28.upmc.edu) – 12.08.10 11:43:58
Game idea: AntiJenga - a game where you struggle to topple a tower of little chunks.

Oh wait, that already exists and is called Angry Birds.
c
o
m
m
e
n
t
Ryan (h66-38-129-154.gtconnect.net) – 12.08.10 13:35:37
I think I have tracked your bug down. You forgot the minus sign.
c
o
m
m
e
n
t
Tom 7 (c-67-186-6-86.hsd1.pa.comcast.net) – 12.08.10 19:34:39
Nels, did you see the alt-text on the image?
c
o
m
m
e
n
t
Nels (gs5048.sp.cs.cmu.edu) – 12.10.10 13:21:53
Chrome is not so good with Alt tags on gifs. I guess? Anyway, I looked at the source and saw it. Niceness!
c
o
m
m
e
n
t
Tom 7 (c-67-186-6-86.hsd1.pa.comcast.net) – 12.11.10 00:35:17
I was wondering if you were saying that because of the alt text or if you just independently had the same idea, because the latter would confirm my suspicion that we have similar senses of humor
c
o
m
m
e
n
t
Tom 7 (c-67-186-6-86.hsd1.pa.comcast.net) – 12.30.10 17:37:17
Except now I realized that I actually said "Chumbawumba style" in the post, making it not very coincidental.
p
o
s
t

a

c
o
m
m
e
n
t
[ Tom 7 Radar  •  Tom 7 on Google+  •  on Twitter  •  on Facebook ]