E-Book, Englisch, 336 Seiten
BORKWOOD Learning Stencyl 3.x Game Development: Beginner's Guide
1. Auflage 2025
ISBN: 978-1-84969-597-8
Verlag: De Gruyter
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)
You don't need to know anything about game development or computer programming when you use the Stencyl toolkit. This book guides you through the whole process of creating a game, publishing and profiting from it.
E-Book, Englisch, 336 Seiten
ISBN: 978-1-84969-597-8
Verlag: De Gruyter
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)
Creating video games has traditionally been a long and complicated process, requiring years of experience and a vast array of skills. However, with the introduction of comprehensive game-development toolkits such as Stencyl, the fun has returned to the art of game-creation 'Äì anyone who has the desire to create their own video game can now do so with almost any desktop computer and a free software download from the Internet!Learning Stencyl 3.x Game Development: Beginner's Guide will put you on the fast-track to learning the essentials of the powerful Stencyl game-development toolkit. You will develop a complete, ready-to-publish video game including in-game advertising, by following the clear, step-by-step tutorials, supported by numerous screenshots and practical examples.This book will guide you through all the important steps required to develop and publish your video game. Starting with the installation and testing of the Stencyl toolkit, you will very quickly advance to the fun and exciting process of creating a playable game. The step-by-step tutorials will guide you from a blank screen, right through to giving your game that final polish and sharing it with the rest of the world.
Whilst developing your feature-complete video game, you will learn how to easily detect collisions in your game using Stencyl's built-in physics engine. You'll discover how to use the powerful animation tools included in Stencyl's toolkit, and you'll find out how to make your game shine with sounds and visual special effects. You will also discover how Stencyl makes it easy to utilize the touch-screen and accelerometer features of smartphones and tablet computers.
You will learn all the essential skills required to develop a video game from scratch 'Äì right through to publishing a game on the Internet and testing games on the most popular mobile devices.
Autoren/Hrsg.
Weitere Infos & Material
Time for action – adding an event and renaming the behavior
The game file that needs to be imported and loaded for this session is .
If we're following on immediately from the previous instructions, we should be looking at the monkey actor's behavior page. However, we need to return to the behavior editor so, click on the tab or, if the tab is not visible, go to the Dashboard, click on Actor Behaviors (under LOGIC in the left-hand panel) and double-click on the Collect Fruit behavior, which is currently represented by an image of a hammer.
We can now see the orange when … block that we created earlier. Now perform the following steps:
- Click on the + Add Event button at the top of the left-hand panel.
- In the pop-up menu, move the mouse over the Collisions option, and select Member of Group.
- Double-click the new Actor – Group item in the left panel.
- Change the text to and press on the keyboard.
- On the orange when Self hits a… block, change the Actor Group option to Enemies by clicking on it, selecting Choose Group and double-clicking Enemies in the Choose an Actor Group dialog box.
- In the right-hand panel, ensure that the Actor button is selected at the top of the panel, click on Properties from the row of silver buttons in the right-panel, and drag the blue kill Self block into the orange when Self hits a… block.
- In the row of buttons shown at the upper-center of the screen, click on the Properties button, as shown in the following screenshot:
- In the Edit Properties dialog box, change the name from to .
- In the Descriptionbox, type .
Note
Note that we could also change the icon for this behavior from the default hammer to any image of our choice, although we're going to leave it as it is.
- Click on the Apply Changes button.
- Test the game. First, make the monkey run into a piece of fruit, then make it bump into one of the enemy characters.
We have added a new event to the behavior that we created earlier, and we renamed the behavior.
The procedure for creating the event is very similar to the one we followed when creating the event. We specified what type of event we wanted to create. In this case it is another group collision. Then, we specified which group we wanted to detect the collisions with, by changing the to in the orange block.
The next step was to tell the event what to do when a collision occurs with the group—we need to kill the actor—so we dragged the block into the orange block.
We might ask ourselves the question, "Which actor is going to be killed?" To find the answer, we first need to know that the block is going to kill . Remembering that this behavior is attached to the monkey actor, we can determine that refers to the monkey. So, the monkey will be killed when the collision occurs.
This is an important difference when compared to the event because, in that event, it is the actor —the member of the group—that was killed.
The final step was to give the behavior a more relevant name, it doesn't just manage collisions with the fruit anymore. It manages all of the monkey's collisions so the name seems more appropriate, and will help us to more easily identify the behavior if we need to make changes in the future.
When we test the game, we will find that both events are doing their jobs—when our monkey touches a piece of fruit, the fruit disappears but, when the monkey runs into one of the enemy actors, the monkey is killed.
Understanding the instruction block palette
When we are creating or editing behaviors, we have access to the block palette, the rightmost panel from which we have been selecting the instruction blocks.
The palette has been arranged so that it is easy to locate the blocks that we require, and it is organized as shown in the following screenshot:
We have already used the section buttons to select blocks from the Actor and Scene sections, but it is worth noting that each section has different category buttons. For example, in the previous screenshot, we can see that the currently selected Scene section has five categories namely Actors, Regions, World, View and Game Flow. Underneath the category buttons, the blocks are separated into subcategories so, for example, the Actors category, in the Scene section, has the subcategories Create Actor and Get Actor.
If we click on the Actor section button, we will have a different selection of categories from which we can choose—Position, Motion, Properties, Draw, Tweening, and Effects. If we then click on the Position category button, we can see that the subcategories are Position and Direction.
As we learn more about Stencyl behaviors, we will become familiar with the sections, categories and subcategories, but one of the keys to mastering Stencyl is to understand which all instruction blocks are available to us, and where to find them.
Note
To learn more about how individual instruction blocks work, right-click on the block in the palette, and select View Help. This will open up the relevant help page on the stencyl.com website.
Considering future refinements
We've created a new behavior for the monkey, and it correctly manages the monkey's collisions, but we still have some work to do in order to refine the actions that take place when the collisions occur.
For example, rather than fruit disappearing instantly when it is collected, it might be more visually appealing if a special effect occurred. Perhaps the fruit could fade away gently or, for a more dramatic effect, it might explode, with the pieces fading away.
When the monkey collides with an enemy actor, the monkey vanishes without warning, which isn't very elegant, so we'll need to make some decisions about how that process is handled.
However, rather than holding ourselves back with the technicalities of special effects, we're going to carry on building the important mechanics of the game, and we'll consider options for some of the refinements and implement them later in the development process.
A review of the gameplay
We are making fantastic progress with our game; we're only one quarter of the way through this chapter, and we have implemented several features and learned several new skills.
However, in its current state, the gameplay is not going to be very exciting for players of Monkey Run. The game will be exactly the same every time it is played and, as a designer, our job is to create a game that people will want to come back to play time and time again.
There is an important element missing from our game, and that is the element of chance, our game needs some randomness!
Random gameplay is very difficult to get just right. If a game has too many random elements, it will be too difficult to play, our players will give up very quickly and move on to more interesting games. For this reason, even when we, as designers are happy with the gameplay, it is vital that we find the opportunity to allow independent, unbiased game testers to provide us with feedback, so we can fine-tune the game and make it enjoyable to play.
Introducing a new challenge
We're going to introduce a new actor into our game—a mysterious Aztec statue that will fall from the sky at...




