So, a major problem in DF is the discrepancy between Adventure Mode and Dwarf Mode time scales. This discrepancy makes implementation of certain features in the game, both existing and planned, problematic, since they need to accommodate for a 72 fold difference in time speed between modes.
I will get to my suggestion on how to fix this, but, before I do, there are two threads this suggestion is based off of:Rectification of timescale across modes
andDwarf Mode Real Time Game Speed w/ Skipping Forward in Time
Basically, I want to present a suggestion of how to accomplish essentially what was stated in the first linked thread. A lot of these ideas were discussed in the second linked thread.
The overall suggestion is to do the following:
1. Make Dwarf Mode have two speeds it can run at that can be toggled at the players will. These speeds would be "slow" (same as Adventure Mode speed which is 1 tick = ~1 game second) and "fast" (same as current Dwarf Mode speed which is 1 tick = ~1.2 game minutes).
2. Increase movement speeds in Dwarf Mode to those of Adventure Mode.
In "fast" speed, movement would require some abstraction, as I think it would not be possible to have movement be calculated the same way as in "slow" speed. Basically, every once in a while, the game should cache possible paths between areas in the fort using an algorithm as detailed here
. It could be calculated once a game-month or something. Whenever the game is in "fast" mode and an entity needs to move, it will set up a path to where it needs to go using one of the cached paths. Every tick, the entity would advance along the path, having moved a distance equal to the speed of the entity times the time of the tick (~1.2 game minutes). Every tick, the traveling entity could check to see if its path has been interrupted or impeded (perhaps using the same calculations currently used for determining this in the game). Frizzil should chime in here. It would be nice to spend a chunk of this thread discussing implementation of this and how this would affect performance.
A very big problem I could foresee with this is that it might be impossible to just have the path caching take place only every once in a while. The map is dynamic with dwarves mining things out and building things all the time. In order for things to work without exploit, wouldn't the game need to make calculations every time something is built or mined out to see if it interrupts any cached paths? If so, would this be processor intensive enough that it would break the game?
Also, another equally big problem: for short distances that would take less than 1.2 game-minutes to travel by an entity, what should the game do in "fast" time? Like, for example, say a dwarf needs to haul some stuff a few tiles away that would only take 15 ticks in "slow" time. It would take only .21 ticks to accomplish the same task in "fast" time. Would the game be able to take this into account and allow the dwarf to be able to do other things during the same tick?
3. Increase combat speeds in Dwarf Mode to that of Adventure Mode
Any time combat would take place in Dwarf Mode, the game would automatically slow to "slow" speed if not already at that speed and continue with combat like it happens in Adventure Mode. As combat is something that shouldn't take that long (only a few game minutes, or maybe an hour or two for a huge skirmish!), this wouldn't be problematic, I don't think.
I don't really see any problems with this.
4. Have hunger/thirst/sleep requirements the same in Dwarf Mode as they are in Adventure Mode.
How this would affect gameplay would be contingent on how the pathing stuff in #2 would work. I do not at all see this impacting things negatively at all. Time spent eating and sleeping per day would end up taking the same proportion of time as it does now in the game.
The only problem I see is that assuming a dwarf will eat 3 times a day, sleep once a day, and need to walk to and from work at least once a day, that's 10 pathfinding calculations at the very least per game-day per dwarf. As things are right now, a dwarf maybe only needs to do these same things a fraction of that amount in the same amount of game-time... So this could push FPS to abysmally low levels at a much earlier stage of a fort's maturity. But that is all contingent on how #2 is handled.
5. Change the amount of food/water units harvested when harvesting a tile of plants/butchering an animal/getting water from a well to accommodate #4.
I would do this by increasing the yield of food units per animal, increasing yield of water/booze/whatever liquid for the purposes of consumption at least. I would also either increase the amount of food units yielded per plant, or just keep it as-is. The latter would require bigger farms (on the order of what is seen in human settlements in the game currently) to support a fort, which I am totally cool with. Either way, though, there would probably need to be some balancing and tweaking of food yield per plant to get things reasonable, which wouldn't be hard to do.
Increased number of items on the map at a given time might happen, which might hurt FPS depending on how things are handled. If how items and stuff are handled is kept as they are now in the game, this could be a problem, no?
6. Change the Dwarf Mode fluid simulation to accommodate #1 and #2
My suggestion could still work with keeping fluid mechanics the same as they are now in Dwarf Mode... but it would be silly looking.
I really haven't thought this part of the suggestion out. I am completely open to suggestions here.
Overall, I think my suggestion is plausible and something that should be seriously considered as a solution to a rather annoying thorn in the game's side.
Let's discuss this!!! Are there any problems I am failing to address? Anything not clear? I plan to update this post as more problems/solutions are brought to fore. Discussion of the problems in #2 would be much appreciated...
EDIT: Ok... after some discussion of the problems in #2, it appears that it is not possible to implement my suggestion without loss of detail in movement during "dwarf-mode" time. Depending on how much detail is lost, this could make my suggestion something that could make toggling between speeds (adventure-mode time and dwarf-mode time) alter how the game behaves enough to open up exploits and essentially break the game. :/ I don't feel like there is any way to know other than just trying it out and doing some controlled experiments.EDIT: I think my suggestion is impossible to effectively implement. See here.