However I kind of dove right into making the game. It wasn't really planned out at all, as I just found myself bored and started throwing things together.
That being said I need to backtrack a little.
1. Moving sprites:
Currently I'm moving my character sprite to the right like this: Does this seem right? Or should position play no part in my movement, meaning I move the sprite with just velocity acceleration and time.
g_sprite_i->m_fPosition_x -= g_sprite_i->m_fVelocity_x;
How can I include time as a reference for moving the sprite?
I don't have any code to currently attempt that.
I set gravity to push down if the character is less than 0 on the y axis. He always is so gravity is always active. So how can I now make the character jump and fall down due to gravity.
I set up gravity....and it was all wrong. I pretty much faked the hell out of it using a bunch of current positions of the sprite. Like if he was less than zero push down with 8N. But if I make him jump with 8N he stays in the air. Cuz the gravity is equal to his jump. If I set gravity one higher than jump speed he doesn't jump at all. If I set gravity one lower he jumps, and can keep going up if the button is held down.
I have backtracked so far I lost the gravity I had working so I can't drop in how I was doing it. But it wasn't working 100 percent properly so I'll avoid it all together.
What's a good way to set it up.
This is an extremely basic 2D sprite game like mario/megaman where gravity can't just push me to the ground. I need to be able to jump again once I'm on a platform.