TransWikia.com

Run a counter in the background

Stack Overflow Asked by Legacy Coding on December 23, 2021

Im trying to create an upgrader/tycoon game and realised to have the money continuously going up, I would have to start a different process so I can have my GUI which can be used as the money goes up without either stopping the other from working.

What is the best way to do this?

I’ve looked around on this site and nothing I could find has helped me!

(If you need any more information just let me know!)

One Answer

Use threading.

Python has a module named threading, and you need

threading.Thread(target=somefunc).start()

My old answer in the same topic: Here. If you consider adding some code to your question, I am happy to help in threading! Also, if you need help in designing the code, feel free to ask, threads can be messy.

Answered by nagyl on December 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP