#๐Ÿ”’ I made Flappy bird like game using pygame module but I don't know why my pipe are getting invisibl

11 messages ยท Page 1 of 1 (latest)

untold coyoteBOT
#

@ornate sequoia

Python help channel opened

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.

fierce mirage
#

that paste doesn't exist. did you copy the url fully?

ornate sequoia
fierce mirage
#

I'm not that experienced with pygame, but I noticed the pipes vanish when the first 2 pipes leave the screen.
your code may be calling this section repeatedly, clearing the entire upper_pipe and lower_pipe lists:


        if upperp_x1 <-(game_sprites["pipe"][0].get_width()) and lowerp_x1 <-(game_sprites["pipe"][1].get_width()):
            upper_pipe.pop(0)
            lower_pipe.pop(0)
ornate sequoia
fierce mirage
# ornate sequoia No bro When 1st pipe leaves the screen then all pipe get vanish

I meant the first upper and first lower pipes - so first 2 pipes
I don't have much time to check your code thoroughly and tell you exactly where the issue is, but I'd probably start with how you're storing and checking the pipe locations that causes that if statement (or wherever else the sprites get deleted) to run too many times

untold coyoteBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.

#

๐Ÿ”’ I made Flappy bird like game using pygame module but I don't know why my pipe are getting invisibl