Page 1 of 1

Tilty Platform and other effects from example in my game

Posted: Sat Dec 07, 2013 8:54 am
by binarypat
I am trying implement the 'tilty platform' and 'water and crate; from the example platformer in my game.

My game has different camera settings. It is setup as ortho with 1 unit = 1 pixel. I also have gravity set at -4000

With the tilty platform settings identical to the settings in the example, the platform is rotated at about 15 degrees instead of 0.

The crate sinks to the bottom of the water and does not bounce

I have double checked and the code and properties are set the same as the are in the example.

Any idea of why it is behaving this way?

Another question is how do you determine where to set gravity? Is there a rule of thumb or calc based on say the size of the main character?

Thanks

-Pat

Re: Tilty Platform and other effects from example in my game

Posted: Mon Dec 09, 2013 5:43 pm
by binarypat
Update:

I reduced the gravity to 1,600 and now both effect work. I also had to play with FLUID_DENSITY and FLUID_DRAG to get the buoyancy effect to work.

I am still interested in hearing what you or anyone has to say about how to determine the value for gravity

Thanks

Re: Tilty Platform and other effects from example in my game

Posted: Wed Dec 18, 2013 6:34 pm
by Exploding Rabbit
binarypat wrote: Another question is how do you determine where to set gravity? Is there a rule of thumb or calc based on say the size of the main character?
I just set the gravity based on how fast I want things to fall. I don't know of any rules or guidelines besides that.

Re: Tilty Platform and other effects from example in my game

Posted: Thu Dec 19, 2013 11:26 am
by slembcke
Yeah, I guess I just set it to whatever looks nice. If things look to "floaty" then increase gravity. If they look to heavy, decrease it. You don't really need to be scientific in a game when the character can jump 20 feet in the air. ;) Mario's gravity is not.