All language subtitles for 15. Creating the Game Loop Foundation

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 Download
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
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

Let's start building out the Foundation of our main game

So in games like vampire survivors and brotato in others in the genre

Typically what happens if you have some amount

Time

That the level lasts or

You define predetermined timeline

10 minutes lads

That you have to serve

And so what we're going to do is we're going to follow the van

Survivors model

Where

You have to survive for something like 10 min

And then you have to collect

Will experience orbs that the enemy

Drop in

To get your upgrade

Before we die

I'm noticing that are most

Camera tweaks have reintroduced the jitter

For the player would you may have no

And this is the unfortunate thing about guedel there are some cork's and one of them is to die

That you just kind of have to work around on a case

Case basis

So even though our snap transforms to pixel

Subtitled by online-courses.club We compress knowledge for you!

Setting was working earlier

It appears not to be working now with the stronger

Camera

Accelerate

So what we're going to do is really go back to the project project settings

I'm working a turn off

Do you snap to the Trance

What's the pixel

London

The rendering set

You can find it by

Writing

Snow

In the filter

And then I'm checking that and running it

Until again

I know that we're going back and forth on this but

Just to know that setting is available and you can tweak it as necessary to make your game

Good but the game is looking ok now without that setting on

Install working and move forward with

Alright so we need to keep track of the amount of time that the player is in the level

After which

The level will be

Beaten

So let's go ahead and create a new scene with controllers

We're going to

Select other node and then put a

Route type of just the basic node in

What's go ahead and rename this by double-clicking in

Rename this too

Mrs Colin

Arena

Time

Manager

Morgan save that was control

Going to your scenes directory

Manager

And save it alongside the enemy manager there

Alright

So get her Arena time manager

I'm going to go ahead and add a timer

Reusing a light timers but timers are various

And then we're going to set this timer to

Have a wait time

60 time

So 600 seconds is 10 min

But actually just turn it down to 60 for testing purposes

Set away time

I'm going to

21 shot and auto start

Ok and now before we do anything

Let's create a new scene with control n

Make this a type of canvas layer

Tennis player

And

We're going to call this

Arena time

You are

Go ahead and save that

Go up to your scenes directory

Create a new folder

In here

You are

Or user interface

And then go ahead and save it

There

Ok

So we're going to start getting into control now there's a little bit here

Which will dive into

Later on more in depth

We'll get a little bit of an introduction

2

Audi new

Child

With control

Search for

Margin container

Garden answer

Ok this is a control now then what controller it's basically are our ways of displaying UL ilm

As well as laying out uil

Emergent

Is

A container

So it's designed to hold other control element

Where you can also specify margins so you can give a little bit

Padding on

Side

So if I go ahead

Control a2ad a level node which is simply just text

Can I go ahead and write in the text properly here test

Sagar my margin container here

Now what happens if I scroll down on my margin container

Can I go to the theme override

Constance

I can define a modern lap so if I say margin-left of 16

You can see that adds a 16 pixel

Can I do the same on the rear

Now we got 16 pixel pad

On the road as well

So this is just a nice way of displaying content

That needs padding

But also it's a nice way of

Having a container when you need a container for layer

And what does that mean well let's go ahead and do this so I can show you so

Select reminder contain

Go up to this little icon here

That's for the Anchor in Australia

Quick that

And then the bottom right select the full

Next auction

So that's going to do is that's going to make

The margin container

Fill the entirety of the screen

Ok and so what are we doing with the Serena time you are basically the goal here is we want to display the curry

Time

Of the

So we want to

Ideally count

From

0

To keep track of how much time the player has been in the

Is going to show the time at the top

Screen

So that means I'm going to take this label

And we are going to

Scroll down

To the container sizing

Let's change horizontal fill

So fill you can see kind of what is represented by basically film means

Stretch edge to edge

In your container either vertically or horizontally

Survey shows fuel for

Well you can see now it's feeling the entire thing

So what we want to actually do with horizontal if we want to use drink Centre

Which will take

This level and

Put it into the centre of its container

And then

Let's just do you shrink begin

Now our labour

