How To Make Enemies Smarter: AI Weighted Decision-Making
14,887
Published 2023-05-07
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/stl9r8w4jn3y2fp/Designing_S…
youtube.com/slyddar
slyddar.com/
twitter.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
All Comments (21)
-
Tutorials you might like: 🔫- Weapon Systems: https://youtu.be/-1vXQ-eTVsE ✏ - Draw your own enemies: https://youtu.be/O2_GftNjbOo 👾- How to add an enemy: https://youtu.be/GlfwCh1ggHk
-
Big thanks to Slyddar for the video
-
Great explanation of weight values. Also, these videos are very well produced
-
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.
-
Great tutorial!! Good job for Slyddar making it!!
-
Really cool! Also map_value!
-
This was great, thank you for laying this concept out so well!
-
Great video! These tutorials have helped me so much!
-
Could be really cool to use this. Gave me an idea for a new enemy atleast. Big thanks!
-
This is great, would love to hear more AI stuff for GMS2
-
Kudos 🎉 good material, indeed.
-
This is fantastic
-
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
-
Hey guys could you make a state machine for a platformer tutorial please? It would be very helpful
-
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?
-
Hi from Brazil 😃✌🏻
-
best
-
slyddar :D
-
first lol
-
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.