Timeline for JavaScript HTML -- How can I implement gravity/jumping into my basic game?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 11, 2017 at 13:53 | history | edited | DMGregory♦ | CC BY-SA 3.0 |
Removing requests for off-site materials or to provide working code.
|
| Nov 11, 2017 at 13:51 | comment | added | DMGregory♦ | It looks like you have all the building blocks for a simple physics simulation: objects with position, velocity, and size properties, and a game loop where you modify velocities & positions prior to a display update. This looks like it should match up pretty much exactly with most beginner tutorials on the subject. But you say you haven't found anything online that matches up? It might help if you include a sample of a guide you're trying to follow, and highlight where you're running into trouble with it, so we can target our explanation toward this specific issue or gap. | |
| Nov 11, 2017 at 13:16 | comment | added | Anonymous Anonymous | Well, normally you should just implement a velocity change (i.e. acceleration) in the negative y direction during your main loop... For reference: Earth gravity accelerates a body by about 9.81 m/s^2 | |
| Nov 11, 2017 at 12:38 | review | First posts | |||
| Nov 11, 2017 at 13:53 | |||||
| Nov 11, 2017 at 12:34 | history | asked | Olivia | CC BY-SA 3.0 |