Traffic and road building has been added to Software Inc.
Up until now, if you decided to build offices opposite to the road on the far end of the map, employees would end up spending most of their workday just walking to the office. To fix this problem, I added a traffic system, so you can build parking near your buildings and allow your workers to reach their computers on time (Richer employees obviously have fancier cars, which arrive earlier).
Below you can see a picture of how the game handles traffic internally. There are 4 road pieces, a dead end, a straight road, a T-section and a cross-section, each of which are rotated to connect up as you build the roads. Each of the road pieces have some internal nodes that describe how to get from the north to south, east to west, west to north, etc. The game then wires up these nodes when adjacent road pieces connect and the cars use them to find their way from A to B. The entire system is built using the same system employees use to find their way to their offices, so as I made some major improvements to the traffic system I also improved pathfinding for employees.
A problem I stumbled upon while testing this system was that cars would sometimes make circular traffic jams, as shown below. There are no traffic lights, so cars rely on other cars letting them pass as they move across intersections. If the cars form a circle, they will be forever waiting for the next car to move. I fixed this by continually keeping track of these circular jams and allowing for cars merging through each other if necessary.
In the previous versions of Software Inc., employees would spawn near the road, but because of the new road system, I decided to add a bus, which arrives each hour and loads off employees. It seems like a neat little feature, and it incentivises building roads, so employees aren’t forced to only arrive once an hour.
After some deliberation, I decided to keep the current offline version running after the Steam release, which is purchasable through the main site. If you buy Software Inc. before May 1st, when it releases on Steam, you will receive a Steam key. Afterwards, you will have to decide whether to get the Steam version, which requires that Steam is running to launch, or the offline version, which requires an unlimited use license key (no online activation).