Game Development Reference
As a final step, we will also reset the items for each new level played. So at each level the
player has to collect the items before he/she can use them.
1. We move to the ileGenerator scripts, as that's where we set most of the variables.
At the top of the list, we add a delete <all> of items block to empty the list.
Te s t the game and see how many levels you can clear before geing defeated.
Objective complete - mini debriefing
We cleaned up the game and ied all the loose ends together. You'll oten ind that while
developing games, you will try and add new features piece by piece. This often requires
some rethinking and later adjustments to the parts of the game that we have already
(thought were) finished.
Therefore, it's a good idea to keep the way you write games clear and consistent. Set
variables at the start of a script. It's even beter if you can collect them in the Stage object.
Using funcions also helps to separate diferent pieces of funcionality.
That concludes this game. By adding enemies and items, we changed it from a relaively
simple exploraion game to a challenging search for items and an exit. We copied a lot of
funcionality already writen, making changes only where we needed to create variaion.