Im-dex / xray-162

XRay engine 1.6.2 (S.T.A.L.K.E.R: Call of Pripyat) evolution
Apache License 2.0
46 stars 11 forks source link

Combie two engine threads to one #60

Closed jazzvaz closed 6 years ago

jazzvaz commented 6 years ago

I don't know what was the idea behind having two threads, but i think it is better to combine them into one main loop. If I get it right, one thread is used for rendering, and I think that there is one specific annoying moment in game because of this: when game freezes, player cannot do anything, but the world around and creatures move. For example, after the freeze is gone, the dog, which was away from actor before, can be already next to player and bite him...

Im-dex commented 6 years ago

@jazzvaz It is a very complicated task and requires complex analysis.

For example, after the freeze is gone, the dog, which was away from actor before, can be already next to player and bite him...

It may be not a threading problem. Logic updates use a delta time, so after a freeze, the delta is bigger than usual and you can see that strange behavior.

jazzvaz commented 6 years ago

@Im-dex might be true. Another question: is it known what is causes freezing? Spawning? Scripts?

Im-dex commented 6 years ago

@jazzvaz I don't know exactly, but I think the issue is complex: the engine has complicated client-server synchronization logic, heavy alife online/offline switch, bad world streaming implementation and much more.

jazzvaz commented 6 years ago

@Im-dex thinking the create own engine :)