I want to make a flappy bird game and make the screen fit to the size of output box but:
what i tried is using os.get_terminal _size but then it makes the output really small
WIDTH = os.get_terminal_size().columns
HEIGHT = os.get_terminal_size().lines
brick = Actor("brick")
brick.x = 90
brick.y = 250
I took a look and worked through the start of the tutorial. I had the same issue but noticed that pyflakes had underlined the Actor command.
After some searching I found that if you add the following line after
import pgzrun it should work:
from pgzero.builtins import Actor, animate, keyboard
so it will fit too the size of the output box
I’m not sure what you are saying here @PrestonCurtis1 . Did the above suggestion not help you display the brick image? Or now that it is displaying, the size is still small?
I think that maybe you are using incorrect values to get the screen size. You are trying to get the terminal size which is the
console window as far as I’m aware.
Could you try this instead?
infoObject = pygame.display.Info()
You would also have to
import pygame for the above code to work.
Hi @PrestonCurtis1 did the above suggestion help you solve your issue?
yeah it did @IanAtReplit thanks
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.