I’m having some wild ideas for an fps and it would involve balloons! They are funny since they can float, lift, pop, burst, pysa (swedish) etc. Since I’m a noobie, could you guys just give some hints in how to start creating the following states/actions:
Floating ballon stuck in a string
Lifting balloon which might lift other objects
Poping balloon, probably easiest, but how do you do a nice 3D effect?
Bursting balloon, it should fly away like a rocket
a) Use a sphere that you continuously apply an upwards force opposing gravity to, in the physics tick method. Attach it to a static (e.g. terrain) physics object on the ground using a ConeJoint or Point2PointJoint.
b) Do the same but attach it to the object you want to lift and raise the upwards force on the sphere
c) Create an explosion effect (visual) where the sphere is and just remove the sphere and joint, causing the object to drop.
d) Remove the object and joint attached to the ballon and keep the upwards force but make it be applied local to the ballon rotation, the ballon will twist and turn due to the rotational forces that occur and randomly thrust its way through space
… its all not rocket science but you have to get an overview over your options before you can start to get productive. In plain words this means your game will suck if you try to create it without any prior experience in the engine, hence make the first games some simple ones and not your best idea
Floating a balloon is the same as your “fly away like a rocket”. This is only a matter of moving an object with some constraints (the string for example).
Lifting objects is probably no more difficult.
just parent it (the lifted is child of the balloon)
just move both objects the same
You could also involve a physical motor, but it seems to me not necessary in your “simple” case.
Popping the balloon requires a 3D animation of it. And THAT seems to me the most difficult part. Especially since JMonkey does not accept shape-key animations. Maybe you should have a look at explosions effects, so that the animation could be computed by JMonkey engine without precomputing it all over…