tag:blogger.com,1999:blog-1791631495483462759.post9058698787051192084..comments2024-03-25T07:29:21.225-07:00Comments on 3DWorld: Connecting Procedural Cities with RoadsFrank Gennarihttp://www.blogger.com/profile/02815853731800103017noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1791631495483462759.post-20883913313457547522021-09-06T18:54:02.981-07:002021-09-06T18:54:02.981-07:00Oh and yes, there actually is a road running right...Oh and yes, there actually is a road running right by the starting location with the new algorithm. There's no way to avoid having the starting area look different. Look at the small red circle on those two overhead map images - that's the player's location. There's a north/south road to the right of the player in the first map, and an east/west road directly under the player in the second map.Frank Gennarihttps://www.blogger.com/profile/02815853731800103017noreply@blogger.comtag:blogger.com,1999:blog-1791631495483462759.post-73324079962313397282021-09-06T18:51:29.478-07:002021-09-06T18:51:29.478-07:00It's not a problem with the random seed, since...It's not a problem with the random seed, since those systems use independent random number generators. It's because the placement of roads affects what areas secondary buildings can be added in, which affects the placement of those buildings, which affects the contents of those buildings. So a town will develop differently if there's a freeway running through the center of it. It all makes sense, and it's not something that can easily be fixed. The only way I can think of fixing it is by placing buildings without checking that the location is valid and removing them later. That way the valid building placements are all independent of what areas are valid. But this tends to break the user's control over the total number of buildings placed. (Note that this doesn't apply to the infinite/tiled placement algorithm, which won't suffer from this problem, but I'm not using that for this scene.) And anyway, making that change also will generate different buildings from what I'm used to. Thanks for the suggestion though.Frank Gennarihttps://www.blogger.com/profile/02815853731800103017noreply@blogger.comtag:blogger.com,1999:blog-1791631495483462759.post-84513168447246684542021-09-06T17:46:36.000-07:002021-09-06T17:46:36.000-07:00"the new algorithm does scramble around all o..."the new algorithm does scramble around all of the secondary buildings"<br />Ahh, random seed initialization bleed! This is why the pros generate a random seed for each subdivision zone, and initialize the twister with that value instead of using the global random function, so changes in adjacent systems don't bleed over. You might want to implement it soon. It won't get the city back that you're familiar with, but it will ensure you don't keep having these problems. It should also minimize generation "noise" if you ever decide to animate a high-level parameter, like island size. That would be an interesting "shrinking battlefield" game, where instead of the Battle Royale allowed zone shrinking, the generated area itself is shrinking.<br /><br />I like how the new road system looks even more like a circuit board than before.Paul Spoonerhttps://www.blogger.com/profile/17640871289041630907noreply@blogger.com