[pythonvis] trying to develop a game in pygame.

  • From: arqam mehmood <arqamgrt1@xxxxxxxxx>
  • To: pythonvis@xxxxxxxxxxxxx
  • Date: Wed, 28 Jul 2021 08:08:58 +0500

Hi everyone.
I'm learning python and pygame.
I'm trying to develop a game in pygame, a game engine in python.
but the problem is, if I want my program to show some text on screen,
screen readers does not read by default.
for this, I'm using accessible-output2 and pyttsx.
by using these module screen reader will read the text forcefully.
but for example, I have created a condition.
        if game_over:
            gameWindow.fill(white)
            talk("The game is over!")
Talk() is a user defined function that will let your screen reader
forcefully speak.
now, the problem is, this statement is in game loop, and when the game
is over, it speaks this text again and again, and I want it to speak
at once like,
the game is over!
but it is speaking again and again.
do anyone have any solution for this?
regards, Arqam Mehmood.
List web page is 
//www.freelists.org/webpage/pythonvis

To unsubscribe, send email to 
pythonvis-request@xxxxxxxxxxxxx with "unsubscribe" in the Subject field.

Other related posts: