background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Создание Android приложений с нуля в среде Processing: Урок 3 - Переменные, random"

input logo icon
Video tags
|

Video tags

Android
андроид
процессинг
игры
научиться делать игры
программирование
уроки программирования
Видеообзор
интересные игры
новинки игр
прохождение игры
создание игры
unity 3d
android
game
new game
смотреть прохождение
новые игры
программирование игр
создание игр с нуля
arduino
компьютерная музыка
мобильные игры
мобильные приложения
уроки создания игр
tutorial
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:00
hello dear friends, I am glad to
00:00:03
welcome you to the space 3d channel and
00:00:05
today we will continue to study the
00:00:08
processing programming language, I
00:00:13
remind you that we stopped with
00:00:15
simple figures, namely the ellipse and the
00:00:19
quadrilateral, and so let's continue
00:00:22
our study and the next thing we will
00:00:24
study is this variables,
00:00:26
if we draw an analogy with the outside world, a
00:00:28
variable is like a box into which we can
00:00:32
put a certain number of
00:00:33
objects, that is, you
00:00:39
and I,
00:00:44
let’s say we have two baskets,
00:00:48
1 basket is called x, 2 baskets
00:00:52
are called y,
00:00:59
each basket we can put a
00:01:03
certain number of objects,
00:01:12
that is, in basket x we we put 4
00:01:15
objects in the basket y, we put 5
00:01:19
objects, this can be written as follows: x
00:01:23
equals 4 and y equals 5
00:01:35
in the processing language, such a
00:01:37
basket will be called
00:01:40
int because we put an integer number of
00:01:44
objects and y is also
00:01:46
int because an integer number of objects
00:01:53
now let's go back to our code and
00:02:00
write the following int
00:02:06
x equals 5
00:02:10
and int y equals 10
00:02:20
so we created two
00:02:22
variables variable x and variable y and
00:02:26
wrote the value 5 and 10 in them,
00:02:29
respectively, another type of variable
00:02:33
that we will use when
00:02:35
writing of our programs, this variable is
00:02:38
fleet, using this command we will
00:02:45
create our own variables in which
00:02:47
we will store non-integer values, for example
00:02:53
x, we have already used the variable
00:02:56
t 457,
00:03:04
so
00:03:11
that is, pay attention, and the dot
00:03:14
must be used in order to
00:03:16
separate the whole and non-integer part z equals
00:03:26
5
00:03:29
89
00:03:33
so we can store non-
00:03:37
integer values ​​in variables, then
00:03:44
let’s do the following with you,
00:03:46
we don’t need this, we do
00:03:50
n’t need this now, now let’s write instead of x,
00:03:59
instead of 640 we’ll write,
00:04:04
or better yet, let’s
00:04:10
write 640 from x. there was y 360 and we’ll write here
00:04:16
the next
00:04:20
640
00:04:22
here and here we’ll write 360
00:04:27
so if we run
00:04:31
the program,
00:04:35
nothing will change,
00:04:37
look, nothing has changed, we
00:04:41
had an ellipse in the center and it remained
00:04:44
because we used the same
00:04:46
values ​​then there is this entry is
00:04:48
identical so now let's write
00:04:52
the following
00:04:54
x equals x plus 1 and see what
00:05:01
happens let
00:05:02
's run as we see the ellipse began
00:05:08
to shift to the right along the x axis and this is not
00:05:12
surprising because the center of the ellipse we
00:05:17
set the commands is set by the variables x
00:05:20
and y and the variable x we increase by
00:05:24
one as we remember, our screen is
00:05:30
formed as follows
00:05:32
x we ​​have here y we have here that is,
00:05:37
initially x we ​​have 640
00:05:42
640 and when we launched
00:05:45
x we ​​began to increase each cycle
00:05:48
by one 600 41 42 43 and so on
00:05:55
so we got the offset
00:06:03
now let's try, first of all,
00:06:09
let's set the background for this we
00:06:14
use the background command
00:06:24
and the color will be absolutely any color, for
00:06:29
example,
00:06:31
basically arbitrary, so let's
00:06:36
run it and see what we get, the
00:06:40
trace is now not visible, why
00:06:45
was it visible trace
00:06:46
because our screen
00:06:49
was executed every cycle 1 here is pro 13 line
00:06:54
14-15 and then again 13 14 15
00:06:58
so now we have
00:07:01
the background from the years updated every cycle, we don’t seem to
00:07:04
see it, but in fact it is behind the
00:07:09
background now let's add a displacement along the
00:07:16
y axis
00:07:23
and run
00:07:27
I think you guessed that the displacement
00:07:28
went diagonally if we now remove x
00:07:37
to the displacement it will only be down along the y axis,
00:07:41
but if we change the sign of
00:07:45
the displacement we will have the other side the
00:07:51
same and if let's change the x offset we
00:07:57
will also have in the other direction of the objects
00:08:07
[music]
00:08:09
so we have
00:08:11
[music]
00:08:12
these others run the
00:08:16
offset we now have it easy
00:08:20
okay let's now try to
00:08:25
learn a new command which will be
00:08:30
called rand for us to generate
00:08:33
random numbers
00:08:41
indicated in parentheses a range of values
00:08:45
that will be selected
00:08:47
randomly, so if we now
00:08:51
write it down more precisely, let’s create several
00:08:56
variables,
00:08:58
well, for example, you already have one variable,
00:09:02
z, and let’s add another variable, p,
00:09:14
variable p,
00:09:21
and let’s now try as
00:09:25
follows: first, x, we have the maximum
00:09:31
value on the screen if we now
00:09:34
run our program, let’s analyze
00:09:38
x for us, the maximum value is
00:09:42
1280 y 720, which means for X
00:09:52
1280
00:09:57
and for Y 720, now
00:10:13
if we run our
00:10:17
program now, well, of course, for the
00:10:26
random command we need a fleet variable
00:10:33
[music]
00:10:43
[music]
00:10:46
x let’s initially start
00:10:51
without some values
00:10:56
and let’s run
00:10:59
you see we have ellipses appearing
00:11:04
and they appear everywhere throughout the entire
00:11:08
screen area okay now let’s remove the background and
00:11:11
then remove our
00:11:16
ellipses
00:11:23
and our ellipse and paint the color that
00:11:32
will be formed by three
00:11:34
variables to z and ptz i.p.
00:11:45
let's
00:11:48
paint x like this, we don't need it
00:11:57
here anymore, we'll remove the space
00:12:02
and run our program, look, we have
00:12:08
black ellipses,
00:12:14
but black is somehow very sad,
00:12:17
let's diversify our colors using the random
00:12:21
command, that
00:12:22
is, you can copy here
00:12:30
you can copy in this way
00:12:32
and so commands
00:12:35
t variables t.z.
00:12:42
i.p.
00:12:47
values ​​from 0 to 255 as we remember,
00:12:52
the color is formed in exactly this
00:12:57
way now let's run
00:13:09
install and run
00:13:12
[music]
00:13:18
now let's run our program and
00:13:19
see what we got here
00:13:24
we now have ellipses appearing
00:13:30
all over the screen area and how we see them
00:13:33
multi-colored thus in this lesson
00:13:41
we got acquainted with two types of
00:13:43
variables int and float and learned how to
00:13:47
use the
00:13:49
rand command with this I am finishing this lesson
00:13:53
thank you for your attention and see you in the
00:13:55
next lessons
00:13:57
[music]

Description:

В этом уроке мы познакомимся с переменными, научимся перемещать объекты на экране, а также научимся пользоваться командой random для генерирования случайных чисел.

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Создание Android приложений с нуля в среде Processing: Урок 3 - Переменные, random" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Создание Android приложений с нуля в среде Processing: Урок 3 - Переменные, random" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Создание Android приложений с нуля в среде Processing: Урок 3 - Переменные, random" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Создание Android приложений с нуля в среде Processing: Урок 3 - Переменные, random" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Создание Android приложений с нуля в среде Processing: Урок 3 - Переменные, random"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Создание Android приложений с нуля в среде Processing: Урок 3 - Переменные, random"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.