Advertisement

Need help for bus simulation

Started by September 10, 2006 06:40 AM
10 comments, last by van2005ko 18 years, 4 months ago
Hi everyone..I am a newbie to game programming and game AI, and currently working on a Public Bus Simulation project. After doing some analysis,I realise that the main classes of my simulation system would be Bus, Bus Stop, Road, Intersection and Traffic Light. My question is how should I design those classes. For instance,for Road class, what should I include besides the 3D points of the road? For every game loop, each Bus should check if there is any obstacle or vehicle ahead before it updates its position in order to avoid collision. So how can Bus get information about obstacles on the road? Should I store those information inside the Road class itself? This is my final year project and I am totally lost right now coz I am new to graphic and game programming though I do have some programming experiences in C++ and Java. Help and suggestions are really appreciated. Thanks .
Hmm, I won't say too much since this is effectively homework (albeit very long homework). What you need to consider is the spatial relationship between the various objects in your simulation....the bus, bus stop, and traffic lights all lie ON the road, so the road is what defines the 'space' in which these object interact. Your 'Road' class represents a single piece of road, and your 'Intersection' represents the interconnections between those pieces. You now have a graph that defines the space in which your simulation occurs, where your 'Road' class is an edge and your 'Intersection' class is the nodes. A 'Bus' and 'Bus Stop' can only exist on the edges of the graph (assuming your busses never stop in the middle of an intersection) and 'TrafficLight's exist at the nodes.

Now, assuming your a comp. sci. student, you should know all about graphs [smile]
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
Advertisement
Thanks a lot for your advice. How about collision avoidence? How could a bus can detect other buses and obstacles and avoid collision?

And what should be the relationship between Bus, BusStop and TrafficLight as it seems to me that each Bus need to hold references to TrafficLights and BusStops on its route?

I am a computer engineering student and not very familar with graph :D but I suppose that you are talking about graph data structure.

Thanks again for your post. I do appreciate it.
The Road is what connects them all. The Bus will be on a particular Road segment (and thus have a reference to and position on a Road) and will be interested in:

A) Other busses on the same segment (ie. a Road needs a list of Busses on it)
B) BusStops on the segment (ie. a Road needs a list of BusStops on it)
C) The next upcoming Intersection (ie. a Road needs to know which intersections it's connected to)

Since each bus will have a reference to the Road its on, it will also have access to the above information that's related to that Road segment.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
What is the purpose of this simulation? I ask this, because there are far better ways of modelling traffic networks than actually implementing a simulation of vehicles driving on a road. For instance, it is well known that traffic flow follows the same mathematical laws governing fluids and diffusions. Thus, you don't need to simulate actual vehicles on a simulated road to compute information like 'average travel time' or 'expected delay'. If it is the latter that you are after, then I'd suggest reading up on research related to traffic analysis. If you just want a cool demo to show off some programming skills, then stick with the simulation.

Cheers,

Timkin
Quote:
Original post by joanusdmentia
The Road is what connects them all. The Bus will be on a particular Road segment (and thus have a reference to and position on a Road) and will be interested in:

A) Other busses on the same segment (ie. a Road needs a list of Busses on it)
B) BusStops on the segment (ie. a Road needs a list of BusStops on it)
C) The next upcoming Intersection (ie. a Road needs to know which intersections it's connected to)

Since each bus will have a reference to the Road its on, it will also have access to the above information that's related to that Road segment.


Thanks! Really useful information for me.

Advertisement
Quote:
Original post by Timkin
What is the purpose of this simulation? I ask this, because there are far better ways of modelling traffic networks than actually implementing a simulation of vehicles driving on a road. For instance, it is well known that traffic flow follows the same mathematical laws governing fluids and diffusions. Thus, you don't need to simulate actual vehicles on a simulated road to compute information like 'average travel time' or 'expected delay'. If it is the latter that you are after, then I'd suggest reading up on research related to traffic analysis. If you just want a cool demo to show off some programming skills, then stick with the simulation.

Cheers,

Timkin


The purpose of the project to provide a 3D simulation system for bus services so I guess I've gotta stick with the simulation (but not so sure about showing off my programming skills :D )
Quote:
Original post by Anonymous Poster
we don't have flying busses yet


I see these every time I go to a commercial airport! ;)
What about the independence of the Bus Driver? You know, make that the AI of the bus driver looks more human(I mean that can make errors driving)
Hey, I’ve been looking for such a bus simulator. I do a little 3d modeling. I've been waiting years for such a project to be developed. There are several existing projects like that around such as "vbus". Which its main site is here http://vbus.rulez.pl

But as you can see it’s a very limited project and it needs to be redevelop. So that’s what brought me to this board about a month ago. Because all of these projects basically went out of development.







What is the main purpose of this project? Is it a 3d bus simulator game, or is this some type of simulator for company purposes only?

