Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

Your problem isn't really with Python, but with pygbag (something you don't mention).

Look, Python always changes the random seed by default, and the code above is more than enough to get a different result every game. However, pygbag starts games in reproducible mode by default. Therefore, random.choice always selects the same element in each game.

Simply run this line before starting to use random:

random.seed(time.time())
(1 edit)

Thank you 👍, i will try it for sure!