I just came up with a super easy way of simulating gravity:
vel.y = pushVel + gravityPull;
pushVel = vel.y;
rect.move(vel);
PushVel is the jump force when you want to jump(-50 for example) and gravityPull is something between 1-8, depending on how much gravity there should be. This concept works with both platformer gravity and if you want to simulate orbits and stuff!
Why do you need PushVel at all? You could achieve the same with just the velocity and gravity:
vel.y += gravityPull;
rect.move(vel);
You would just set vel.y instead of setting PushVel.
gravityPull is something between 1-8
Why 1 and 8?