:) yaa. I almost got it to working.
private int dx = 1; //player speed
private int dy = 30; //height of jump
private int gravity = 2;
private int velocity_Y = 10; ...
Type: Posts; User: hwoarang69
:) yaa. I almost got it to working.
private int dx = 1; //player speed
private int dy = 30; //height of jump
private int gravity = 2;
private int velocity_Y = 10; ...
let me first say, thanks alot for helping me out, jps. I am starting to see how gravity works in 2d game, still have just a difficult.
i am trying to give a effect if jump up fast. slow down at...
ah i see. so i just want to make sure i understand this right.
vertical will be how height the player can jump. in this ex it's 10 pixs.
gravity will be the force pulling down.
[code]private...
yes, jump get to set to false when user let go of space bar. the code for that is in different file. so here is what i thinking:
if(jump == true){
if(jump_counter < jump_height){ //move up...
here is what i am trying to do:
I am trying to make my player jump if user hit the space bar. i am just trying to set up basic jummping nothing too hard.
the problem:
when user hold space bar,...