Is stuck at the top me

This is why were using a marriage

Container that kind of layout

Option will not be available to us if we were not using

Container

So this is a container sizing

Properly

That can only be used

When the news

Parent is a type of

Container and then what we're going to do a scroll down

Sorry to go to the margin container

And then scroll down back that

Constant section of the theme override

Put a margin top of lipsy

So that gets the label off the top of the

Just a little bit

So before we go any further

Let's go back to our main scene

And instantiated a child's name by right clicking

Clicking in st. Charles

Search for Arena time you are

Put that in there

And then move this to be the first

Sony editor you'll see that

Is displayed right there

But it's kind of off centre but watch this

When we Run the game

Now he's got that test

Allude to the top of the score

Are there is one thing to be careful of when you're using

Containers in this way

So let's go back to Arena time you

Control note

They will intercept

Mouse

Input

So if we do this when we

Put a mod

Tina over the entirety of the screen

No mouse input will be except

While the mouse filter

Is that to anything other than ignore

Secure Martin container

Scroll down to Mouse filter

And turn off

Filter by clicking ignore

This means that it will no longer interested

Mouse click

I will get internet more later and we start building more complex your eyes

Introduction to

When does aquarium

The canvas layer

So the chemist layer as you probably

Can see

Is special in that eight keep

The UA

Glued to the

So

In other words

It will always be at the top middle of the window regardless of

The camera is in the game

If we didn't have a chemist later and we just used a Martin container

The magic container would be stuck at the origin of the world

And will not follow our camera

What's the benefit of using cannabis

So what you do make this label actually display the

The time that has

Occurred

While you're in

The game

So I'm going to do something to go to the arena time manager and we're going to add a script to r

Manager creates

The process map

In awe when you've already metadata so go ahead and remove them

What's create a new function

Cardigan

Time

Get time

Morgana doing here is we're going to return

Dollar sign timer

Say wait time

-

Timer

Time underscore

So far away time is 60 seconds and we have 60 seconds left then our time elapsed

0

And if we have a wait time of 60 seconds and red

55 seconds left in our time

That is

Now in both cases here were getting the timer from the same

And we don't necessarily want to do

So what we can do

Is we can use the unready keyword

To assign the timer as soon as the notice

So we can do as we can do at

Henry

Bar timer is equal to

Timer

So using a dollar sign petition

What is the best thing to do is to shorthand for assigning

A note

To a variable

When the note becomes red

So now we have a reference to this timer if we don't need to fetch it from the same tree

So you can highlight

This dollar sign timer here

And get time allowance

Hit ctrl d

To highlight

Other

Timer and then just right

Our new variable in here instead

Timer and that will replace both instances

And now we don't have to do it a look

In the tree

Every time

Let's go to our Arena time UI and switchback

2

The timo

So this is our actual you white then we need to be able to get that time of laughs that we just

So what I'm going to do if I'm going to attach a script to the route now here Arena time you out

Subtitled by online-courses.club We compress knowledge for you!

I keep those d v l

What we going to do

Is we are going to do an export variable so clear all the processing

Ready methods that are pre-populated

Let's do addicts

Arena

Time

Manager

And then we're going to do Colin and we're going to

What we're going to do is going to take that as a no

Now what is akinator

Well I look at my Arena time UI

I see that I have

Is assign button now next to the arena time manager properly

By clicking

I can actually assign and note to this value here

So that another way of referencing knows that may otherwise be

Unknown in terms of where they are in the scene

When is it going to be used for

For the following

If I go to my main scene again

Switch to the 2D view I'm going to go ahead and right click

Into main

And then instantiated a child scene

Arena

Time manage

I'm going to move

Underneath the arena time you

Now you can see if you click on the arena time you why I can take this Arena time manage

Click and drag

Over into

That

Assignment

For the Aria time manager and now I've got a

Now that we've got the arena time manager outside

Let's go ahead and open up that Arena time you a script

The Script button and now we can do this we can say

Process

Delta so we can overwrite the process method here

And we can actually reference the arena time manager here

And courgette time elapse

