Skip to content
Sign upLog in
← Back to Community
Displaying scores
Profile icon
DEMONul1234

So I created that code here, but don't know how to make score appear on a turtle window

Voters
Profile icon
DalensJean1
Profile icon
DEMONul1234
Comments
hotnewtop
Profile icon
PattanAhmed

@DEMONul1234
Hi,
You can follow this awesome tutorial to find out how to make a perfect Pygame game.
Click here and you are done

You can fast-forward until your part of clarification is shown

Hope this helps
Please mark my answer if this helps

Profile icon
Muffinlavania

@DEMONul1234
!!!! I literally just made a game with this concept here it is
https://repl.it/@Muffinlavania/Super-Blaster
In the code you will see a turtle named scorekeeper, that the one that does it (Also play the game because to me it is very fun, i would full screen the turtle window)
oh wait.. this is pygame idk

Profile icon
DEMONul1234

@Muffinlavania
Yea, it is pygame. Figured doing it with turtle would be less...interesting

Profile icon
[deleted]

I would use:

screen.title("Score: " + score)

If that doesn't work let me know, I don't really know much about python with turtle so I'm just making a guess on the fly.

Profile icon
DEMONul1234

@GoofyGus
It does not work. Well 'title' is not an attribute for pygame, so nope... also int cannot be added to 'set_caption' which actually defines title.

Profile icon
[deleted]

Yeah sorry, I don't know much about pygame and stuff, maybe you need something like this?
https://techwithtim.net/tutorials/game-development-with-python/side-scroller-pygame/scoring-end-screen/


@DEMONul1234

Profile icon
adl212

@DEMONul1234

also int cannot be added to 'set_caption' which actually defines title.

You should replace score with str(score)