Tip:
Highlight text to annotate it
X
Crash Course 2: Part1 Importing resources.
Hello Friends, welcome to this first Stencyl tutorial. Today we will make the Crash course 2
Wich you can find in Stencyl's website on the help section
And select Crash course 2 to the left.
You will learn how to make your first simple game starting from 0
In this first part, we will learn how to add resources to our game in Stencyl
For that, you will need the resources for this spaceship game...
such as sprites for the player, bullets and enemies, and also the background and sound effects.
You can download this resources from the link in the video description.
To create a new game, select "games" in the welcome panel and then click on the blank space with dashed line.
then find the "blank game" icon on the list, select it and click on "Next"
Give a name to your game, if you want write a description, i wont do it for now.
finally select the window size for the game. Let's use 640x480 px this time.
When you are ready... click on the "create button" and the game will be created.
You will notice that now there is a Dashboard instead of the Welcome panel
This Board has a list of all kinds of game resources, and you will notice that all categories are empty by now
Well... let's add the first one.
Select "actor types" in the dashboard and then click on the blank space.
Name this actor "spaceship" and then hit "create"
You will see that a new tab opens, this tab is for the new created Actor.
There we can edit the properties for this actor.
Let's start with the appearance of our Ship.
Click on the blank space to create an animation for the ship.
Now click on the blank space to import a graphic.
In the pop up window click on the "choose image" button and then look for the player's ship image.
You will notice this image has 4 ships. That is because we will use this image to create an animation for the ship with 4 frames.
In the "columns box", change the amount to 4. This will split the image into 4 animation frames.
Now you can see how this ship has now a 4 frames animation. Name it "flying".
An actor can has 1 or more animations, for exaple for movement, for flying, for walking... all depends on what you want and how do you want your game looks.
Now go the the physics section and set the "Can rotate" and "Afected by gravity" properties to "no"
On the properties section, select the group type "Players" from the drop down list.
Now go to collision section. You will see the collisions limit shape for the selected animation.
you will notice that is a rectangular shape by default, but you can change this shape with the tools on this section.
Use the settings icon to open the Game Properties and click on the "Car Icon" to open the Collision groups tab.
Select the "Players" group from the list on the right. Here is where we set how collision groups will colide.
The actors in this group will collide with the actors of the green highlighted groups.
Use the "Create new" button to create two new groups. One for the bullets and the other for the enemies.
Then you must configure Bullets to collide with enemies and vice versa. Remember the groups highlighted in green will collide.
Once you are ready with the collide groups, click on "ok" button.
If you go to ship properties, you will notice that now the groups you have created are in the groups selection list.
Now create a new actor for the enemies.
then create a new animation for this actor.
Now add the image for the enemy ship. This image only has 1 frame, so leave the columns amount in 1
In this case this animation will have only one frame and it will be a static image.
Go to the properties section and select the "Enemies" group from the list.
on the Physics section set "can rotate" and "afected by gravity" to no. And set the kind of actor type to "Can not be pushed"
Now create another actor for the bullets.
Create a new animation to this actor. Add the image for the bullets
Change the amount of columns to 3. Now you have an animation for the bullets!
In the properties section, select the bullets group from the list.
On phyisics. set the "can rotate" and "afected by gravity" options to "No". Leave the kind of actor "normal"
Don't forget to save your game project.
Let's create the background. The process is very similar.
Select backgrounds in the dashboard. Click on the blank space to create a new one and give it a name.
Click on the blank space to create an animation for the background.
Search and add the background image...
In this case our background will be static.
As you can imagine if we add another frame, we will have an animated background... but by now we will leave it like this.
Finally check the box next to the "Repeat background" option.
Well let's add the sounds for the game
In the dashboard select "Sounds" and then click on the blank space to ad a new sound
Give it a name, for example: Background effect.
click on the blank space to add a new sound file. Look for the ambience.mp3 file. Make sure that the sound type is set to Music
If you want you can change the sound name in the properties section... i will name it: Ambience
Repeat this process to create the sound for the bullets and the explosions
But for this sounds, set the sound type to "Sound Effect" instead of "Music".
When you finish that, we have done creating and adding resources to our game project!
This is all by now. In the next video we will learn to build a scene for our game using the scene editor.
I hope you liked this one... see you later.