Here's a list of some cool features that could be a great bus sim.

Bus Simulator Features:- Realistic, highly detailed bus models- Licensing from major brands including GMDD/GMC, Grumman/Flxible, MCI, NABI/Ikarus, Neoplan, NewFlyer, NovaBUS, Orion, Prevost, VanHool.- Three-dimensional dashboards, fareboxes, destination sign control panels, props, passengers, etc.- Passengers with different emotions and actions (ie. drunk, extra talkitive, disruptive, etc.)- Real world recreation of routes of select transit agency routes and surrounding service areas.- Realistic weather elements such as rain, snow, etc.- Mechanical failures in any part of the vehicle (engine, transmission, tires, destination signs).- Realistic damage to vehicles.- Realistic interaction with garage/central dispatchUSER CONTROLLED FEATURES (before gameplay):- Selection of mylar (roller sign), flipdots, or LED destination signs for bus.- Programmable destination signs. Emoticons and blinking(flipdots and LED only), scrolling (LED only) features.- User is allowed to choose premade transit agency paint schemes and/or create paint schemes.- Choice of engine, transmission, seating (layout, seat type), wheels, steering wheel, window types, etc.- Realistic garage pullouts, parking, bus wash, and inspection.- Available automated voice annunciation on each stopUSER CONTROLLED FEATURES (during gameplay):- Driving- Transmission (auto - P,R,N,D | manual - P, R, 1, 2, 3, 4, N)-/ Turn signals- / Destination sign- Air/electronically operated doors when picking up/dropping off passengers-/ Exterior lighting- Interior lighting- Climate systems- Wheelchair ramps/kneeling (if applicable) - all NewFlyer models, Orion VI, Orion VII.- Communication with dispatcher- Communication with boarding passengers, either automated or voice annunciated (ie. not enough fare, no smoking, proceed to the rear of the bus, etc.)- "Instant Drive" gameplay mode for driving immediately. Here the user is allowed to choose a bus, destination sign type, and a route to drive.- "Long Distance Endurance" gameplay mode for charter trips. Charter bus models and suburban transit bus models ONLY are used.- Scheduled routes for "Career Mode". Also in "Career Mode", available option for time to gradually increase by years, and the user is allowed to choose a bus accordingly. User can also choose time era. Player will start off as a low-paid driver, and have the opportunity to rise to the top and create their own company.- "Free Drive" gameplay mode for driving however you want to. This mode will be mainly used for getting used to buses and how a passenger will react in different situations. Here the user is allowed to choose a bus, destination sign type, and a route to drive.Included in the early time era:Flyer D800 (transit bus model)Flyer D900 (transit bus model)GM Old Look (transit bus model)GM New Look (Fishbowl)Grumman/Flxible Metro Series (transit bus model)Included in the middle time era:GMC RTS BusGMC ClassicGMC Classic (articulated model)Grumman/Flxible Metro Series (transit bus model)MCI A-Series (charter bus model)MCI C-Series (charter bus model)MCI D-Series (charter bus model)Neoplan AN440 (transit bus model)Orion I (transit bus model) - 30 foot and 40 foot modelOrion II (transit bus model)Orion/Ikarus III (articulated model)Orion V (transit bus model) - 30 foot and 40 foot modelPrevost H3-41 (charter bus model)Prevost H3-45 (charter bus model)Prevost LeMirage XL (charter bus model)Vanhool T480 Series (charter bus model)Included in the current time era:MCI A-Series (charter bus model)MCI C-Series (charter bus model)MCI D-Series (charter bus model)MCI E-Series (charter bus model)MCI F-Series (charter bus model)MCI G-Series (charter bus model)MCI J-Series (charter bus model)NABI 416 (transit bus model)NABI 436 (articulated model)NABI 40LFW (transit bus model)NABI 60LFW (articulated model)NABI 45 Foot CompoBus (transit bus model)Neoplan AN440 (transit bus model)Neoplan AN460 (articulated model)NewFlyer D30LF (transit bus model)NewFlyer D40LF (transit bus model)NewFlyer D60LF (articulated model)NovaBUS LFS (transit bus model)Orion I (transit bus model) - 30 foot and 40 foot modelOrion II (transit bus model)Orion/Ikarus III (articulated model)Orion IV (transit bus model)Orion V (transit bus model) - 30 foot and 40 foot modelOrion VI (transit bus model)Orion VII (transit bus model) - 30 foot and 40 foot modelPrevost H3-41 (charter bus model)Prevost H3-45 (charter bus model)Prevost H5-60 (articulated model)Prevost LeMirage XL (charter bus model)VanHool A330 (transit bus model)VanHool A360 (articulated model)VanHool C2000 Series (charter bus model)VanHool T2100 Series (charter bus model) 


[Edited by - van2005ko on September 30, 2006 7:16:38 AM]

This topic is closed to new replies.

Advertisement