0 Favourites

Creating believable A.I. for racing game

  • I'm working on a simple top-down racing game.

    Initially, the idea is to simply set the best lap times along with some other challenges I would add.

    But I feel that it would be important to add traditional racing elements, which means the option to race against other cars, typically controlled by the computer. My problem is creating A.I. that's natural enough to feel like it's actually trying to RACE you.

    Basically, what are some resources or ways I can do that within C2?

    I know Pathfinding behavior would be my initial go-to, but I have this sense that it won't be completely suitable (I could try to articulate why, but I'm trying to keep this a short and to-the-point post). Alternatively, I might be able to devise something using the Bullet behavior and a constantly updating direction based on any other obstacles or cars on its way to its immediate goal on the track... (Easier to SHOW than to explain what I'm thinking...)

    Anyway, while I test out some ideas and do some searching, myself, I would be grateful if anyone could point me to some proven racing A.I. tips and tricks, please. Thank you so much!

  • i know for sure i seen a masters rexrainbow capx somewhere with some racing cars and AI going in circles topview and they where awesome actually, even hard to beat, but not cause of their speed, cause they where smart little buggers <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    i think was called LJ potential or CAR AI if you dont want something complex thats what your looking for <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> i found it awesome at first sight i bet u will also <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    he has a custom plugin made for racing AI i think ... that is a first start i guess all car ai's of rexrainbow that i know off and are shared.

    however for "actual try to race you " that is no AI you seen in big games, that is a shadow past gameplay of a experienced user or maybe a multiple users moves database trying to beat you. which is called shadowing, and its difficult to do, since you'l need game plays from multiple human beings and the only ones with enough AI RACE capabilities at that scale are EA games and they NFS series since 1980 till now they have tons of data u could use... if u had access too <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> sadly... we dont have access to that data... so we just need to start slow and little, with small little games, capture game plays and moves... re-use it, in future gameplay. and so on till actually AI gets good. however all the blabbing from above might not even be possible in C2 since you basically need to create a small neural network. but if u find a good racing AI in C2 let me know cause i want to get it too <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">)

    this might also help you

    he talks about racing AI i think.

    some explanation how to give waypoints of the map to AI

    raycasting AI - live AI guiding itself using raycasting.

    racing neural network

    racing genetic code/neural network

    also you might get a AI using waypoints or mapping for AI like in counter strike if you know what i mean.. where the AI/BOTS wold learn the obstacles and map hidden areas best spots etc and use them.

    edited the original AI capx publishers.... my bad i apologize.

  • I didn't make those examples or plugins. Rexrainbow did.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • gamecorpstudio and R0J0hound - thank you both for everything. It always means a lot to me to have such kind and supportive people like yourselves. GOD BLESS you for that.

    And I had a feeling rexrainbow would be THE go-to guy.

    (Rex, if you have anything specific that could assist me, would you point me in the right direction, please? Otherwise, I will try to find the list of everything you've done so far... God bless you, too, sir!)

    I'll check out the videos you suggested, GameCorp, and see if those give me a proper direction for what I'm trying to do.

    Although, in my initial search, I did find several potentially good options in the tutorials section: https://www.scirra.com/tutorials/search?q=AI

    THIS one stood out to me: https://www.scirra.com/tutorials/1051/b ... cing-games

    I'm still just starting to go through them, so I don't know which, if any, would suit our needs for a racing game as we picture, but maybe that'll help.

  • I didn't make those examples or plugins. Rexrainbow did.

    yes sorry i mistaken the masters sorry senpai

    I'll check out the videos you suggested, GameCorp, and see if those give me a proper direction for what I'm trying to do.

    Although, in my initial search, I did find several potentially good options in the tutorials section: https://www.scirra.com/tutorials/search?q=AI

    THIS one stood out to me: https://www.scirra.com/tutorials/1051/b ... cing-games

    I'm still just starting to go through them, so I don't know which, if any, would suit our needs for a racing game as we picture, but maybe that'll help.

    the videos i suggested are to give you a guide of how "GOOD really smart AI " are done, the stupid kinda or pattern build in code types are simple to make, you just create a smarter pathfinding, however as i said above, to truly make a AI that "tries to beat you", you'l probably need a neural network with past gameplay, or AI that uses genetic generation.

    il check the tutorials you shared im really intrigued now by AI in games, thanks for the links also .... i might get stuck in the AI world now...

  • Rhindon

    Solution 1.

    Here is a sample capx without using any of my plugin. It adds some waypoints to lead car moving forwarding.

    Solution 2.

    Here is another more complex behavior of car AI.

    Solution 1 is good enough, imo.

  • Thank you, rexrainbow! As always, you have my deepest gratitude. I will check those out and see what I can learn from them. GOD BLESS!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)