0

Hi, I was wondering is anyone could help me out. I'm trying to program Mario as my final for my comp sci. class. I'm not working about the actual Sprites now, just the basics, ie, moving, jumping and collisions. I'm stumped on the jumping part. Is there a good way to make him jump while retaining his x Velocity, and moving in a smooth arc?

4
Contributors
9
Replies
10
Views
8 Years
Discussion Span
Last Post by llemes4011
0

Hold x velocity constant, set an initial upwards y velocity (depending on how hard he jumps). In each time interval reduce the y velocity by a fixed small amount (modelling the effect of gravity). As the y velocity reduces to zero then goes negative he will follow an inverted parabola, just like the physic says he should.

0

I haven't messed with Java 3d yet, but I want to. Right now I'm just using the Rectangle class to store the information about the location of the ground, pipes, ect. and using the fillRect method to draw everything >.< It's pretty basic so far, no sprites yet...

GUI package?

0

OpenGL and Java3D are only necessary for 3D work. You don't need to worry about them if you are working with 2D.

0

hahaha, ok, for a second there, I was worrying that I'd done something REALLY wrong, lol =P

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.