Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: simple city simulation

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2004
    Posts
    4

    simple city simulation

    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?

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2004
    Location
    Paris
    Posts
    25

    Re: simple city simulation

    i guess you will have to find and write your own algorithm.
    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
    "This is not a signature ..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •