Tsukikaze
Tsukikaze

Reputation: 13

How to create loading screen in Pygame?

The game I am working on needs a camera but it takes some time to load, making the game window unresponsive.

To load the camera, I am using OpenCV:

cap = cv2.VideoCapture(0)

Is there any way to create a loading screen while doing this?

Upvotes: 1

Views: 1552

Answers (1)

Yuval Keysar
Yuval Keysar

Reputation: 66

You can either draw the loading screen before you load the camera(Create an unresponsive screen) or use multithreading to open the loading screen in another thread.

Upvotes: 1

Related Questions