How are loops used in games? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How are loops used in games?

Well, I just learned loops. So I have a question. How are loops used in games?

16th Mar 2018, 3:46 PM
Jade
Jade - avatar
2 Answers
+ 10
Well I believe you already know that loop is all about repeating the same task under a given condition. Therefore, anything related to repetition can be implemented with loop. ✅ Restart the game/match ✅ Generate multiple monsters/loots ✅ Turn-based game and etc. Hopefully it helps! 😉
16th Mar 2018, 3:59 PM
Zephyr Koo
Zephyr Koo - avatar
+ 2
In a game you consently have to respond check for input and then respond accordingly Game Loops are often used to proform this repetitive action in cycles known as ticks.
16th Mar 2018, 3:57 PM
josh mizzi
josh mizzi - avatar