Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

It doesn't seem unrelated to the mod, with 3 people I get about a full second delay after just a few ongoing actions. I haven't looked into the reason, but based on what Aric has said about his changes to the sex system I think I can narrow it down. There aren't many things that can have such a dramatic effect so fast without hanging the game, the dynamic text system is rather inefficient. From the sounds of it, Aric has added text interactions between all participants in the same action, so "decode" is likely called inside a loop that was inside another loop. Thus it would have an efficiency of O(C*N^2) with a rather large value for C.

Deleted 2 years ago

It's most likely not related to the amount of text, as you would need a lot more to cause issues. The performance impact increases significantly when you have lots of small additions to the text rather than one or two large additions to the text. This lag issue is caused by the amount of calculations performed before the text is displayed.

The core of the problem is that sexdescriptions.gd is quite inefficient and does about 50 times as much work as it needs to. Aric increased the number of times it is called from about 4-8 times per action to about 20-26 times per action (per person with 4 participants in the action, so a single action could result in 100 calls). So just the math for a single function suggests that it needs to perform about 4-5 times as many calculations as before. On top of that, Aric has added a large amount of additional calculations which are performed multiple times per action effect.

In effect the number of times the group of calculations is performed is N^2. Meaning that for 2 participants the group of calculations is performed 4 times. For 3 participants, 9 times. For 4 participants, 16 times. For an orgy of 6 participants, 36 times.

Deleted 2 years ago