realDragon11 / Trawel-Text

An open world text adventure rpg. (Source-Available, ask before redistributing.)
Other
5 stars 3 forks source link

Threading in Passage of Time #34

Closed realDragon11 closed 4 months ago

realDragon11 commented 1 year ago

Behavior World time updates now pass differently, and do not update right away. The game will attempt to 'catch up' while the user is being asked for input. If it is unable to finish part of an update soon after the user inputs a command, this will display an error message. (But not crash.) Potential Issues World state may desync, causing duplicates (most likely people) or deleting things (also most likely people). Threading may improve performance in most cases, but if there are issues, it might create 'lag' after entering commands as the short-lived threads do not complete as quickly as expected.

realDragon11 commented 1 year ago

Seems to be stable enough for most players, having made it on a 10 year old computer should probably have been evidence to that. Keeping this open for now, but it's unlikely that this has many issues on reasonable devices. That's not to say Trawel doesn't support unreasonable devices, just that they might have to use the command line args. ('nothreads' for threads in case anyone reading this wants to know.)

realDragon11 commented 4 months ago

After many months in the wild, I'm comfortable as marking this as fine, although due to it's nature as a watch it may have to return.