Cities: Skylines

Cities: Skylines

Traffic++
leftbehind May 15, 2015 @ 6:20pm
Diary: Vehicle Restriction UI and Speed Restrictions
Just thought I'd do a little diary entry about the upcoming release. I've been helping (well, probably hindering lol) @jfarias with some graphics and stuff for the new vehicle restriction UI and also the brand new speed limit customiser... There's some sneak peeks in to the new features below, as well as some info on what is and is not included in this upcoming release.

Vehicle Restriction UI

After completing the vehicle restriction tool in the last update, it was obvious that the UI needed some work. Something more graphical - like a set of icons or images of vehicles and you just click them to toggle them on and off.

My first idea was to just take some screenshots using the isometric camera mod and do some image editing to put them on a transparent background - how hard can it be, right? EPIC FAIL[cloud.githubusercontent.com]! No matter what I tried, the result was always a blotchy pixellated mess.

While I went off to scour the internet for free vector art of similar vehicles to those found in C:S, eventually giving up and suggesting that I just buy some commercial artwork (example[graphicriver.net]), @jfarias was taking a completely different approach... Firing individual rays of virtual light at a 3D object and compiling the results in to an image. You know, just the simple run of the mill every day stuff. *brain explodes* The results were amazing[cloud.githubusercontent.com]!

After lots of tweaks and changes, as well as hair pulling at the insanity of the C:S UI system, the new UI started to emerge[cloud.githubusercontent.com] - and we think you'll like it a lot. It looks pretty swish[cloud.githubusercontent.com], almost like it's a standard feature of the game.

Speed Restrictions (new feature)

There were two basic choices - apply speed restrictions to entire roads, or to individual lanes. Applying speeds to lanes was far more desirable, for example you can make the inside lane of a highway faster, and the outside lane slower. With the recent T++ release, lane selection became really quick and easy - you just left click as many lanes as you want, anywhere on the map, and then you can apply changes to all of them in bulk.

The game itself actually does speeds at the road "prefab" level, so your choice of road sets the speed for all the lanes on it. But there's a limit on how many prefabs you can have, roughly 65,000. It's a good job we chose to do it at lane level (T++ keeps a separate list of lanes and their speeds), and it also means we're not changing the default road speed - should you need to run the mod in "ghost mode" for some reason, things will return to normal.

We needed icons for the UI, and we also needed to decide what speed options to provide... Our search for icons revolved mostly around wikipedia and some google image searching to double check things. It turns out that while there's a lot of subtle changes from country to country[en.wikipedia.org], they're all based on a fairly small number of common designs[en.wikipedia.org].

Initially we're going to use the Vienna Convention Sign C14 as the basis for the UI, like this one from Hungary[en.wikipedia.org], but in a later release we want to provide a way to choose the design[cloud.githubusercontent.com] that's used (particularly as US and Canada have a completely different style to everywhere else).

With the sign backgrounds done, the next thing was the numbers and text. A bit of google searching turned up a free (for hobby use) set of fonts[www.n1en.org] containing pretty much every style used around the world.

For the speeds, we factored in several things. Obviously, the default speeds of roads in the game; but we also googled to work out what the common speed limits are around the world in both kmp/h and mp/h, and we also spent some time thinking about what people would want to actually use. To keep the UI simple, we decided to provide 9 speed settings and came up with two lists[cloud.githubusercontent.com]:

* km/h: 15, 30, 40, 50, 70, 90, 100, 120, 140

* mph: 10, 15, 20, 30, 40, 50, 60, 70, 80

Note: Initially only the km/h speeds will be shown in the UI - in a later release we'll find a way to provide an mph option.

We feel that this gives a good selection that most people will like, although we can potentially make changes if there's enough demand.

It's likely that some people will want much faster speeds - especially if they're trying to recreate German roads that have no speed limit. The problem is that the game doesn't really apply realistic speeds to vehicles, that's why you get things like busses spending 6 hours at a bus stop. There's also the issue in how the game updates the graphics... vehicles are adjusted roughly 4 times a second, and the game engine just sort of smooths things out in between. If you had crazy fast vehicles, they'd end up crashing in to buildings before the game has time to say "hey, you might want to slow down for that intersection". It would be more like "hey, *CRASH*, oh, too late...".

Pondering future updates

Obviously, we want to add lane markings (we did some research[www.fhwa.dot.gov] in to that too) so you can see at a glance where speed restrictions are applied. We should be able to get that done fairly soon, it just needs some changes to the code that adds "BUS LANE" text to bus lanes.

