Search code examples
pythontextpygamespritepygame-surface

How do you put text on a pygame screen?


I am making a game and I want there to be a score at the top left. How would I put text up there and can I make it a variable? I have tried looking online but everything I've seen is way too confusing.


Solution

  • You can do this -

    text = font.render('Text', BackGround(T or F), ForeColor (or Font Colour), Background Color)