PDA

View Full Version : simple city simulation



Tonyukuk
06-15-2004, 03:36 PM
I have a city with houses,trees etc but I want to add moving people and moving cars. do you have any idea about how can I do this?

brucemangy
06-15-2004, 04:03 PM
i guess you will have to find and write your own algorithm. :rolleyes:
but you need a list of structure which contains, model to render, position and rotations.
(you can add anything you want)
But you need one element per object.
For each frame you parse the list and render the specified mesh at the specified position and with the good orientation.
you will have to update this position a few times per second.
That is where your algorithm will be call.
you can begin with going from waypoint to waypoint
(like in a graph, you can set waypoint at intersection of roads maybe)
you will probably not want to see a people going thru a house ^^

this is quite interesting to write this kind of algorithm.

have fun ^^

--
brucemangy