Maybe bad from me to call it “impossible”. I also thought AI pursuits on Roblox were impossible, until it succeeded.
I’ve had luck when setting the network ownership on the server, so it doesn’t hop ownership if they come near a player. So, nothing is impossible, a good lesson for me
Holy crap! That AI did some grinding on Liberty County. Now you just need to add PIT maneuvers so it can make the AI a little more interesting. Really cool.
Well, I was playing & experimenting in the game @DutchGalaxy and I are creating and they used a very interesting tactic! This was not planned nor preprogrammed
I’m actually working on my own autonomous vehicle system, and you’re my top inspiration for this project. Though… mine is a bit more “general purpose” (i.e. non-pursuit) and essentially a framework with functionality to follow a given path with rudimentary collision avoidance logic. I plan on eventually releasing it once improved, and I hope you check it out when I do.
P.S. Do I have your permission to add pursuit functionality to the open version, because that might be plagiarism.
P.P.S. Your clip is awesome! I’ve bookmarked this post for any updates!
Really cool that you are using this project for inspiration! I am curious to see what you’ll create!
Yes, when I will open-source it, I’ll probably release it under the MIT License, allowing anyone to use, redistribute and modify the code
Haha, it was very unexpected and it was an improvisation of the officers
Nice to see that the cops can sometimes make really clever decisions (and sometimes get stuck between two hills )
So far, it’s just a proof-of-concept build. But, during my testing on randomly generated terrain, it’s able to path across the entire map of 2048x2048 studs provided it doesn’t get stuck on any riverbeds. I plan to improve the AI a lot more before release.
Honestly, it’s not very bad at all! Does it generate pathing automatically or manually? I saw that it is driving with a curve to the destination, but maybe you put invisible nodes there?
Not at all! It’s using Roblox internal pathfinding, and I fire an event with a single argument: an array containing nodes for a path, which the car drives to. I handle pathing separately independently from driving logic, so I could use literally any array of Vector3s, not just pathfinding paths.
P.S. I’ll send you my AI system in a private message if you want. It uses the same math as you did.
Last days I’ve really been busy on making chases more challenging when police officers are near, and a rare occasion happened during testing, they performed a perfect PIT maneuver, I just love it
That’s impressive! In the real world, usually people is a bicycle control model along with an RRT* pathfinder. This allows handling all sorts of dynamics such as drifting, acceleration, rotational acceleration, and of course vehicle curves. You could also use an Ackerman steering model for increased precision.
I’m working on a pathfinder that allows that kind of precision, would you be interested in joining the community and giving your input? Discord
Thanks a lot for your kind words! I haven’t heard of RRT* before, but watching a YouTube video about it helped me understanding its principle, and it sounds really interesting!
I’ve joined your Discord server and I’m excited to implement your pathfinder in order to improve the vehicle navigation, however all chat channels seems to be locked (I can’t chat in any )
With RRT*, would I still be able to keep the pursuit tactics or should I raycast towards the suspect each Heartbeat to determine whether to use the RRT* pathfinder or use the natural behavior?
So the pursuit tactics are only used without obstacles and when close enough? You could continue to do that, or you can have RRT* use the prediction as the target.
I worked at a place where we used an Extended Kalman filter to predict where an object following bicycle dynamics would be. You can also use neural networks for this purpose as I think @ScriptOn did. One is more of a engineering based approach (linearized dynamical systems) and the other computer science-y.
Oh, and another possibility, which I am not sure anyone mentioned here, is using vector fields for avoidance. It is much more efficient than running a pathfinder, although it doesn’t provide guarantees and you need to tune a ton of parameters to make it work for each obstacle. It does make for some nice paths though.
Yes, when the police car is close enough, they will blindly ram the suspects’ vehicle until they’re outside the “circle”.
I don’t really want to go with neural networks since it’s a black box, you can’t debug their decisions and their performance is pretty random in most cases. Currently I am using steering behaviors because of its simplicity:
I believe that would be a bit too complex for the current stage of the project, because of its preparation requirements. Definitely going to read a few papers about it though, it might come useful
Did you apply for the minimum 500,000 USD game fund? This is going to become a hit game!
Getting alot of GTA vibes from these clips. This is some amazing AI here.
Do you think you could also make a mode or a new game where your the police, and you chase the suspects as they try to flee you and sometimes shoot at you?
And there will be other AI cops to help you chase down the suspect.
LSPDFR car chase vibes
Just an idea, but definitely apply for that game fund. These are the kind of games Roblox is looking for. Ones that will attract a new player base.
Many advised me to do so, I’ll look into it. It requires having whole milestone schedules and an investor pitch deck ready, so maybe I’ll write one up when I’ve got time, it’s always possible to give it a shot
I love LSPDFR haha
Fleeing and AI backup is a more complicated topic, because the other cars have to take your unit into account (since we obviously don’t want units to crash eachother like in vanilla LSPDFR). If there’s a lot of demand, we’ll probably consider it though, I am personally very interested into making such game possible, but it’s very complex
This is pretty cool, One of the best things overall I’ve seen this year. I don’t know if anyone’s said it yet but I hope this leads to a Roblox version of NFS:MW (2005) or HP. The racing genre (even street racing) has not been explored enough on Roblox IMHO. (On a side note, respect to the voice actors for MW, over 2 hours recorded for variations of lines which the game cuts up and picks based on in-game situations. Same with the soundtrack.)