2D jump (java,c# or c)

Posted 23 November 2012 - 11:01 AM

hello and thanks in advance to all helpers:).
my main language is java but since what i am trying to create is mainly graphical i will stick with c i guess.
i am a beginner programer so please dont write complicated things without explain first.
i want to create a game like super mario the classic (for pc), i am really only at the starting point when he walks on the ground right and left but i dont know how to make him jump, iasked few poeple and some said i need to use object priented proggraming and make Vy and Vx each a diffrent object but that sounds's to complicated for that and to be honest even if i do for each Vy and Vx object i will still dont know what to do than, so my main request is to know how to make a player jump up and down and also to the sizes ( like a balsitic movement ) , not somehting to complictaed and tricky.
i am working in turbo c and i hate every second of it so if anyone knows a better free programe please do tell.
Again thanks alot.

Re: 2D jump (java,c# or c)

And if you don't have a clue about what you are doing (vx and vy as an object??? /> ) I'd suggest learning some thing or two about a language of choice first.

One of the most simple (and ugly) methods of jumping is creating a player class, wich contains a x and y position, a jumpspeed and a jumpheight variable. Then just adjust the y position when a key (up or space, or whatever you want) gets pressed. Ssomething among the lines of: