Skip to main content
Topic: No control for over a day upon loading a saved game (Read 6570 times) previous topic - next topic

No control for over a day upon loading a saved game

Hi

V102 Pak64

When I first load my saved game it runs for more than a day of game time before it becomes responsive to keyboard commands.

A possible explanation.   I have several hundred sailing ships. I notice that they are all stationary upon first loading. As the time p****es progressively more ships start to move..continuing the journey they were making when the game was saved. My hunch is that the game is doing some routing and wont start properly until its finished. 

I would prefer it to pause whilst it does this initial routing rather than lock me out.
Regards
Sev.

Re: No control for over a day upon loading a saved game

Reply #1
Yes, a ship takes a long time to find its route in complicated cases. You can even notice it when you have 10 ships that have to sail from one side of a big island to the other and then going upriver.

I know Prissi has improved ship-routing on his todo-list, but I'm afraid his todo-list is far longer than he has time to spend for.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Re: No control for over a day upon loading a saved game

Reply #2
Does the A* routing algorithm used by moving vehicles use the freelist cl****?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: No control for over a day upon loading a saved game

Reply #3
Does the A* routing algorithm used by moving vehicles use the freelist cl****?
No. It uses only the route_t::nodes, which are always allocated.

Re: No control for over a day upon loading a saved game

Reply #4
Would there be any benefit in allocating them from freelist?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: No control for over a day upon loading a saved game

Reply #5
I don't think so. You will waste some space, if you have them always allocated, but they are needed every now and then.

What kind of benefits do you think of?

Re: No control for over a day upon loading a saved game

Reply #6
I thought that it might reduce memory fragmentation.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: No control for over a day upon loading a saved game

Reply #7
Actually the ships should not do a route recalculation, their route is saved. Maybe there are thousands of pedestrian at one stop. Those take a long time for the initial sync step. (This mostly happens for autosaved games.)

Simutrans tries a complex internal algorithm to adjust the frame rate to certain values. When going from no load (initial map) to heavy load (big map) the algorithm does need some time to adapt. You can try to rest the algorithm by pressing p twiche during loading. But this might make things worse.

Re: No control for over a day upon loading a saved game

Reply #8
Hi

On occ****ion there are a thousand p****engers at some stops.  There is over 50,000 wood/planks at some of my warehouse stops..would that make a difference?

My ships..and I suspect there are well over 300..have a loop route with 19 stops.

I often press 'p'..as it is the pause command. As I micro manage I do a lot in pause mode.  I doubt that is making any differnece to the load time. Pause works fine normally. Its just that initial load of a save game..and the delay seems to be getting progressively worse as I add more ships.
Regards
Sev.

Re: No control for over a day upon loading a saved game

Reply #9
What is done after a day might be a rerouting of goods; although I do not see why.

I could heve a look at your savegame; but it may run fine on my computer.

Re: No control for over a day upon loading a saved game

Reply #10
On occ****ion there are a thousand p****engers at some stops.  There is over 50,000 wood/planks at some of my warehouse stops..would that make a difference?
It's actually not the number of p****engers / amount of goods, but the number of aggregation items which are grouped according to the destinations of p****engers/goods. For goods of a given category, there are usually very few destinations and valid routes, so this part should hardly matter. For p****engers, there is often a big interconnected network with many stops, so there it will matter.

Quote
My ships..and I suspect there are well over 300..have a loop route with 19 stops.
Nobody mentioned the obvious, so I will: if you use waypoints between the other stops, at least for longer distances, time for route (re-)calculation may drop vastly.