Subject: "Weather update code and skipping game loops." Previous topic | Next topic
Printer-friendly copy Email this topic to a friend CF Website
Top General Discussions Gameplay Topic #72187
Show all folders

TacThu 29-Nov-18 12:21 PM
Member since 15th Nov 2005
2050 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#72187, "Weather update code and skipping game loops."
Edited on Thu 29-Nov-18 12:25 PM

          

My base assumption is that CF still runs on the 1/4 second loop as the code it's based off of. All of my testing indicates this is still the case, however...

I set up some precise timing stuff in my client, and noticed that when the weather is updated, the game misses at least one game loop almost every time. If it happens on a tick (which I think it always does) and that tick includes an autosave, it can skip more than one game loop.

I think this can cause some weirdness with skipping violence pulses (basically missing rounds of combat) and is generally just weird results. It shouldn't, as far as my understanding goes, affect the ordering for lag effects since the order there is based on decrements of the wait state which happens as part of the loop.

So it won't account for a lag "bug" if one exists (I remain unconvinced though some of the logs do look funky), but will have undesirable behavior.


I'd suggest moving autosaving off of the tick, and probably weather update as well, but also maybe taking a look at the weather update code to see if it can be optimized better to not take so long. I have no idea how easy or hard that would be.


FYI: Worst case I've come across was 7.6118 seconds between a two round lag skill/spell execution, which happened at the day/night transition. Following executions were back very near to the 6.25 second average, so something like 5-6 loops were skipped.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote

TopicWeather update code and skipping game loops. [View all] , Tac, Thu 29-Nov-18 12:21 PM
Reply RE: Weather update code and skipping game loops., Thaedan (Anonymous), 29-Nov-18 02:52 PM, #2
Reply Yeah... It's noticable on a lot of things..., Tac, 29-Nov-18 04:06 PM, #3
Reply He's talking server processing time with spammed comman..., Kstatida, 30-Nov-18 02:48 AM, #4
     Reply RE: He's talking server processing time with spammed co..., Thaedan (Anonymous), 30-Nov-18 03:50 PM, #5
Reply RE: Weather update code and skipping game loops., Jhyrbian, 29-Nov-18 01:33 PM, #1
Top General Discussions Gameplay Topic #72187 Previous topic | Next topic