#๐ Need pygame help.
13 messages ยท Page 1 of 1 (latest)
@tight solstice
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Hello! you can acheive gravity by updating the velocity and the position
velocity += acceleration # Here replace acceleration with a g value
position += velocity
velocity is the change of position. you can add velocity to the position every frame. Similarly acceleration is the change of velocity so add acceleration to the velocity every frame.
for flappy bird you only have to worry about up and down motion and not right and left
so acceleration will be just g
g can be 1, 2, anything. make sure it's not too large or else the bird will fall too fast
Thank you so much!
anything you didnt understand?
Nah, I think I got it.
great! happy to help!
!close
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.