Post by deta on May 22, 2018 12:08:30 GMT -5
Hello everybody!
In this tutorial I'm going to teach you how to create your own custom sprites for Pekka Kana 2, with PekaSE.
This tutorial will be by example and I'd recommend to follow it first and then experiment with it after.
A tutorial on how to create custom graphics for Pekka Kana 2 can be found here.
First things first you need PekaSE, which you can find here.
Alright, let's start with an idea first. I want to create a playable character. Something like Pekka, but my character will drop ice blocks and is able to fly.
Let's open up PekaSE and change the following values:
The frame values let the game (and PekaSE) know how big the image for the sprite is. It will use these values and the Position X/Y to cut the smaller image out of the bigger one, which we'll set now.
Go ahead and click on the "Browse" button next to the "Image:" text field. Then select the following file: "spr_hens.bmp".
Now PekaSE will show the picture of the sprite in the gray box in the top right corner.
Go ahead and change the name from "unnamed" to "ice rooster", you don't have to do this, it won't show up in the game, but it is used in the level editor, so that you can identify it later.
After that go ahead and hit the "Browse" button next to "Ammo Sprite 1" and select the file "icecube.spr". Then change the color from "Original" to "Blue", this is an ice rooster, after all!
Change the Damage and Immunity properties both to "Snow".
Now, I want my character to be able to fly. This is done by setting the "Weight" propertie of your sprite to "0" and you can also set the "Max Jump" propertie to 0, because it doesn't need it anyway.
Set the Max speed propertie to 3 and you're done!
Your "Properties" tab should now look like this:
So far so good, let's move on to the "Animation" tab and set the sprite up with some animations!
Set the following values:
The Frame rate propertie tells the game the duration of one animation frame. So, each of this sprites animation frames will be displayed for 4 frames, before being changed.
Frames tells the game how many frames this sprite has, this is needed to know how many images to cut from the bigger image. You can see all your sprites frames, after setting the frames value, by clicking on the "Show frames" button in the down right corner.
Next we are actually going to animate our sprite! PekaSE presents the animation data as such: Frame Number, Frame Number, Frame Number, etc.
If we want our still animation to be the first and second frame looping we'd type in the following:
"1,1,1,1,1,2,0,0,0,0" and check the "Looping" checkbox next to it.
A 0 marks the end of an animation.
This is actually the animation I'm going to use for my sprite, so just copy that. Here's the rest:
If there is a "Loop" in the table, this means that you should check "Loop", too. If there is nothing, don't.
Note: If you want to make a flying sprite, the actual flying animation is the same as the Duck animation.
You can test these animations out by clicking on the buttons up top!
This is how your "Animation" tabs should look right now:
Let's go to the "Sounds" tab and setup some sounds.
Set the following values:
And check the Random frequency at the bottom. That's it for sounds. If you want you can hit the "Play" buttons to listen to the sounds.
This is how your "Sounds" tab should look like now:
Lastly let's head over to the "Other" tab and set a few things there.
Set the following properties:
AI patterns:
1: Transformation If Energy Below 2 (P)
Destruction determines the effect that gets drawn, when your sprite gets knocked out.
Tile check makes it so your sprite can't walk/fly through walls.
The Wall up, etc. properties make it so that your sprite "acts" as a wall.
That AI pattern "Transformation If Energy Below 2 (P)" will cause the sprite to transform into the transformation sprite, when the sprites energy is below 2.
Your "Other" tab should look like this now:
Now save the sprite under the name "ice_roo.spr", load up your level editor of choice, set this sprite as the player and test it out! If you've set everything correctly you now have an ice Pekka!
If anything is still unclear, here is the manual, or you can just ask right here in this thread. Although, I'd recommend reading the manual first and then asking. Also, play around with this and just test things out, that's the best way to learn!
In this tutorial I'm going to teach you how to create your own custom sprites for Pekka Kana 2, with PekaSE.
This tutorial will be by example and I'd recommend to follow it first and then experiment with it after.
A tutorial on how to create custom graphics for Pekka Kana 2 can be found here.
First things first you need PekaSE, which you can find here.
Alright, let's start with an idea first. I want to create a playable character. Something like Pekka, but my character will drop ice blocks and is able to fly.
Let's open up PekaSE and change the following values:
- Frame width to 32
- Frame height to 59
- Sprite width to 30
- Sprite height to 59
The frame values let the game (and PekaSE) know how big the image for the sprite is. It will use these values and the Position X/Y to cut the smaller image out of the bigger one, which we'll set now.
Go ahead and click on the "Browse" button next to the "Image:" text field. Then select the following file: "spr_hens.bmp".
Now PekaSE will show the picture of the sprite in the gray box in the top right corner.
Go ahead and change the name from "unnamed" to "ice rooster", you don't have to do this, it won't show up in the game, but it is used in the level editor, so that you can identify it later.
After that go ahead and hit the "Browse" button next to "Ammo Sprite 1" and select the file "icecube.spr". Then change the color from "Original" to "Blue", this is an ice rooster, after all!
Change the Damage and Immunity properties both to "Snow".
Now, I want my character to be able to fly. This is done by setting the "Weight" propertie of your sprite to "0" and you can also set the "Max Jump" propertie to 0, because it doesn't need it anyway.
Set the Max speed propertie to 3 and you're done!
Your "Properties" tab should now look like this:
So far so good, let's move on to the "Animation" tab and set the sprite up with some animations!
Set the following values:
- Frame rate to 4
- Frames to 21
- Animations to 7
- Attack 1 duration to 20
The Frame rate propertie tells the game the duration of one animation frame. So, each of this sprites animation frames will be displayed for 4 frames, before being changed.
Frames tells the game how many frames this sprite has, this is needed to know how many images to cut from the bigger image. You can see all your sprites frames, after setting the frames value, by clicking on the "Show frames" button in the down right corner.
Next we are actually going to animate our sprite! PekaSE presents the animation data as such: Frame Number, Frame Number, Frame Number, etc.
If we want our still animation to be the first and second frame looping we'd type in the following:
"1,1,1,1,1,2,0,0,0,0" and check the "Looping" checkbox next to it.
A 0 marks the end of an animation.
This is actually the animation I'm going to use for my sprite, so just copy that. Here's the rest:
If there is a "Loop" in the table, this means that you should check "Loop", too. If there is nothing, don't.
Still | 1,1,1,1,1,2,0,0,0,0 | Loop |
Walking | 3,4,5,6,0,0,0,0,0,0 | Loop |
Duck | 8,9,0,0,0,0,0,0,0,0 | Loop |
Jump up | 0,0,0,0,0,0,0,0,0,0 | |
Jump down | 1,10,11,12,0,0,0,0,0,0 | |
Damage | 13,14,0,0,0,0,0,0,0,0 | Loop |
Knock out | 15,15,16,16,17,17,18,0,0,0 | |
Attack 1 | 19,15,19,15,0,0,0,0,0,0 | |
Attack 2 | 0,0,0,0,0,0,0,0,0,0 |
Note: If you want to make a flying sprite, the actual flying animation is the same as the Duck animation.
You can test these animations out by clicking on the buttons up top!
This is how your "Animation" tabs should look right now:
Let's go to the "Sounds" tab and setup some sounds.
Set the following values:
- Damage to p_damage.wav
- Knock out to p_ko.wav
- Attack 1 to p_layegg.wav
And check the Random frequency at the bottom. That's it for sounds. If you want you can hit the "Play" buttons to listen to the sounds.
This is how your "Sounds" tab should look like now:
Lastly let's head over to the "Other" tab and set a few things there.
Set the following properties:
- Destruction: Animation & Feathers
- Tile check
- Wall up
- Wall down
- Wall left
- Wall right
- Transformation sprite: r_naked.spr
AI patterns:
1: Transformation If Energy Below 2 (P)
Destruction determines the effect that gets drawn, when your sprite gets knocked out.
Tile check makes it so your sprite can't walk/fly through walls.
The Wall up, etc. properties make it so that your sprite "acts" as a wall.
That AI pattern "Transformation If Energy Below 2 (P)" will cause the sprite to transform into the transformation sprite, when the sprites energy is below 2.
Your "Other" tab should look like this now:
Now save the sprite under the name "ice_roo.spr", load up your level editor of choice, set this sprite as the player and test it out! If you've set everything correctly you now have an ice Pekka!
If anything is still unclear, here is the manual, or you can just ask right here in this thread. Although, I'd recommend reading the manual first and then asking. Also, play around with this and just test things out, that's the best way to learn!