The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined variable $awaitingusers - Line: 33 - File: global.php(779) : eval()'d code PHP 8.1.31 (Linux)
|
Modeling traffic patterns - Printable Version +- High Frontier Forums (http://highfrontier.com/forum) +-- Forum: General (http://highfrontier.com/forum/forumdisplay.php?fid=1) +--- Forum: Dev Log (http://highfrontier.com/forum/forumdisplay.php?fid=15) +--- Thread: Modeling traffic patterns (/showthread.php?tid=127) |
Modeling traffic patterns - JoeStrout - 01-13-2016 We're pondering how to compute the traffic within a city in High Frontier. We know how to do traffic simulation in general, but now that it comes to actually incorporating it into the game, there's more than one way to approach it. First, the goals: 1. Draw more little people walking around on heavily-used paths than on lightly-used ones. 2. Figure out which buildings are underutilized, so maybe we can abandon them. And now, the basic approaches I see: 1. Generate random building-to-building trips (weighted by distance and probably by building type, e.g., residential much more often connects to commercial than to residential or agricultural). OR, 2. Actually make up a little record for every resident in the city, which would include where they live, where they work (or go to school), and where they typically shop and go for recreation. Generate trips on this data. A city in High Frontier has typically on order of 1000 residents, though it could be more or less. So the amount of data in approach 2 isn't outrageous. Obviously it's a lot more complex, though, so we would want to be sure it's worth it. Approach 2 would probably result in a more believable city, in that we could give each resident a unique Squawker handle, and make them squawk about their lives (e.g., looking for a home or job if we haven't assigned them one yet). We could potentially let you click on a resident (though they're very tiny!), and see where they live, work, etc. You might come to recognize certain residents tending to appear in certain parts of the city. And it seems like the best way to make sure the traffic paths are realistic. On the other hand, it is a lot of work, and might be one of those cases where there is more complexity to the sim than players can actually perceive. Especially when you get 1000 or more residents in a city, the odds of seeing the same resident enough times to notice is pretty slim. The random building-to-building trips, if we weight them properly, ought to generate very similar traffic patterns but be a lot lighter in terms of both computation and data storage. Opinions, questions, and random thoughts are more than welcome! |