pyherc icon indicating copy to clipboard operation
pyherc copied to clipboard

PyQt, ui thread and game logic

Open tuturto opened this issue 10 years ago • 2 comments

Game logic runs in ui thread, which makes game unresponsive now and then. Animations are pain to control too. Move game logic to a separate thread and see if this helps.

tuturto avatar Mar 10 '15 22:03 tuturto

also, animations seem to be causing problems and core dumps

tuturto avatar Jul 11 '15 10:07 tuturto

2 threads, worker thread and UI thread. Everything else but drawing, animations and reading input should run in worker thread. Input creates an action and hands it over to worker thread to process. Worker thread raises events as appropriate and they're (somehow) processed by UI thread. If blocking animation is running, action is not passed to worker thread.

tuturto avatar Jul 23 '15 12:07 tuturto