gridlock – Train Fever Official Website (archived) Tue, 21 Oct 2014 08:37:05 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 Performance improvement suggestion: Routes /forums/topic/performace-improvement-suggestion-routes/ Tue, 14 Oct 2014 18:15:42 +0000 /forums/topic/performace-improvement-suggestion-routes/ Continue reading ]]> It seems that the recalculation of all routes event is triggered on every change the user makes to the infrastructure. Later in the game, when you have a lot of routes, this causes quite some lag.

Here’s what I suggest:

  • When a user changes the infrastructure, the “recalculate routes” flagg is set to TRUE.
  • After a set interval, this causes the recalculation of all routes.
  • This interval should not be very high (like 2 seconds), but can be higher if the game is in pause.
  • The interval should reset if the user makes another change to the infrastructure, withing this timeperiod.

This way, upgrading streets and tracks will go much smoother. Now the game ‘hangs’ for a second or 2 on every section created/deleted or upgraded.

I’ts quite handy sometimes to see the route change immediately on making an adjustment to the infrastructure, but waiting 2 seconds for this when you deliberately try to optimize a route seems far less problematic that waiting on every change you make.

]]>