by Yosef F on February 23rd, 2009
When a few examples of the ported jiglib physics engine were released, I wanted to see what this engine was capable of. Here are a few of those experiments.
Please Download the Zip files to try each one of these out. They run much more smoothly when not running in a browser.
The Basketball example:
File: basketball.zip

How to play:
When you start, the basketball follows the mouse - click to shoot the ball forward and try to make a basket. If you get it in, the hoop will move somewhere randomly. The ball won’t come back to the mouse, but click again to shoot the ball from the position of the mouse.
About it:
By messing around with the weight and bounce, I got a nice basketball effect. One problem was creating the hoop; since making odd shapes to work with jiglib is near impossible - the hoop was just constructed out of 5 boxes.
The Bowling Example:
File:bowling.zip

How to play:
Move the mouse to position the bowling ball and then click to throw it. You get 2 shots to see if you can knock down all the pins - then it will restart the simulation. You start off with a 2lb ball at a pretty low speed, move the sliders to increase the weight, speed, and the spin of the ball.
About it:
Cool to see a bunch of things knocked out by a bowling ball weighing 50lbs… One of the major problems I’ve encountered with the jiglib engine is that objects moving too fast will go right through another object instead of colliding with it.
The Ball Drop Example:
File: ball_drop.zip

How to play:
Move the mouse to tilt the wooden board. You have to collect all the gold on the board to continue on to the next level. The weird angry thing following you will eat you if it catches up to you. Higher levels will increase the gravity on the ball and the speed that the weird angry thing follows you.
About it:
One of the major problems that had to be overcome in this example is detecting collision while moving the board. If you moved the board too fast - the ball would fall through. Although this is now almost fixed, other problems came up; if the gravity gets too strong, the ball begins to act oddly (happens around level 3).
The Dominos (The Coolest) Example:
File: dominos.zip
File: dominos_sample.xml

How to play:
Click “Play” to begin. Click anywhere on the board and hold the mouse button down. You will start dragging a domino. Let go of the mouse button to drop the domino and moving the mouse now will rotate the domino. Click again to finish placing the domino. Click “Look Around” to take a look around… you cannot place dominos while you’re looking around, to continue placing dominos click “Resume”. Once you’re done placing the dominos, click “Start” to drop the golden domino that will begin the chain drop. You can also click “Save” to see an xml with all the positions of the dominos you placed. If you want to load an xml layout, click “Load” and paste the xml there (you have to overwrite the existing text in the box).
About it:
As you can see, if you place too many dominos, the performance begins to slow down. I was able to increase the performance by setting a domino to immovable once it fell low enough. You can see how the domino freezes by dropping one outside the board.
And just remember BLITZ is still looking for another Senior Flash Developer with experience in papervision.
Share This