Hey , this is really cool, and I know you are real good with physics and math so do you think you could figure out a way to have the character angle with the slope of the current ground beneath it, because I am thinking about making a dirt bike game, and I want it to have really nice physics so maybe you could help me out. I would need to calculate the mass with velocity in addition incline and the weight pulling down a slope, and making it jump into the air, keeping a proper path, and maybe like ragdoll type physics with bike tires and the rider. It is a huge challenge but I would like to attempt something like this.
I might want to play around with this sometime and shrink the scale so I can make mountains, put some water in a valley, and maybe some more variety in trees. Really cool though
To make it jump alot better, just do:
int gravity = 1;
int yspeed = 0;
public void [keycontrol]
{
//check for up key here
yspeed = -16 //jump height
fall(); //calculates velocity
}
public void fall()
{
setLocation(getX(),getY()+yspeed);
yspeed = yspeed + gravity;
}
public void [groundcheckingmethod]
{
if true
yspeed = 0;
}
yup, thats it, this will imitate a real jump.
2013/2/24
Formula 0
2013/2/24
Interactive Landscape
2013/2/24
terrain generation
2013/1/19
Warp
2013/1/5
chain reaction
2013/1/5
castle defence 1
2013/1/5
Physics2
2012/12/30
Physics2
2012/12/30
Minecraft-2D