Now we're not going to get the autocomplete because again go does not know what the type of this is it assumes that it's just a no

Type so where does going to assume that we've done this correctly and we're not going to worry about that for now

But we do want to do it

So I'm going to say if Arena

Time manager is equal to null

I'm just going to return

That way we're not going to deal with any pretence

No reference

So we can get an allowance letter signed the result of this get time elapsed to a

Variables overtime underscore

Alarm

Alexa turn lights now I need to modify the tour

Next

Label celebs go back to the arena time you I see

Does label

Here

We can right click this

And we can say access as unique cname so go ahead and do that

What does is this allowed

To use a shorthand to reference the law

Tell if we were to use

What's a anon ready to grab the label

What we typically have to do is do it

Unread

Label

Is equal to

Margin container

Flashlight

Which is an ideal

This can get very long if you have a

Biggar St

But instead what we can do now is we can still use the dollar sign shorthand but instead of putting all the path segments in from

The label we can just use a percent

Cancel this wall as long as the label is marked as a unique

Name

In the

Scene tree here

We can

Reference it with the process

Any will always be found no matter how many levels deep

I got a label and we can just simply say label

Dart tag

Is equal to

Time alarm

And we probably wanna convert to a string so we can do STR

Time

So that will

The Our Time elapsed converted to a string and assign it to the level

Had a Run the game as you have

So it's got time counting up now what your notice is that it's printing an absurdly

Large amount of

Digits here we want us to be formatted Morley

Traditional Thai

What's go ahead and do that

So let's go back to our Arena time UI script

And we're going to create a new function sound

Two new spaces

Funk

I'm gonna call this mess

Former

Underscore seconds

And we're going to pass in

A seconds number

Second

And if you want to you can type this by doing colon

Float

Just like

Let's do another call at the end

And this is going to return a string that actually make this little bit more

Format underscore seconds underscore 2

Clearscore

String

So we want to convey

The second that we have to a minute and seconds

And so how are we going to

Well what we're going to do

Is we're going to take

The seconds and ÷ 62

To save our minutes

Is equal to

Let's do the

Floor

Seconds ÷ 6

So what is this going to do is this is going to take the second number ÷ 60

If we're Western 60 seconds then the floor is going to go to zero

Because it floors it to the new

Integer

Download

Right

Surrounded down essential

The second is greater than or equal to 60 this overtime

One or however many divisions

So for instance of this was 120 L

Ok

Let's do another variable called remaining

Seconds

And what we're going to do is really say

The remaining seconds is equal to

Seconds

Miners

In parenthesis minutes

X

That's going to get us the remainder of the second

And then we can return very simply

Return

STR minutes

Plus

In quotes Colin

Plus

String

Remaining

Now we're still going to have the issue of the

Having massive amount of

Decimal places

And so we need to

Take this remaining seconds

And probably floor this as

So let's inside of the string

Do a floor of the remaining sex

And then we can say up in our process label text is equal to

Format seconds to string

And then pass in our time

What's going round the game and see her

Perfect

So there's still a little bit

With this

Formatting

Princess we probably wanted display

The leading 0

When the number is less than 10

How to get the leading zero on the second what we can do

Is we can remove this

String

Function around that floor remaining seconds

When we can do instead

We want to use a format string would you can read about

I will link to the documentation in the lesson resources that you can read about

4 m

But basically what we gonna do is string for me

So I'm going to do a

Quotes

And then we're going to take

Percent

And I'm going to tell

We want to do two leading Zeros so that's what that means

02

And Andy which tells us that it is an integer and then outside of the quotes we have to use percent

Just like some

And then we can

This whole statement into

Apprentice

4

Readability

This is this as I want to have an integer string

Has to dig

And using a leading zero

If the number is less than 10 so basically the same in force that there's two did

It's also put leading zero in the front

If the number is less than 10

And then the present basically tells us ok what number are we putting into the store

This percent indicates ok this is what were replacing into the Stream

Which is our floor remaining

If I run this now you can see that we've got a nice

Countdown with a leading

0

So in the future will have to type this into the larger game systems

But for now this little display

Will

Be good to build on in the future

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