Time For action – testing Stencyl
We're going to load up Stencyl, open one of the sample games that has been provided, and run the game to make sure that Stencyl is working properly.
Note
From this point onwards, all the tutorials will be the same whether Stencyl is running on Microsoft Windows, Mac OS X, or Linux, although the screenshots have mainly been taken using the Microsoft Windows version. On the rare occasion that there is a difference between the versions, it will be explained clearly in the tutorial.
- If Stencyl is not already running on your computer, load it up and make sure that you have signed in with the account username and password that you created earlier, so you will see a screen that looks something like the following screenshot:
Don't worry if the list of games isn't identical on your screen, because the sample games packaged with Stencyl may be changed as software updates are released.
- Double-click on the game icon for Alien Approach to open the game.
- When the game has loaded, ensure that the target-platform drop-down option is set to Flash (Player), and click on the blue arrow labeled Test Game, both of which can be found at the upper-right corner of the screen, as shown in the following screenshot:
- Wait for Stencyl to create the game and display it in the Adobe Flash Player window as shown in the following screenshot (this may take up to 30 seconds, perhaps more on a very old computer).
- Play the game using the arrow keys to move left and right, and the spacebar to fire your weapons.
- When you have finished playing the game, close the Adobe Flash Player window.
What just happened?
We just loaded a game into Stencyl and compiled it for the first time! Compilation is the process of converting the Stencyl game-code into a format that will run on our target platform. The default target platform is Flash, so when the compilation process has finished, the game will be displayed in an Adobe Flash Player window.
It's important to be aware that the sample games are not completed projects – they are just examples that have been provided so that we can see the kind of games that can be created. We can also use the samples to understand how the games have been put together, which is a great way to learn!
Have a go hero
We've loaded and compiled one sample game and have had a play, so why not try some of the other sample games that have been provided?
Before we can open up another game, we should close the Adobe Flash Player window in which the previously tested game is running, and we must close the current game in Stencyl by clicking on File | Close Game and follow any prompts that appear.
Now, experiment with the other sample games, so that you become comfortable with the process of loading, testing, and closing games in Stencyl.