Need Help to develop game application using java applets

I am student of computer science I need to create a game application using JAVA APPLETS.

The game will be more like Crazy Machines/The Incredible Machine but not that much detailed.

Aim of this game is to simulate a real world environment in java Applet, where user can add objects like box, ball etc and these objects behavior must be same as if they are in real like gravity, force, acceleration, friction, inertia etc

in my opinion the Interface will be divided into two sections:
1. one section will contain the objects list where from the user will pick the object
2. second section will be simulating the real world environment.

for example: if i grab/insert the object from list and put it into the second section of the interface and if the user place that object in air without any support it should fall to the ground. or if there is any support it should stay on top of it depends on the angle of support. if that support is inclined then object has to fall down towards inclination. You will understand what i am trying to say better if you just watch 1 min. video of Crazy Machines (link is mentioned at the end).

Kindly suggest me where to start.
Any help would be highly appreciated.
Thanks in advance.

P.S: following are the links to know more about crazy machines:



Incredible Machine

I’m not really sure what your question is. What have you tried so far? Where are you stuck?

Without more information, the best I can do is suggest you start with the basic tutorials: http://docs.oracle.com/javase/tutorial/

As Kevin says, it’s hard to know what advice to give.

Have you programmed Applets before? Do you know how to set up a basic Applet? (Java Tutorials for that.)

Have you programmed animation before? Do you know how to set up a ‘game loop’? Dealt with “velocity” and with “acceleration” (gravity, in this case)? This site has some game-loop demos.

Do you know how to draw shapes?

Do you know how to do collision detection?

I always seem to start with a game-loop animated bouncing ball or box. That might be a good start, then add gravity, then add more boxes & collision detection, then add the left/right functionality you describe.

Seems to me like you’re in way over your head.

However, to simulate 2D physics you’re best off using a 2D physics library like the popular Box2D library for C++. Lucky for you and me, it has been ported to java by other awesome people.

Java Box2D port
http://www.jbox2d.org/

Or alternatively a simpler API wrapped up in a lib called Fizzy by Kevin Glass.
http://old.cokeandcode.com/node/1438

If you don’t yet know how to draw images on the screen with java then you’re best off with java beginner tutorials and learning how to program first. There’s no use in trying to use a Physics library if you don’t know the basics of programming.