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.
Commute AI theories
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
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
i should not be here
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. 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).
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. 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.