leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
275 stars 52 forks source link

Freezes momentarily when loading the object for the first time. #324

Open RRX-JP opened 5 years ago

RRX-JP commented 5 years ago

Description

It freezes momentarily at the same position when loading an object etc. There was no change even when doing [pre-loading of texture].

Also, it will freeze only the first time at the time the text is displayed due to excess speed limit etc. As you can see the video 2: 54 part, the game freezes like this.

※ The following movie is remodeling vehicle performance etc for bug report https://www.youtube.com/watch?v=bmyU2KpM7Pg&t=2m50s

I found information that might be helpful for delay problems. https://teratail.com/questions/155839

Reproduction

Every occurrence

Route

any.

Train

any,

Logs

Related information

Intel Core i7-4771 CPU @ 3.50GHz. G.SKILL F3-2133C9Q-32GZH (DDR3-2133 CL9 8GB×4) (Since the motherboard does not support quad channel, it works on the dual channel. xD) Nvidia GTX 1070. Storage. HDD. (*but Test on Ram disk.)

Display distance 2000m

*Ram disk.

CrystalDiskMark 6.0.2 x64 (C) 2007-2018 hiyohiyo Crystal Dew World : https://crystalmark.info/

leezer3 commented 5 years ago

The short answer is that this is a limitation of the current architecture of openBVE.

I don't believe it's openGL related- Most of our current speed / lag issues come from the loading / update of objects.

Fundamentally speaking, we use a single-threaded blocking architecture, in which the game world is moved around the camera (As opposed to the more common, but more complex method of moving the camera within a set of world tiles). The blip you see on the block boundary is caused by the objects in the next visible block being pre-processed and the verticies updated.

RRX-JP commented 5 years ago

I don't believe it's openGL related- Most of our current speed / lag issues come from the loading / update of objects. OK.

Is it possible to improve it?

Since this problem does not occur once it is read, Data reading and display are completely separated,

Current speed (m / s) x prefetch time + depiction distance It seems that there is no problem with perfect separation if you start loading the object with.