Help me decide about gameplay…
Read before voting please:
For a long time now I’ve been making an RPG game with pretty complex gameplay elements.
These require quite a lot of processing, and at times it can be a bit of a speedbump.
Lately I’ve found a way to put some of these processes in to the background (with threading) so they can be performed while the game is still running, without causing any locking or lag. The problem is that when python uses an extra thread it takes at least double the amount of time to complete the process (in this case actually nearly 4 times longer!).
I want to know, from a gaming point of view, which is better, a 1 second wait with everything locked up so it seems as if the game might have crashed, or a 4 second wait with everything still running, but having an animation showing “calculating…” or whatever?
Some things to consider:
- Because of the nature of python, using extra threads doesn’t actually improve speed. But it does stop the game from locking up or slowing down too much.
- If the levels get really big, or there are a huge number of enemies, this calculation time could go up to as much as 10 seconds…
- The game doesn’t always freeze during heavy calculations, but could drop to <10 frames per second.
- It may be possible to reduce calculation time “a little” but I’ve already done a lot of work in this area and further methods to cut calculation time would result in a much less capable AI.
- With threading you would still be able to carry out some actions during the AI turn, such as reading diary entries, checking your inventory, or getting mouseover information about enemies or allies.
- Some longer processes could be threaded, while shorter ones happen almost instantly.