Having done all the graphics for different traffic signs, it would certainly be nice if we could provide a way to select what type of sign you want and also whether to use km/h or mph. But how to achieve that is still being pondered - should we do it by continent (if so, would Canadians be forced to use American signs?), or maybe by country (that's going to be a long list to scroll though)...?

Then there's the actual traffic signs on the map. This release won't change those at all, but it would be nice if we could get to a point where it does. If you extend this train of thought further, it might even be nice if all traffic signs were updated (not just the speed ones), and maybe even road styles? Who knows what the future will bring?
Last edited by leftbehind; May 17, 2015 @ 4:36pm
< >
Showing 1-14 of 14 comments
Kookas May 17, 2015 @ 5:32am 
Really looking forward to making all-access motorway-speed "pedestrian roads" for narrow country lanes with this.
leftbehind May 17, 2015 @ 6:12am 
I'm looking forward to slowing some roads down on a windy road up a mountain, although not quite sure how I'll be able to slow specific sections of road down yet, will probably have to have those sections use a different style of road to enable them to be selected independently of the rest of the road.
Kookas May 17, 2015 @ 6:35am 
It would be a great traffic tool to stop people taking shortcuts through residential areas too (I actually had to deliberately make a road leading into a small neighbourhood twice as long once, just so that the traffic wouldn't prefer it to the main roads and congest the narrow neighbourhood roads).

Oh, I was thinking about the German roads thing. If you're trying to create a speed limitless autobahn, would buildings still be a problem? After all, in reality, I don't think they put buildings alongside autobahns, which is like most European motorways. As for the interchanges, perhaps only setting that super high speed limit on the lane furthest left would solve that issue?
leftbehind May 17, 2015 @ 6:44am 
I've started using cul de sacs (dead end roads) in residential areas to stop unwanted traffic - because the road leads nowhere, only cims who really need to go there will use it.

As for unlimited speed, it won't have much effect other than aesthetics.
Kookas May 17, 2015 @ 6:51am 
Yeah, cul-de-sacs are what I should've used really - the problem was probably that the neighbourhood was created around a road that formed an arc between two busy roads (also known as a shortcut around the official junction between those roads :p)

It was partly a problem with TM, though, because the lane customisation wasn't as clear-cut (you could assign the wrong lane to a junction easily). So sometimes I'd accidentally force huge volumes of traffic through residential areas simply because the main road was no longer a valid route because the lanes didn't go in the right directions.
Last edited by Kookas; May 17, 2015 @ 6:51am
leftbehind May 17, 2015 @ 8:21am 
Yup, the lane arrows are too inaccurate for complex intersections, you can't really tell which roads are left, ahead or right in many situations. That's why I prefer the T++ approach of drawing the lines, because then you see *exactly* what links to what.
BadPeanut  [developer] May 17, 2015 @ 12:19pm 
please consider the placement of the vehicle restriction button. i think it will be positioned in the same place as in game terraform mod
leftbehind May 17, 2015 @ 1:38pm 
I use that mod, and also the Favorite Cims mod, so will check that the button doesn't go there - if for some reason it does, we'll fix it.
Kookas May 17, 2015 @ 6:11pm 
I wonder how much work it would be to make third-party APIs for the game that make mods work together well, with a mod toolbar and such (like KSP's Toolbar mod). Probably a lot lol, but it could possibly be worth it maybe.
leftbehind May 17, 2015 @ 8:11pm 
The pathfinder is the biggest problem - it has to be really, really fast, and making it pluggable would slow it down. :/
bogie13 May 18, 2015 @ 10:41am 
This is tangentially related: One, I'd like to have an onramp busway. Also, I'd like to see the default speed limit for the busways increased, as IRL, the speed limits on these are often quite a bit higher than one would find on similar roads with unlimited access. It depends on the context IRL, however, and if the game sets the limits based on lane count - which would explain the lack of 3-lane one-ways and 2-lane highways - maybe that isn't an option. But a bus only onramp would be a nice higher-speed alternative for situations where it's appropriate, without the need to modify the limits manually lane by lane. Just some thoughts! I very (VERY!) much appreciate the effort @jfarias and you are putting into this mod. Thank you!
leftbehind May 18, 2015 @ 3:13pm 
The next release is adding customisable lane speeds so you'll be able to edit bus lanes to make them faster/slower as desired. Although it's done lane by lane, the way it works is so quick and easy it doesn't get in the way - simply left click the lanes in as many bus roads as desired, then bulk apply changes. As for effort put in to plugin, any effort I and others have put in is dwarfed by the amount @jfarias has put in.
Last edited by leftbehind; May 19, 2015 @ 1:23pm
Tv May 19, 2015 @ 1:20pm 
With respect to signs and units, it would be simplest to just have an option in the config to toggle metric/non-metric and sign style separately. The NAM project for SimCity 4 had this during the install process; tick off which options you want.
Last edited by Tv; May 19, 2015 @ 1:21pm
leftbehind May 19, 2015 @ 1:26pm 
Yeah, but there are many other aspects keyed of the location - not just metric vs. imperial. The signage (not just speed signs) is different, as are road designs, and so on.

For example, it would be nice for German players to choose their country and see properly named roads with correct default speeds, traffic signs and so on. Same applies for US, Canada, Japan and so on...

While a list of each country would be long, it's something that would rarely be used (a couple of times per game). We could start with just some of the major countries and then add a few more over time as people request them.
< >
Showing 1-14 of 14 comments
Per page: 1530 50