Saving the game takes up in-game time

Issue #73 new
Frumple created an issue

As per title. Simply save repeatedly near a hostile enemy and they will eventually move a space. Seems to be about 1/4th of an enemy turn (tested in relation to shadow oozes) per save.

Comments (3)

  1. RMTEW FULL NAME repo owner

    Every 60 ticks a turn happens. Every tick, creatures get to choose an action, if they are not already involved in one. If the player chooses to save when it comes to their part of the tick, then for the save to proceed we need to be outside the tick. Unfortunately this means that the game has to run naturally until it reaches the right location to save.

    This is the cost of doing business.

  2. RMTEW FULL NAME repo owner

    If the Play function which does the main in-game loop were made re-entrant and state was saved so that wherever it was in the turn could be resumed from directly, then this problem would go away. It's the only solution I've thought of anyway.

  3. Log in to comment