1
00:00:00,240 --> 00:00:00,850
Welcome back.

2
00:00:00,870 --> 00:00:05,730
This isn't going to be a quick bug fix, and in the last lesson, we increase the number of aliens.

3
00:00:05,730 --> 00:00:11,760
So we saw that when we have way too many aliens, but we have a small screen, then the user experience

4
00:00:11,760 --> 00:00:14,870
is horrible that they basically start and stop.

5
00:00:14,880 --> 00:00:16,230
So it's almost impossible.

6
00:00:16,500 --> 00:00:18,530
But on a larger screen, it's fine.

7
00:00:18,690 --> 00:00:25,050
So we can handle this when we're setting up the aliens and as we're creating the aliens, we can check

8
00:00:25,050 --> 00:00:30,030
because we do have their position, their role y value.

9
00:00:30,150 --> 00:00:40,500
And as we're creating these, we can check to see if it's past a certain point and if so, why is passed

10
00:00:41,100 --> 00:00:47,250
whatever the value of container, dim height and then let's do minus 200.

11
00:00:47,820 --> 00:00:53,810
So whatever this value is, if we're past that, then we don't want to create any more aliens.

12
00:00:53,820 --> 00:00:58,950
That's too many aliens and it's going to provide a poor user experience and again, always thinking

13
00:00:58,950 --> 00:01:00,270
the flexibility.

14
00:01:00,390 --> 00:01:02,730
So all we need to do is to simply return it.

15
00:01:02,910 --> 00:01:07,680
And this time when we start game, you're going to see that we're not producing as many aliens.

16
00:01:07,830 --> 00:01:11,270
But when we go on the wider screen, we do the same thing.

17
00:01:11,280 --> 00:01:16,010
We didn't change any of the code, but we're still able to accommodate all the roles of aliens.

18
00:01:16,290 --> 00:01:21,660
So that's some more functionality that you can add in as well as you can create some more dynamic.

19
00:01:21,660 --> 00:01:27,600
When you're creating the aliens, you can make them wider so you can adjust their style width and all

20
00:01:27,600 --> 00:01:32,440
of their different variables can be adjusted to create a different user experience.

21
00:01:32,730 --> 00:01:37,890
So go ahead and add that quick update to ensure that you're not producing too many aliens.

22
00:01:37,890 --> 00:01:41,640
And that doesn't matter what side of the screen the players playing on that.

23
00:01:41,670 --> 00:01:44,550
They always get a fairly good experience starting up the game.
