3
I’ve been wanting to make a kind of game that you go shopping for some things that help you make a profit, and you would have a sum that you earned per second, but I don’t know if there’s any way I can run two loops(one to interact with the player and the other to add an amount of money to the player per second) in python, if anyone knows, can help me?
You can have a single loop and embed a state machine, in the first state you interact with the player and in the second care adds the money; making fast will give the feeling that it is simultaneous -- is how several games do.
– Giovanni Nunes
It’s an interesting question because it raises some questions like - use threads? Simulate competition using other techniques?
– epx
You can use recursiveness, either within the other or two functions, one with each for... There are many possibilities.
– Mariana Bayonetta