K
K
Konstantin2021-11-22 16:44:42
pygame
Konstantin, 2021-11-22 16:44:42

How can you "generate" variables here?

Here's the code:
https://pastebin.com/sWXxgRSu
I'm implementing a collision system in my game and noticed that since I have a lot of blocks I need to create a lot of pygame.Rect variables.
How can you efficiently "generate" variables so that you don't have to create a bunch of pygame.Rect variables beforehand so that you can interact with them later?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2021-11-22
@Zoominger

Random (module random).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question