F_CANT_PASS_RANDOM_ROUTE=1, // this waypoint is blocked when planning random routes
F_CANT_PASS_DYN=2, // this waypoint is blocked dynamically (stop lights, road obstacles, ...)
I'm not that far yet, but that refers AFAIK to :
Code:
set waypoint (int) can pass randomroute (int)
Comment:
Set if waypoint is blocked when calculating routes.
set waypoint (int) can pass dynamic (int)
Comment:
Set if waypoint is blocked for passing cars (cars will stop at this waypoint).
Thanks Mitch, 1st traffic cars (4 for now) working here with no overrun, randomly wrapped to WP & looping.
Still, there's so much I need to learn, so I began my research about the most famous worldwide know AI simulation IDE & classes, there's a plenty of already written & open source code for realistic & complex AI engineers, creators/coders, mostly for us, game devs.
I discovered that Crytek Engine which I've used to test AI & do some dynamical simulations (force fields...) has implemented some of the xaitment AI code ; the source code seems available :
http://www.xaitment.com/english/blog/blog.html
Here's some of my ideas combined with existing ones
- Easing of AI traffic cars (smoothing fom 1WP to another or across multiple WPs)
- Awareness/Sensoring of AI cars => Detection & Avoidance of collisions (car virtual collision radius based on car actual dimension)
- AI cars velocities related to actual traffic density (intelligent, self regulated & recalculated routes to avoid traffic jams situations)
- Smart & random AI spawning/destruction not visible to player (traffic cars aware of actual player)
- Smart traffic layouts designs for Racer => manually or scripted/ingame oriented designs ?
- Graphical objects used as helpers for fast visual debugging (stoplights, fluidity...)
- Traffic frequency/density related to the time in Racer (night less traffic, rush/peak hours...if time=0200 $traffic_fluidity = 0.1 //10 percent)
- Analysis & tracing functions for a fast & easy visualization (cars stopped, cars above a certain velocity, cars crashed/blocking routes/WPs/roads...)
- Cars & Pedestrians interactions based on triggerlines events in specific places
- Opportunist crossing situations (pedestrians unpredictable behaviour / allowed to cross anywhere from sidewalk to another, if both detecting radii aren't intersecting...)
- Cars + skeletal pedestrian interactions/collisions events & detectors => triggering of another skeleton animation when hit by car ?...)
- Integration of signs & custom events triggering (50 km/h max., zebra crossings where no stoplights are found...)
- Simulation of Non-Lane based traffic (use of the full width of roads, zig-zagging (bad driving behavior !) enabled/randomized & factorized...), dynamical splitting & creation of virtual scripted lanes according to car/road width...
- Simulation of illegal racing cars & police i.e. overruling the global traffic car rules (dangerous & higher driving skills, dynamical radius for preciser/quicker/more predictable collisions avoidance, smarter route recalc...)
PTV Vision YouTube Channel Videos :
http://www.youtube.com/user/ptvvision#g/u
Worldwide most famous AI engineering apps :
http://www.xaitment.com/
http://www.ptv-vision.com/software/...tware-system-solutions/vissim/example-of-use/
http://www.paramics-online.com/paramics-product-tour.php
http://www.caliper.com/transmodeler/default.htm
http://www.clranalytics.com/
http://www.tno.nl/groep.cfm?context=thema&content=thema_cases&laag1=894&item_id=894&Taal=2
http://www.ptvag.com/software/trans...ing/software-system-solutions/vissim/enviver/
http://www.trafficgroup.com/about/index.html
If you have some existing code examples which relates to the ideas, showcase it !
=====================================
Questions about Traffic
- Unsized arrays, can't you declare like C++ ?
- Multi-dimensional arrays ?
- Pointers ?
- The most efficient ways of handling complex arrays ?