Game Development Reference
The finished script will look like the following screenshot:
The game is now done! When the player manages to trigger this script, it means that he
has won the game.
Objective complete - mini debriefing
This last step is a small but important part to actually finish the game. Without it the game
would go on forever, or unil the player is hit. That would not be a very nice prospect.
We embellished the end a bit with a message and an effect to the boss to make winning
the game more saisfactory.
This game has quite a lot going on and it uses a lot of different sprites. It can especially be
hard to manage all these different elements. Keeping track of layers to simulate depth can
be a challenge. With a bit of thought and planning, we can make it work.
Just remember the relevant informaion for each object. Think about what it needs to do and
what it needs to know in order to do it. This way you can decide whether you need variables;
whether these variables need to be made available to all the sprites or you can keep them
only for a single sprite.