Inside3D!
     

Commute AI theories

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Artificial Intelligence
View previous topic :: View next topic  
Author Message
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Tue Jan 05, 2010 5:51 am    Post subject: Commute AI theories Reply with quote

You know AI like in Quarantine and GTA of just NPCs in cars going along roads obeying the road rules?

I haven't a clue on how that could possibly be achieved in a Quake engine, and by in a, i mean all four generations of them.
_________________
Back to top
View user's profile Send private message
Labman



Joined: 05 Nov 2004
Posts: 51
Location: Brisbane, Australia

PostPosted: Tue Jan 05, 2010 6:39 am    Post subject: Reply with quote

So you want to create ai for NPC's who walk around and dont fight?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Tue Jan 05, 2010 6:45 am    Post subject: Reply with quote

Commute AI, referring to just the innocous vehicles on the road.

i'd have to prototype some basic media to try ai.qc frigarounds... just wondering if there's a good idea in mind for AI drivers already. Spike's done something in GoodNightOut I think, probably just the smegtank ai though
_________________
Back to top
View user's profile Send private message
avirox



Joined: 16 Aug 2006
Posts: 109

PostPosted: Tue Jan 05, 2010 2:23 pm    Post subject: Reply with quote

Directional brush entities for each side of the road, and "stop light" entities that search for incoming car/pedestrian entities approaching from specified directions.
Back to top
View user's profile Send private message
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Wed Jan 06, 2010 1:49 am    Post subject: Reply with quote

Another option is to set up a waypoint system. Cars follow the waypoints in order until they come across one with special attributes... for example, a stoplight. A stoplight waypoint says "attach yourself to X entity and wait until you are triggered by it, then continue".

Other waypoints may be direction decision waypoints. For example, a waypoint may give multiple directions the vehicle can go simply by having multiple entities with matching triggernames (say, a right-hand turn vs continuing forward). The vehicle simply selects one at random.

You could even implement logic like 4-way stops. Each car that reaches a 4-way stop inserts itself into a queue and then comes to a complete stop. The entity managing the queue tells a new vehicle to proceed forward, waits for the vehicle to reach its next waypoint (out of the intersection), then calls upon the next entity. More detailed logic could handle left turns, vs forward and right turns (allow two opposing left-turning cars to go, etc), but in a game maybe this wouldn't be necessary.

Roundabouts would be more challenging... but you could do it. Smile The big problem is making sure cars know to not run into each other or the player, when the player isn't doing anything crazy like ramming them on purpose.

I imagine a waypointing system like this, with different waypoint types & logic for each type of intersection/complexity, would give you the power needed to solve this dilemma. If any type of specialized intersection (such as a roundabout, 4-way stop, etc) is too complex, either omit it or simplify the rules (most players are too busy mowing down pedestrians with the hood of their car to notice if traffic laws are being perfectly obeyed by every single tin can surrounding them).
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Artificial Intelligence All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group