#๐ Flappy bird pipes generation
30 messages ยท Page 1 of 1 (latest)
@stark cradle
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.
I would create them at random heights, and place them in a list. Just create them all at the beginning. Iterate over the list to move them.
I've done something similar with turtle graphics.
Oh I forgot to say i want the seperation distance to be PIPE_SEPARATION = 300
But still same thing, I apprecaite the help
I would define like certain limits, like limit for pipe 1 and then u can generate the other witha pipe separation
yea exactly that
and idk use random library for pipe generation
and like pipe_gap
yea
I think I kinda off understand how I'll have a try
I'm at work on my phone, so I can't help with the details, but the general approach should help. Objects off the screen aren't visible
Oh yeah objects need to be deleted when off the screen too
ping me when u make it or u have a doubt
but thats just like .delete or something right?
u can create like a list with temporary objects changing all the time ig
Just real quick should pipe_gap be a constant in the gui class
or just self._pipe_gap = 300 is fine?
while pipe seperation is constant
i would make it global variable since u wont be changing it but if ur making it with a class better be self.pipe etc
Nah I think i understand actually maybe they should both be constants in the gui class
Thanks ๐
yw
Remember this
Okay i'll have a crack at it all ping if i need help tysm
sorry dont mean to bother but do you think I should maybe return when the pipes are off the screen in this function which is in the pipe class. Adding something like this
self._x + self._pipe_width < 0
Or is there a different method you'd do?
So that they can be deleted
!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.