All language subtitles for 1. General Concepts

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian Download
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

0 What are finite state machines? 1

Well, a finite state machine or, for short, FSM is a collection of states and transitions. 2

The states represent the actions that an AI agent can take. For example: fire, run, patrol, and so on, so 3

forth. 4

And the transitions are the links between these actions that tells when the AI should change its current 5

state. 6

For example, if the AI was patrolling and it encounters a player, then the state should change from 7

patrol to attack so that AI can properly play the animation, fire the projectile and face and run 8

towards the enemy. 9

This is one example, but finite state machines is one of the most common ways to implement AI 10

in games. 11

Behind the scenes, an FSM is basically a graph and if you don't know what the graph is, then you should 12

definitely check the bonus section, the data structures. 13

What it does is basically these nodes represent the states and the transitions represent the edges between 14

them. 15

Let's now look at the pros and cons of using a finite state machine. 16

Well, one of the most important pros is the fact that it's very easy to use and understand. 17

You basically create the states. 18

You name them and you use them. 19

You connect them via transitions. 20

And basically, this is it. 21

And of course, because of its simplicity, that means that it's very fast. 22

So if you have a lot of AI instances, for example: 1000, then a finite state machine would do good 23

because it doesn't require so much processing power. 24

What are the cons of a finite state machine? 25

Well, the first one that it might get out of hand quickly if you had more states, more transitions, 26

you interconnect them with each other, then you might end up with a spaghetti of something that it's 27

hard to maintain. 28

And it's also hard to reuse because you cannot just take parts out of it because they are tightly connected 29

with each other. 30

But with all of these cons, I still believe it's a powerful system and it's used in modern games. 31

There are ways to mitigate all of these risks by implementing something called hierarchical state machines. 32

And the good news is that in the final project that we will have in this course, we actually have a 33

hierarchical finite state machine. 34

Basically what it means is that the groups states together in bigger states to avoid having too many 35

redundant transitions. 36

But you'll find out more in the later project. Now that you know what the final state machine is 37

let's find out how you can implement one yourself in Godot.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.