I could not find any tutorials on how to do scroll text with Stencyl. If you have lived as long as me, you might remember the damascene in the 80s and 90s. I first did this kind of stuff about 25 years ago on Amiga computers. Anyway here is how to do Stencyl Scrolltext.
In my example project I used 800 x 600. You can of course use any resolution you want. Just for fun I did add a background picture here. But for this example it is not needed.
Start by create a scene.
I used 4 attributes in this example.
– xPos (Number)
– TextNo (Number)
– ScrollText (Text)
– endPos (Number)
Only one event is needed for this Stencyl Scrolltext. Here is the code i made. Click it for full resolution.
With this example you can edit the text as you like. The code will calculate the length of the text in pixels. And work out how far it need to scroll to make it disappear before displaying the next line of text.
With this you have made the first step to a retro intro/demo (if that was your goal). Just add a background picture, some music and maybe a star field. And you have your self a nice little retro demo.
I have made some star field examples earlier you can have a look at too. Check out my star field article.
The default location for your stencyl game folder is /users/username/stencylworks/games
So if your username is john it would be something like /users/john/stencylworks/games
This can easily be changed to something else. If you prefer having them saved somewhere in your Documents folder, you can do that. Just create a folder in your Documents folder. You can do that before, or you can create the folder when you change default stencyl game folder in Stencyl. So if we create a folder called stencylworks in Documents. The complete path would be /users/john/Documents/stencylworks/games
After you have created the new stencyl game folder in Documents, open Stencyl. Don’t open any games. Because you can not change the stencyl game folder when a game is open. Go to preferences and select workspace. At the bottom half at in the preference windows you will see “Workspace Folder”. And you will see the path for where the stencylworks (stencyl game folder) folder is located. Click the view workspace button after the path, to open up the finder window.
If you want to change location, just click the path and you will get a drop down and select “Chose folder”. Then click “Apply changes” at the bottom of the screen. And Stencyl will now ask you if you want to copy all games, kits, logs, etc to your new folder. It is best to answer yes, unless you want to do it manually afterwards.
Thats it for changing default stencyl game folder on a Mac.
If you dont have Stencyl, and you would like to try. You can download it for free from their home page at www.stencyl.com
You can also watch this youtube video to see how it works:
Here is a short description on how to do Stencyl parallax scrolling.
From Wikipedia: https://en.wikipedia.org/wiki/Parallax_scrolling
Parallax scrolling is a technique in computer graphics and web design, where background images move by the camera slower than foreground images, creating an illusion of depth in a 2D scene and adding to the immersion. The technique grew out of the multiplane camera technique used in traditional animation since the 1930s. Parallax scrolling was popularized in 2D computer graphics and video games by the arcade games Moon Patrol and Jungle Hunt, both released in 1982. Some parallax scrolling had earlier been used by the 1981 arcade game Jump Bug.
What we will cover here is the layer method. That means there will be several layers moving with a different speed.
Stencyl Parallax Scrolling
First you need to create a project. Then create a scene, we can call it Main for the sake of this tutorial. And then we need backgrounds. Since we will use different layers, we will create 3 different backgrounds. And tick of “Repeat Background”. The first layer will move slowest.
After you have added the background, you need to go to the scene and add them as background layers. Add the layers that should be furthest away first. Then the middle layer, and the foreground layer as last. All layers should be added as background layers.
You probably need to adjust the speed. But for the example shown in the video below, I use speed 1 at layer 1. Speed 2 at layer 2, and speed 4 at layer 3.
Check out the Stencyl Parallax Scrolling video below for the details. As a video demonstrate this much better than a written text.
In Stencyl Moving the mouse cursor is slowing down my game. Why is that? Here is what I found and how I fixed it from slowing down my game.
I noticed all animation slows down when moving your mouse cursor over the flash player game. There was only a few lines of code in the game and just a few events. So I tried to look over the code, but couldn’t find anything that would slow down the game from just moving the mouse cursor around.
After some google searches, I found another guy who had the same problem using Action Script 3 on a Mac. I was also developing on a Mac. Then I tried to run my game in a web browser instead and the game ran perfectly.
So if you have the same problem, try running your game in your browser instead.