The purpose of this tutorial is to identify the issues in creating a simple escape the room game and explain ways I’ve found to solve them. The game we will create is very simple and remoting challenging to play. However it will encompass nearly all of the basic needs of an escape game and by using these techniques you should be able to expand upon them until you have created a game of great complexity.
Organization is very important as you approach a game like this. While in our simple version it may be easy to keep track of layers and variable names, even a simple puzzle can quickly offer more complexity. So, please do yourself a favor: label your layers neatly, name your objects consistently and create variable names that make sense and are easy to remember. The basic organization scheme of an escape game on the root timeline is deceptively simple. Open a new flash file, save it as EscapeTutorial and create four layers on the main timeline. From top to bottom your layers will be:
For our simple game we don’t really even need a labels level as everything will exist in the first frame. However, you'll want one if you make a more complicated game. You should also hit Shift-F2 to open the scenes panel and name this scene “Rooms” – ie. the main space of the game. Later on we can create an intro scene with a play button and a link to your website and an outro scene for when the player wins the game. but that’s not necessary now. Insert a movieclip called rooms_mc on your rooms layers and one called inv_mc on your inventory layer. Rooms will be exactly what it sound like – the rooms, walls and objects of your game. Just what you're used to when playing online in bingo rooms. Inv_mc will become your inventory. You can use a different naming convention if you want, just be consistent because as you’ll be pathing between these two movie clips a LOT. Create a colored rectangle in each movie clip and drag an instance of each to the stage on the appropriate layer. Size them how you like. It’s a good idea to figure out the basics of where you’d like these two main objects to go, how big you’d like them to be and the total size of the resulting movie during these first steps. It can be kind of a pain to move them around later on, especially the inventory. Because you will be using the x and y values of your inventory objects to help snap them back into place, moving or resizing the inventory will wreak havoc with these values later. If those values change you’ll have to go back through your actionscript and change them all.