Jump to content
  • Advertisement
  • entries
  • comments
  • views

Traffic AI Rewrite

Sign in to follow this  


Yea, so I'm rewriting my traffic AI...fun stuff. I'm just about done with the core components. The AI vehicles can now drive across the bridge. I captured a video of it in action...

Click here to download video (13MB).

Ignore the framerate reading though, it goes to shit whenever I record a video...at least you can kind of tell whats going on...it's a little fast though.

Some little things have already been fixed since this video was recorded. At the end there is a little part that shows the 'Fake vehicle physics'. Before I was just assuming the ground was flat. Now I do a ray-cast and align the vehicle with the surface normal of the ground. This only applies if the vehicle doesn't have true physics enabled...the game engine can switch seamlessly between a Newton controlled vehicle, and a 'Fake' vehicle...the AI can handle both situations as well, seamlessly.

The "Snapping" to each surface normal has been fixed also, it's smoother now.

Also note that the vehicles will stay in their respective lanes probably by tommorow, right now they drive down the center of the road...gangsta' style. They do avoid collisions though.

Some images of the cars on the bridge...

Vehicle AI Debug output...

Pink Vector = (Extended) Surface normal.
Green or Red triangle = Field of view (Red = path blocked, Green = path clear).
Yellow Vector = Steering direction.
Blue Vector = (Not shown) Drawn from the vehicle's center, to the vehicle's current 'Traffic light' influencing it's path, only drawn if applicable.

They're like little robots. Little, retarded, robots (at least for the time being).

A older (as in taken yesterday) image showing the difference between High & Low Quality Visuals...

Thanks again to a sharp eyed Anon. Poster who noticed what was wrong with the old version of the bridge (the one in the last entry). Here is a updated version of the screenshot I posted at the start of my last entry...I had the pillars placed all wrong :-) It's now fixed.

Any comments on the video/screens would be appreciated! (But do keep in mind it's all a work in progress [grin]).

- Dan
Sign in to follow this  


Recommended Comments

Your game is looking better and better every time I see it. I did notice one thing that I wanted to ask you about though - are you doing a high intensity pass that gets bloomed and added back onto the scene to simulate HDR?

I am asking because your normal vehicles look fine, but the white and yellow ones look like they have a nuclear glow to them :) Is there any way to mask out the 'fake' HDR sources so that the 'real' HDR sources like the sun will be the only thing that actually gets bloomed?

Just a suggestion - although the remainder of the game is looking quite impressive. Keep up the good work!

Share this comment

Link to comment

Thanks for the feedback! I agree the bloom is still a little screwed up, I'm constantly tweaking it, and IMO getting better and better results. I guess the trick would be to use darker colors for vehicles/etc.

I was looking at screenshots of 'Just Cause' lately, and it appears they have a lot of the same issues that I have, regarding the bloom.

Look at the white roof top of the car...

Look at the whites/yellows...

Their solution seems to be to avoid yellows/whites in the scene, execept for the sky.

I should have mentioned the bloom issues in the entry, I agree with the nuclear glow not being acceptable :-) I'll keep tweaking to get better results. Thanks for the feedback.

Note: I do have several "backup" skins for vehicles, I could just easily repleace the white/yellow vehicle's skins I suppose.

- Dan

Share this comment

Link to comment
It would be awesome if you could get it so the vehicles have varying distances between cars (so it can simulate the careful drivers who stay back far, or the a*s holes who ride your bumper).

Other than that, looks great! :)

Share this comment

Link to comment
Simply looks amazing. The only crtique I can come up with would be to give the chopper above the warehouses in the background a more interesting path ;)

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!