Elvas Tower: Loading Bar Does Not Always Appear on Resume - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Loading Bar Does Not Always Appear on Resume Rate Topic: -----

#1 User is offline   Sid P. 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 463
  • Joined: 12-February 13
  • Gender:Male
  • Location:Canada
  • Simulator:Open Rails / MSTS
  • Country:

Posted 22 January 2014 - 08:56 AM

Version X1954 (although noticed on earlier versions).
I have noticed that sometimes the loading bar animation does not appear when resuming. This occurs when I load a session that I have just finished saving, after exiting ORTS.
I was not sure if this was normal. There is also a strange loading report line in the log file:

Loader: Time = 00:00:14.6640258 ms
Loader: Expected = 0 bytes
Loader: Actual = 222,198,697 bytes
Loader: Difference = 222,198,697 bytes (Infinity)

Everything works OK, however.
Is this behavior intentional?

Attached File(s)



#2 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 22 January 2014 - 09:19 AM

 Sid P., on 22 January 2014 - 08:56 AM, said:

Version X1954 (although noticed on earlier versions).
I have noticed that sometimes the loading bar animation does not appear when resuming. This occurs when I load a session that I have just finished saving, after exiting ORTS.
I was not sure if this was normal. There is also a strange loading report line in the log file:

Loader: Time = 00:00:14.6640258 ms
Loader: Expected = 0 bytes
Loader: Actual = 222,198,697 bytes
Loader: Difference = 222,198,697 bytes (Infinity)

Everything works OK, however.
Is this behavior intentional?


This is expected behaviour. The loading bar needs to see the load happen once before it can provide progress information the second time (and subsequent times). Thus, the first time you load any saved game, unfortunately, we can't provide any loading information (the same way we can't provide it for the first time you load each activity).

The "Loader" lines in the log are showing you: the time taken to do the load, the expected number of bytes read from disk, the actual number of bytes read from disk, and the difference. On subsequent loads, the expected and actual values should be close and where it says "Infinity" you should have a low percentage difference (<10%).

#3 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 22 January 2014 - 09:34 AM

 James Ross, on 22 January 2014 - 09:19 AM, said:

Thus, the first time you load any saved game, unfortunately, we can't provide any loading information (the same way we can't provide it for the first time you load each activity).


Is there any chance this will once be improved to also show the loading bar when first loading something? (iThere is a quite low chance a savegame will be loaded twice, e.g.).

For example, couldn´t the required byte-count to be loaded be recorded in a short pre-loading sequence, just reading the file sizes on disk and summing them up?

Cheers, Markus

#4 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,013
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 22 January 2014 - 09:36 AM

What could be done is what MSTS does, that is indicating the phases going on: Loading general files, loading world files, loading trainsets and so on.

#5 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 22 January 2014 - 09:41 AM

Even in ancient BASIC (which I´m learning on my own) there´s a function available to return the file of a size on disk in bytes. Assuming that from the activity, path etc. definition files it´s known which files will have to be read, wouldn´t it be possible to insert a maybe 3 second wait before actual loading will start? During these three seconds every required file would be called by such a "byte finder function" and the returns be added to find the total number of bytes to be loaded. This could replace the "recording" on first load, and three seconds only the route loading image will not do any harm :)

Cheers, Markus

#6 User is offline   Sid P. 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 463
  • Joined: 12-February 13
  • Gender:Male
  • Location:Canada
  • Simulator:Open Rails / MSTS
  • Country:

Posted 22 January 2014 - 12:49 PM

Hi James-
I must be missing something. When ORTS saves a game, it has full knowledge of the size and contents of the saved file - would that not be enough to be able to show the load bar during the first resume (i.e. loading the saved game ) ? It seems to me it would be more difficult to show the animation when loading an activity that had not been saved than when resuming a saved game.
I notice that if I resume the same saved game twice, I get the load bar the second time. But normally, I would only load it once, then save it (possibly) after running the activity for a while.
I'm not complaining - the startup system is great; I'm just puzzled.

Cheers,
Sid.

#7 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 23 January 2014 - 03:51 AM

 markus_GE, on 22 January 2014 - 09:34 AM, said:

