Introduction to Game Development (E20: loops)

preview_player
Показать описание
In this episode we look at the four types of loops: for, while, do while, and foreach; as well as two loop-related keywords: continue, and break.

Or a once-off donation through PayPal:
Рекомендации по теме
Комментарии
Автор

Why do I watch these videos even when I know the stuff?
It's because they're just that good.

pranav_r
Автор

Keep these break downs going. They are so helpful and concise, thanks!

Steven_Something
Автор

This is the only video that clearly explains loops in detail that I have came across.

FunNooberCodingForBeginners
Автор

Man.. I watched a tutorial about a game that uses a grid and I didn't really get the two nested for loops in that video which is why I came to this video. Here I understood it perfectly, you are just great, really!

Muftaay
Автор

Nice tutorial. Thanks.
Perhaps a new series on 2D dungeon generation based upon the example given in this episode?
Thanks for giving.

jameslavery
Автор

I love all the Harry Potter references in your videos!

jabciuthehut
Автор

Thanks for the tutorial + explanations! These are super useful for AP Computer Science!

Ovicior
Автор

You are a great teacher. I'm glad to support you on Patreon.

KaletheQuick
Автор

7:24 subtitles "Note that you cannot"

For some reason I find this really funny XD

bastiaantheboss
Автор

Your tutorials are seriously the best. Thank you! :)

bibib
Автор

Thanks to you Lague!

I have a Question.

there is an ex. (row+column) % 2 in for loops

if row = 0, column = 0;
how can we calculate remainder?

Is "(0 + 0) % 2" sentence can be calculated?

양화승-gl
Автор

Nice can't wait for the next one.

Nosh
Автор

Hello Sebastian, thank you for the tutorial. I got stuck at the 4:11 with the modulus thing. I understand how the loops flow and such, but I do not understand situation where I have Row 0 and Column 1, and the result is 1. How do I get it? This is the sittuation: (0+1)%2. You say, that the modulus will devide first number (row + column = 1) by second nubmer (2) and returns 0.5. How do I get the 1 from it? I am not good with math, so if my question sounds super dumb I apologyze and kindly ask for patience.

tomasrampas
Автор

Hey, Sabastian, is it possible to have more than one loop condition and if so, can i have an example please?

someguyinspaceee
Автор

What about 'case and switch' statements; does C# not have them?

RexTilon
Автор

Hi, shouldn't powersOfTwo [i]= Mathf.Pow(2, i) be filled in array before entering the for loop ?

neo
Автор

How did you seperate the boxes using the while loop

clydemarindo
Автор

Enjoy this playlist so far, but wish he would show us some game examples of where these loops are used and then explaining the code hes just showing us the simple form using variables that are not realistic which is not helping me understand...Show me a loop scrip in a game and then break down how it works....sorry for hating but this is the only issue i have so far with these code learning video maybe further in the playlist we get to a game tutorial where we use loops so then can understand better....

TheNamesJT
Автор

I must caution in sharing this, you failed to share the most important problem EVER.
Unity and Programming both suffer from the
while(true) { }

While contrived, can easily be mistakenly done by a novice and expert alike in various forms. AND this causes Unity and the Computer sometimes, to lock up and break To this day it will break unity and you will have to end task on it.

Rarely have I see something catch this besides the programmer, but have lost countless hours to this in unity, since it doesn't save on each run.

micaiahstevens