Welcome back.
This isn't going to be a quick bug fix, and in the last lesson, we increase the number of aliens.
So we saw that when we have way too many aliens, but we have a small screen, then the user experience
is horrible that they basically start and stop.
So it's almost impossible.
But on a larger screen, it's fine.
So we can handle this when we're setting up the aliens and as we're creating the aliens, we can check
because we do have their position, their role y value.
And as we're creating these, we can check to see if it's past a certain point and if so, why is passed
whatever the value of container, dim height and then let's do minus 200.
So whatever this value is, if we're past that, then we don't want to create any more aliens.
That's too many aliens and it's going to provide a poor user experience and again, always thinking
the flexibility.
So all we need to do is to simply return it.
And this time when we start game, you're going to see that we're not producing as many aliens.
But when we go on the wider screen, we do the same thing.
We didn't change any of the code, but we're still able to accommodate all the roles of aliens.
So that's some more functionality that you can add in as well as you can create some more dynamic.
When you're creating the aliens, you can make them wider so you can adjust their style width and all
of their different variables can be adjusted to create a different user experience.
So go ahead and add that quick update to ensure that you're not producing too many aliens.
And that doesn't matter what side of the screen the players playing on that.
They always get a fairly good experience starting up the game.