[Prototype] Random City Traffic

Been working on a procedural city prototype for the past week, this is the traffic component:

Thanked by 2wogan roguecode

Comments

  • Cool start :) Really reminds me of SimCity 2000 which just went free on Origin, tempting me to go play it again and dump a huge swathe of time recreating my childhood neighbourhood :P

    Ahem the point at hand :P So the one thing I remember being the most important about traffic simulation isn't so much the individual vehicles, but a believable route - so it's cool that they do stuff, but they should have an origin and a destination - so a trip from home to work, to the shops, back to home, at different time periods. Multiply the location by some randomness, and sprinkle for rush hour, etc, and you'll have a cool simulation :)

    Looks like fun, what's it for?
  • Thinking of making a puzzle game for Android, the traffic simulation is just for eye candy so that's why cars don't have actual routes.

    SimCity 2000 was great, some nice memories, gotta love the point when your whole board is covered with those MegaTowers :)
  • Tuism said:
    So the one thing I remember being the most important about traffic simulation isn't so much the individual vehicles, but a believable route - so it's cool that they do stuff, but they should have an origin and a destination - so a trip from home to work, to the shops, back to home, at different time periods. Multiply the location by some randomness, and sprinkle for rush hour, etc, and you'll have a cool simulation :)
    Along with that, make them smart enough to not just take the shortest route if it will take longer to get home (because of rush hour etc.) that way.
    Looks good @critic!
  • Arcologies! Reticulating Splines! :)
  • Looks good! Question: How did you do those roads? Textured planes, is it baked into the larger plane, or some other magic?
  • It's dynamically baked onto the larger quad.
  • Looks very cool :)
  • edited
    One thing I note is that the cars can u-turn when they get to a crossing; they should know the road they're entering in on and pick a different road
  • Yes, they do that. It's two extra lines of code, I'm using this as background eye candy, really doubt it will even be noticeable.

    image
  • This is really neat.

    For a while now I've been wanting to mess around with a traffic simulator with realistic routes like @Tuism mentioned, then let the player setup stop lights and other things to experiment with the flow. When talking about it with @argh he mentioned how cool it would be to use actual street data from google maps or some such.
  • @n1c, I know I guy that tried to do this, basic implementation is not too difficult. However there are some really crazy real life roads out there. Things like 6 way intersections and slip roads that run at some very strange angles.
Sign In or Register to comment.