JBullet Experiment
in
Share your Work
•
1 year ago
I have uploaded a small project I did a while back while experimenting with the JBullet physics engine and Processing. I remember JBullet being a little finicky to set up and thought it would be nice to release this working example and maybe get a little feedback. The example also includes setting up a static triangle mesh collision object in JBullet and a "raw mouse" setup using java.awt.Robot.
It is something of a game or could be an actual game if developed further. It consists of two balls on top of each other. Hold the left mouse button and drag to apply force to the top ball in the direction of the mouse movement. Try to keep the top ball from touching the ground for as long as possible. The game restarts automatically when you fail. Also it is pause-able by pressing 'p' or the pause key. This releases the mouse. Start dragging again to continue. Press 'r' to reset the high score. Escape exits immediately.
http://www.r6753.com/balanceBalls.windows32.zip
http://www.r6753.com/balanceBalls.macosx.zip
http://www.r6753.com/balanceBalls.linux32.zip
I guess I am pretty good at it from all the practice while developing it. It is easiest with an actual mouse and a large area to move it through. On my system, it sometimes fails to render one of the balls and it has runtime exceptions that I am ignoring. I haven't tested it on Mac or Linux.
The code is messy and has no comments, but I can break it down and try to help if anyone else wants to attempt to work with JBullet. I'd like to get back into it and try a dynamic triangle mesh example next. Any feedback is appreciated, especially weather or not it works on Mac and Linux.
It is something of a game or could be an actual game if developed further. It consists of two balls on top of each other. Hold the left mouse button and drag to apply force to the top ball in the direction of the mouse movement. Try to keep the top ball from touching the ground for as long as possible. The game restarts automatically when you fail. Also it is pause-able by pressing 'p' or the pause key. This releases the mouse. Start dragging again to continue. Press 'r' to reset the high score. Escape exits immediately.
http://www.r6753.com/balanceBalls.windows32.zip
http://www.r6753.com/balanceBalls.macosx.zip
http://www.r6753.com/balanceBalls.linux32.zip
I guess I am pretty good at it from all the practice while developing it. It is easiest with an actual mouse and a large area to move it through. On my system, it sometimes fails to render one of the balls and it has runtime exceptions that I am ignoring. I haven't tested it on Mac or Linux.
The code is messy and has no comments, but I can break it down and try to help if anyone else wants to attempt to work with JBullet. I'd like to get back into it and try a dynamic triangle mesh example next. Any feedback is appreciated, especially weather or not it works on Mac and Linux.