How To Make Enemies Smarter: AI Weighted Decision-Making

Ойындар

Ever create a non-playable character that was as clever as a rock? Don't be so mean. Your NPC just needs some nurture and education. In this tutorial, Slyddar teaches you how to make your enemies smarter with AI-weighted decision-making. Turn your NPC into Einstein.
You will learn how to code a system of weighted options which will help your AI make smarter choices.
The tutorial is in GameMaker Language (GML) for GameMaker.
You can get your free copy of GameMaker here and try it out: opr.as/DownloadGM-YT
Find the project here: www.mediafire.com/file/stl9r8...
/ slyddar
slyddar.com/
/ slyddar
00:00 Introduction
00:44 AI Dungeon Demo
03:31 AI Multiplayer Demo
04:10 Sample Project Setup
04:33 Create Event
05:23 Step Event - Intro
06:01 Target Parent Object
06:07 Step Event - Collision Check
06:48 Step Event - Find Instance Weight
09:34 Step Event - Find Highest Weight
10:57 Allowing AI to Path

Пікірлер: 24

  • @GameMakerEngine
    @GameMakerEngine Жыл бұрын

    Tutorials you might like: 🔫- Weapon Systems: kzread.info/dash/bejne/X2WqurNmlbe8o6g.html ✏ - Draw your own enemies: kzread.info/dash/bejne/gWaTqcitfs3If9I.html 👾- How to add an enemy: kzread.info/dash/bejne/eaCa2aWhYcrNeM4.html

  • @GameMakerEngine
    @GameMakerEngine Жыл бұрын

    Big thanks to Slyddar for the video

  • @rileywaldo1580
    @rileywaldo1580 Жыл бұрын

    The only thing I would add to the code is give the min and max weight values to the o_target_parent so every time you add a new item to weigh you don't have to increase the size of the switch statement. You can simply tune the min and max on each new added item.

  • @lemonberries
    @lemonberries Жыл бұрын

    Great explanation of weight values. Also, these videos are very well produced

  • @azrhyga
    @azrhyga Жыл бұрын

    Great tutorial!! Good job for Slyddar making it!!

  • @foxandliongames
    @foxandliongames Жыл бұрын

    This was great, thank you for laying this concept out so well!

  • @bearwillow6108
    @bearwillow6108 Жыл бұрын

    Great video! These tutorials have helped me so much!

  • @SamSpadeGameDev
    @SamSpadeGameDev Жыл бұрын

    Really cool! Also map_value!

  • @nuclearbeeberman
    @nuclearbeeberman Жыл бұрын

    This is great, would love to hear more AI stuff for GMS2

  • @NoLootStudios
    @NoLootStudios Жыл бұрын

    Could be really cool to use this. Gave me an idea for a new enemy atleast. Big thanks!

  • @user-vn3xc3hm8t
    @user-vn3xc3hm8t3 ай бұрын

    This is fantastic

  • @sherekhangamedev
    @sherekhangamedev Жыл бұрын

    Kudos 🎉 good material, indeed.

  • @emeryro
    @emeryro Жыл бұрын

    Thanks for this, nicely done! One remark: couldn't you save the highest weight (and corresponding item) already in the first _num loop? That way you don't have to browse the array twice

  • @AitornadoStreams
    @AitornadoStreams Жыл бұрын

    Hey guys could you make a state machine for a platformer tutorial please? It would be very helpful

  • @bexplosion

    @bexplosion

    Жыл бұрын

    kzread.info/dash/bejne/q5p63Nxynb3RhZc.html

  • @timcal1968
    @timcal1968 Жыл бұрын

    Sorry if I'm being thick here, but the video mentions that there should be a link to the demo project, however I can't find it?

  • @GameMakerEngine

    @GameMakerEngine

    Жыл бұрын

    You're 100% right. It's now in the description, or here: www.mediafire.com/file/stl9r8w4jn3y2fp/Designing_Smarter_AI_%25281%2529.yyz/file

  • @timcal1968

    @timcal1968

    Жыл бұрын

    @@GameMakerEngine many thanks!!

  • @SantinhoMarco
    @SantinhoMarco Жыл бұрын

    Hi from Brazil 😃✌🏻

  • @hmk6980
    @hmk69805 ай бұрын

    slyddar :D

  • @GameMakerBoost
    @GameMakerBoost Жыл бұрын

    best

  • @basicperson4245
    @basicperson4245 Жыл бұрын

    first lol

  • @nemo9396
    @nemo9396 Жыл бұрын

    The AI is not making choices, it is following established paths. A choice is an option you can ignore, but an algorithm is a path you must follow, no matter what you want to do.

  • @TabbedOutRat

    @TabbedOutRat

    Ай бұрын

    Erm Achuatually 🤓

Келесі