


Even if you let go of the controls, the Hero will continue moving for a while before coming to a stop. Ice In jump and run games such as Super Mario Bros, some surfaces are slippery. Tip: It s a similar solution to I m Trapped! You do not need to make it so that if the Hero is half-way off the screen, he also appears halfway on the other side. Wrap Around In a retro space shooter game such as Asteroids, ships that go off one side of the screen appear on the other side. Pretend that there is an invisible wall on all 4 sides of the stage. Make it so that he s not allowed to do that. (ĥ Lesson 2 - Logical Thinking - Extra Activities I m Trapped! Right now, the Hero can walk off the screen. If you ve finished early, try some of the extra activities. Congrats! You ve written your first game from scratch. Does it work correctly, or is it not quite right? Hint: Does the actor stop moving after you lift the left and right arrow keys? 5 Moving in all 4 Directions Finally, make it so that the actor can move up and down in addition to left and right. After fixing this problem, run the game once more.Ĥ 4 Moving Left & Right Now make it so that the actor moves left if the left key is pressed down. What do you need to do? Hint: Use the otherwise block. Oops! The actor doesn t stop after you lift the key. Press the right arrow key to move the Hero. 3 Press a Key to Move Now, let s make the actor only move if the right arrow key is pressed down. The Hero will move towards the right without stopping.

Use under Actor > Motion to set his speed to 10. First, let s make the Hero constantly move towards the right. This is where you ll write your program that tells the Hero what to do. Now, you ll see a colorful page with blocks.

2 Constant Motion Open up the Actor Type called Hero. Time to bring him to life! Close the game. You ll see our Hero again, but he can t do anything yet. (Can t find Project 2? Visit to get it) Run the game. 1 Get Started After launching Stencyl, open up Project 2.
STENCYL DIALOG EXTENSION CODE
You ll then write the code for a game entirely from scratch.ģ Lesson 2 - Logical Thinking In this activity, you ll write a behavior that tells our hero to move in all 4 directions. In the next lesson, you ll learn how computers and games actually work. It is called Enemies Killed Congrats! You ve made your first game. What does into those number fields? Experiment and see what happens! The Score block can be obtained from the Game Attributes page under the Attributes category. Use the Draw Text block under the Drawing category to draw the Score to the screen. Optional Activity - Draw the Score This optional activity will introduce you to drawing data to the game screen. What exactly is happening here? Under the hood, the behavior is listening for collisions between the player and any actors that are considered enemies. Now, run the game and jump on top of the enemy. Configure the Stompable Group field to Enemies. Add the Stomp on Enemies behavior to our Hero. Let s give our Hero the ability to stomp an enemy. Instead, our Hero just lands on top, and nothing happens. 4 Stomping Enemies You may notice that jumping on top of the enemy does not kill it. Behaviors grant new abilities to Actors, letting them do more than before. What did you do? You added a Jump behavior to the Hero. Notice that the Hero can now jump! (Press the Spacebar) Hero can t jump high enough? Experiment with the Jump Force field. Jump Key Jump Jump Force 25 Jump Sound Jump Right Animation Jump Left Animation Jump Walk (R) Walk (L) Now, run the game again. You ll now see a form with some customizable fields. (It s at the bottom left as shown below)Ģ On the screen that pops up, pick FROM THIS GAME > All > Jumping. 3 Make the Hero Jump Open up the actor type called Hero. You may realize that the game isn t fun because the Hero can t jump. After you re done, run the game again and play through your level. Doesn t it look a bit empty? Play around with the editor by adding some blocks. Now, you ll see the level you just played. 2 Build the Stage Open up the scene called Level 1. After the game appears, move the Hero around using the left/right arrow keys. (Can t find Project 1? Visit to get it) Click Test Game (in the top toolbar) to run the game. 1 Get Started After launching Stencyl, open up Project 1. 1 Lesson 1 - Make Your First Game with Stencyl In this activity, you ll create a simple jump and run game using Stencyl.
