mardi 15 août 2023

Python random.seed() without system time

I am making a game for a Thumby in Python. I am using the random library to generate a random y value for a sprite. The random.seed() value, if left untouched, uses the system time. The Thumby doesn't have a system time, so how would I go about generating a random number?

So far I have tried having a value constantly go up by 0.001 in the while true loop, then setting that as the seed every time the level is reset. That is not working too well, so I need some advice.




Aucun commentaire:

Enregistrer un commentaire