Page 1 of 1

[Fixed] Roads in 237

Posted: 21 Feb 2017, 22:36
by CommanderABab
Image

This is the only overpass that Ive managed to get built using an expressway.
I can't get it to connect to anything though.
Traffic stops moving when any road to build is selected.

Image

Posted: 21 Feb 2017, 22:41
by Lobby
It seems as if we still need some more optimizations for biiiiig cities. For now it should help to zoom in a bit.

Posted: 21 Feb 2017, 22:44
by Sometheotown mayor
Oh my...
How in the hell did you get 780k ??!!

Posted: 21 Feb 2017, 22:46
by Sometheotown mayor
Oh and by the way lobby who had the idea of naming the curency theons
That's a cool name ! It gives a, special something that is unique to this game

Posted: 21 Feb 2017, 23:05
by CommanderABab
Zooming helps only slightly. Highways are so hard to build that I placed a building there instead. I had thought of building 6 span highway there and doing the crossroads overpass.

But the overpass will disconnect some buildings from the roads in the up down sections. So, since there are other highways nearby in the same direction, it will have to be buildings

.Image

Posted: 21 Feb 2017, 23:09
by rare_metal
Also icons confused me. When i built road from ground ground to top level i choose third icon. But road was built from top level to ground.

Posted: 21 Feb 2017, 23:16
by Sometheotown mayor
Wow can you send files for that building

(PS: check your messages please)

Posted: 21 Feb 2017, 23:17
by Sometheotown mayor
Nevermind dont check your messages you already saw it

Posted: 22 Feb 2017, 00:31
by Lobby
I'm not sure what the reason is for these performance drops. Maybe just to much work overall for the CPU :?

Version 238 will contain a cache so it will only lag once. We have to do some research in order to solve the original problem.

Posted: 22 Feb 2017, 00:35
by Sometheotown mayor
Lobby i posted a new topic in general discussion (non elevated train tracks) can you check it please

Posted: 22 Feb 2017, 01:35
by Lobby
I finally fixed the lag issue. The problem really wasn't obvious. But see for yourself

Code: Select all

city.getRoads().removeAll(removedRoads);
city.getRoads().addAll(addedRoads);
The query whether a road can be built from A to B issued always these two calls when finished. city.getRoads() is the list of all roads while removedRoads and addedRoads are lists of added/removed roads during the build process. As nothing has been built in the query, the latter both lists are empty. The calls should therefore be really cheap.

In reality, they aren't if city.getRoads() is a really long list (as for big cities). A solution is just to avoid the two calls as they aren't needed here.

In conclusion: Don't expect any library function to be smart enough to not do unneeded heavy work where no work is to do at all. More precise: removeAll() iterates over all elements of the list, even if the list given as parameter is empty.

Try out version 239 or later to get a performance boost in road building 8)

Posted: 22 Feb 2017, 01:52
by CommanderABab
A series of screenshots:
Image
Image
Image
Image
Image
Image

Had to pause the game to get it built.
Four spans of highway
<<<<
<<<<
>>>>>
>>>>>


Removed the center two , repaced the cross street.

The overpass would not build with the outer spans at the destination.

Had to delete those tiles. Then the overpass would build. Replaced the outer span tiles with oneway.

Posted: 22 Feb 2017, 03:24
by CommanderABab
239 works much better! &#9786;