Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / City Traffic Sim using DarkAI

Author
Message
Zerk
18
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 27th May 2006 13:02 Edited at: 27th May 2006 13:35
This is 15 lines of code simulating traffic movement in a city environment using the Dark AI expansion. So if you dont have Dark AI, this wont work.

There is no collision on the cars. They just travel about the city of thier own free will. They will travel the streets towards thier destination, turning corners at intersections.

This was a test of AI traffic using the Dark AI. Although this doesnt work all that bad, Dark AI is rather limted for car based AI.

It runs at about 30fps on my machine but if you remove the 2nd, 5th, 8th and 11th "AI Add Obstacle Vertex" lines of code, it will run at about 60fps but the cars will not turn corners as well.

Unzip the attached zip file (189k zip, 200k uncompressed... not including the source), load the project and press F5.

Have fun!

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th May 2006 16:33 Edited at: 27th May 2006 17:06
Great little demo using DarkAI, love the cars sudden turn rounds.

there great at doing bumper cars seen 8 in a row all tailgating.



edit

If your getting Dark Phyisc will be an allsome demo.

I'm not getting you down am I, Ho Look! another fancy Door?
Zerk
18
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 27th May 2006 19:41
Thanks. I have another version with collision and stop lights but it wont compile down to 20 lines. But I think I'll keep expanding on it and make something of it. And yes, I will probably get Dark Physics so I'll integrate that too.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th May 2006 19:59
Cool, I look out for that one.

Just a thought when you make your car why not save it out as DBO then just load it in.

I'm not getting you down am I, Ho Look! another fancy Door?
Zerk
18
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 27th May 2006 20:03
I'm still learning DBP. I've only had it for a couple weeks. I dont know the benefits of using a DBO... yet.

But if you can explain the benefit of saving out to a DBO that you are suggesting, that would be helpful.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th May 2006 20:39
Well your doing better than me on using it, I been using itfor 3, 4 years still learning to do simple things.

If you look at the noughts and crosses thread I have shown how to make and object and link it together, from there you just save it out as a DBO file for loading later.

I think the best bit is when you reloaded object, it has remeberd every thing you have done to it shape size and texture.

Plus once you have made one object you can clone it.

Also look in the DBO Challenge thread as in there we are all learning how to make objects just using the DBPro object set.

Have fun

I'm not getting you down am I, Ho Look! another fancy Door?
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 30th May 2006 11:07
Nice one Zerk, very cool!

Financial Director
TGC Team
[Check out Jed McKenna - http://www.wisefoolpress.com/]
StevieC
18
Years of Service
User Offline
Joined: 5th Jun 2006
Location:
Posted: 6th Jun 2006 12:44
I'd love to see this in action, any chance of having a compiled version?

Steve

Login to post a reply

Server time is: 2024-11-21 12:22:52
Your offset time is: 2024-11-21 12:22:52