The Physics of Bad Piggies
January 7, 2013 6:30 AM   Subscribe

The physics of Bad Piggies:  Scale, mass, scale again,  balloons and friction
posted by Artw (11 comments total) 6 users marked this as a favorite
TIL tracker exists. Nice.
posted by DU at 6:53 AM on January 7, 2013

Previously: The Physics of Angry Birds - kind of surprised that set of articles didn't get it's own FPP.
posted by Artw at 7:13 AM on January 7, 2013

I've been spending more time than I should in the Field of Dreams DLC of Bad Piggies. The puzzle part was pretty underwhelming -- exactly the same as the other sandboxes, only a lot bigger and with more star boxes; it's not really challenging. But what's been really fun is that it gives you bountiful quantities of all possible parts and a lot more space to move them around in. A dozen or more each of wooden and metal boxes, motors, propellers, balloons, etc.

So I've been experimenting with how to make the fastest possible wheel-powered dragster (with the caveat that once it's powered on it stays on -- no human intervention allowed during the run, to prevent things like modulating the power to take avantage of terrain).

It's given me some appreciation of just how detailed the physics are in the game:
* A dragster made of wood is faster than one made of metal (less mass for the engine to move), but since the terrain is uneven, it's probably going to shatter when it hits ground after getting some air. It might even shatter from the force of launch.
* If your vehicle is only propelled by wheels and gets too much air, it's not going to go as fast as it could.
* A few drive wheels mean that some are going to spend more time in the air due to the torque on the vehicle body from the rearward wheels.
* A lot of drive wheels will consume more power than they contribute to forward velocity.
* You could build a >30-motor car, but a lot of motors can spend more effort moving themselves than the vehicle as a whole.
* Drive wheels at the back of a high-powered vehicle will usually just flip the thing over unless there's more mass than it can flip -- friction in the Bad Piggies universe is unrealistically high.

Basically, at this point I've got something so fast that it will scoot off screen faster than the screen can zoom out and pan right to catch up. I've had to impose on myself a rule that the piggie has to be the most forward boxed element on the vehicle, since that's what the camera locks to.

It looks like aerodynamics play a part as well; so far it's been difficult to consistently distinguish the effects of possible wind resistance from the effects of shifting mass over the drive wheels.
posted by ardgedee at 7:58 AM on January 7, 2013 [3 favorites]

I just noticed that the author of the linked articles doesn't seem to realize that the camera zooms when it follows quickly-accellerating elements. That might explain some of his experimental error. Also, he should really spring for that Field of Dreams DLC.

posted by ardgedee at 8:03 AM on January 7, 2013

You probably wouldn't getuch zoom once the piggie reached its apex and was in descent though.
posted by Artw at 8:17 AM on January 7, 2013

Let me check...

For a single block of TNT the camera doesn't seem to change angle at all, because the piggie isn't going fast enough to approach the edge of the frame. (A dozen blocks of TNT? You can blast the sucker through the clipping boundary of the FoD world, and it resets.)

I'm using the iPad for this test, though. The iPhone/iPod Touch version uses a tighter camera angle by default and will probably be more liberal with camera zooms.
posted by ardgedee at 8:49 AM on January 7, 2013

Oh yeah, another fun fact about TNT: You can direct the blast force by positioning inert objects; So for example if you want an optimal forward trajectory, build a wall of metal blocks filled with red motors behind the TNT.

I tried making piggie cannons but it's not possible to make a useful structure that's rigid enough to retain integrity when propped at an angle.
posted by ardgedee at 8:51 AM on January 7, 2013 [1 favorite]

in the sand box i've been building lots of dynamically interlocking multi-stage rockets with ejecting, parachuting crew capsules.
posted by striatic at 10:35 AM on January 7, 2013 [1 favorite]

Bad Piggies is built on Unity3D, which uses Nvidia PhysX as its physics engine (Angry Birds uses Box2D which is simpler). The fun thing about physics-based games is that the complex emergent behaviour arises from the simulation automatically.
posted by ikalliom at 10:58 AM on January 7, 2013 [1 favorite]

Hah, neat.

I made a multi-stage scooter, which launches a piggie on a powered scooter onto one of the upper tiers, but that was mostly an experiment to see how to use explosives to move things without breaking them.

It's also fun seeing what bugs have leaked through. The boundaries clipping is pretty egregious; it's very easy to throw things behind walls and under floors. There's also a bug I can inflict somewhat randomly where if you have a powered wheel turning a piggie, the piggie will turn counterclockwise (as expected) but the vehicle will travel as if the piggie's rotating clockwise.
posted by ardgedee at 11:21 AM on January 7, 2013

Oh yeah, one more thing to do with the Field of Dreams level:

Make multiple one-box, one-motor-wheel, one-motor units as you can fit in the build area. They shouldn't be connected. drop the piggie somewhere so that he will roll freely. When you power the wheel, all these self-powered boxes will tumble over each other and kick the piggie's head around like a mad robot's rugby scrum.

This doesn't prove or test anything physics-wise. It's just incredibly silly.
posted by ardgedee at 5:29 PM on January 7, 2013

« Older Not My Department   |   State of America Print Series Newer »

This thread has been archived and is closed to new comments