The game file to import and load for this session is 5961_07_16.stencyl
.
When the game first loads up and appears onscreen, it starts immediately without giving the player any warning! We have already created a temporary Main Menu scene, which is displayed when the player clicks on the menu option button on either the success or the game over screen, but we should really spruce up the Main Menu scene and display it as an introduction to the game when it is first loaded:
We have customized the Main Menu scene so that it presents the name of the game to the user, along with the game credits and a functioning Start button, on an appropriate background.
Firstly, we added three new assets to the game: Stencyl Book Title Banner, Stencyl Book Title Credits, and Stencyl Book Start Button. Note that we didn't need to specify the physics properties for these actors because the scene has no gravity settings, and there is no movement occurring in the scene—the actors will happily stay exactly where we placed them without further configuration!
Up until this point in development, the Level1 scene had been the starting scene for the game, but now that we have a functioning Main Menu, we have set it to be the starting scene, so that it is displayed when the game loads.
A plain background for our introductory scene doesn't provide a very good first impression for our game, so our next task was to add the Jungle Background to the scene. By default, backgrounds are not displayed in the scene editor, so we needed to click on the Show Background button to show the image, but before showing the background in the scene view, we refreshed the scene using the keyboard shortcut Ctrl + R (Command + R on Mac OS X). Refreshing the screen forces the changes to the background to be saved, so that it will be visible in the scene editor.
We could have designed and imported a different image for the Main Menu background, but for our purposes, the existing background looks the part. Another advantage of reusing existing assets, such as backgrounds, is that the file-size of the game will be smaller than if we added additional assets.
With the background visible, we were then able to position the required actors onscreen. In the screenshot of the example Main Menu scene shown in the previous step 9, it can be seen that the title actor showing the Monkey Run image has been positioned at an angle. This was achieved by placing the actor into the scene, then moving the cursor slightly outside any corner of the selection area for the actor, at which point the rotation cursor is displayed. Clicking-and-dragging the mouse when the rotation cursor is displayed will rotate the actor around its rotation point; usually the center of the actor. The following screenshot shows the rotation cursor (highlighted by a circle) positioned just outside the corner of the selection box for the Stencyl Book Title Banner actor.
The actor has also been stretched to make it larger, and this can be accomplished simply by clicking-and-dragging one of the corner handles for the actor—the handles are the miniature boxes displayed at the corners and sides of a selection box, also visible in the previous screenshot.
With the design of the Main Menu scene completed, the final step was to add a custom event to the Stencyl Book Start Button actor to make it do its job of starting the game. The event resets the Lives
game attribute to 3
and switches to the Level1
scene, using the specified transition effect of Slide Right
, when the actor is clicked.
The game file to import and load for this session is 5961_07_17.stencyl
.
Our Main Menu scene is perfectly adequate for a sample game, but it would benefit from a little more attention to the design and theme of the game!
Consider implementing the following:
The previous suggestions are the type of additional features that can really bring a game to life, immediately arouse interest in the game, and raise it from the realms of okay to excellent!
Research other games—what do they have in their introductory scenes to make them interesting and engaging to players before the game has even started?
The above suggestions have not been implemented in the sample game—this is a challenge to put into practice many of the skills that we have learned throughout this book. It's a great opportunity to review the various techniques that we have covered, and to consider how they can be used together to achieve different goals.
Need help implementing some of the above suggestions? Visit the official Stencyl forums at community.stencyl.com. Before starting a new topic and asking for help, try searching the forums to see if other Stencyl users have asked similar questions and have already had them answered!
18.226.34.25