Is there any chance this will once be improved to also show the loading bar when first loading something? (iThere is a quite low chance a savegame will be loaded twice, e.g.).


The long-term plan is to actually have loading progress generated by the code but this involves every (or nearly every) component that loads content to be hooked up in a reasonable way.

 markus_GE, on 22 January 2014 - 09:34 AM, said:

For example, couldn´t the required byte-count to be loaded be recorded in a short pre-loading sequence, just reading the file sizes on disk and summing them up?


The main issue is that, to calculate this, you need to read a load of the files to get there. For example:

  • You have to load the activity file to know what consists are in use.
  • You have to load the consists to know what wagons are in use.
  • You have to load the wagons to know what shapes are in use.
  • You have to load the shapes to know what textures are in use.


Shapes and textures are the big things - and the above doesn't even begin to cover the loading work needed to figure out the scenery.

Now, sure, you can probably load these files in a "lite" manner (i.e. skipping most of the processing of the file) but you'd still need to read them off disk - and, as the current progress bar shows, the disk reads themselves actually present a pretty representative loading progress.

A more advanced solution might be to cache (in a similar way to how we cache the activities and save files) some of the different steps above, e.g. cache the loading needed for a given wagon, and for each consist, etc., and then the pre-load might only have to do a quick check of which consists are active and which tile you are in. It'll still be a lot of work, though, as even if you have 10 trains (consists) in the saved game, how many of them need shapes/textures loaded because they are in view? Some extra data during save might help here, but it sure won't be simple. :)

 Csantucci, on 22 January 2014 - 09:36 AM, said:

What could be done is what MSTS does, that is indicating the phases going on: Loading general files, loading world files, loading trainsets and so on.


Yeah, that still needs some instrumentation of loading but not as much as the goal I mentioned at the top.

 markus_GE, on 22 January 2014 - 09:41 AM, said:

Even in ancient BASIC (which I´m learning on my own) there´s a function available to return the file of a size on disk in bytes. Assuming that from the activity, path etc. definition files it´s known which files will have to be read, wouldn´t it be possible to insert a maybe 3 second wait before actual loading will start? During these three seconds every required file would be called by such a "byte finder function" and the returns be added to find the total number of bytes to be loaded. This could replace the "recording" on first load, and three seconds only the route loading image will not do any harm :fiesta:


As mentioned above, the challenge is not getting the size of the files, it is knowing which files are needed.

 Sid P., on 22 January 2014 - 12:49 PM, said:

I must be missing something. When ORTS saves a game, it has full knowledge of the size and contents of the saved file - would that not be enough to be able to show the load bar during the first resume (i.e. loading the saved game ) ? It seems to me it would be more difficult to show the animation when loading an activity that had not been saved than when resuming a saved game.


Loading the saved game file itself is a miniscule part of the loading process - it probably completes before the progress bar even appears. The problem is knowing what shapes and textures (and terrain heightmaps, etc.) are needed. This is information not encoded in the save game and in some cases it would actually be tricky to encode it.

 Sid P., on 22 January 2014 - 12:49 PM, said:

I notice that if I resume the same saved game twice, I get the load bar the second time. But normally, I would only load it once, then save it (possibly) after running the activity for a while.


Yes, this limitation is very frustrating for saved games/resuming.

I have a variety of (mostly not evil) plots to improve this, both for initial loading of activities and for resuming saved games, but it will take some time and effort.

#8 User is offline   Sid P. 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 463
  • Joined: 12-February 13
  • Gender:Male
  • Location:Canada
  • Simulator:Open Rails / MSTS
  • Country:

Posted 23 January 2014 - 06:53 AM

Hi James-
I understand the problem now. Many thanks for your patient reply.
We all appreciate the amount of work that goes into building ORTS.

"Keep on Truckin'" !

Cheers,
Sid.

#9 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 23 January 2014 - 08:12 AM

Didn´t think of the "get you info" aspect of the process. True, I can´t think of any easy solution to that now...

Anyway, :fiesta: for the extensive reply :)

Cheers, Markus

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users