0

So I'm very new to Python so I'm not sure of the correct way to do what I need.

Basically I am creating a laser tag game. The whole game is controlled by some python code that runs on a PC, the hardware is basically just inputs and outputs for this code.

I want to have game files that are simple files with just the code for the game itself, that way it is fairly easy for anyone to make their own game modes.

Then there needs to be a main program with a GUI (Probably Tkinter) and code to handle sending/receiving information from the hardware (Laser tag guns). I need some way to select a game file from the GUI and run it, but I still need the main server code to be running (to take care of sending and receiving information from the guns, displaying live scores on the GUI, etc).

What would be the best (preferably fairly simple) way to go about doing something like this? Thanks!

1 Answers1

0

Cool project! Generally you let TkInter run in the main thread, and have the other tasks executed in other threads or processes. Brace for some hacking, parallelism is unfortunately pretty difficult to do right.

user23952
  • 578
  • 3
  • 10