Pekka Kana 2 Sprite Editor

Table of contents



PekaSE (Pekka Kana Sprite Editor) is a modern sprite editor for Pekka Kana 2.
It allows you to create sprites rather easily. The user interface was designed with usability in mind, so most of the important things are grouped together.
Leading to a clear interface, that is easy to use.










Properties


Properties tab
The following table explains every propertie present in the screenshot.

Max length is the maximum amount of characters this propertie can have.
This limit includes the four characters of: ".bmp", ".wav" and ".spr".
So the actual length is MAX LENGTH - 4.

This limit only affects strings, so if there is no limit the value is a number and it doesn't really matter.
(Of course you have to stay in the limits of the integer and double types, but they are so big that you don't have to worry about them.)

Propertie: TODOExplanation:Max length:
ImageThe image file/sprite sheet for your sprite.100
Position XThe position of your sprite in the image file. (Example below)
Position YSame as Position X, but for the Y coordinate.
Frame widthThe width of your sprite, in the image file.
Frame heightSame as Frame width, but for height
Sprite widthThe width of your sprite in the game. (Example below)
Sprite heightSame as Sprite width, but for height
NameThe name of your sprite. (This will only show up in the level editor, it's not used in game.)32
Ammo Sprite 1This sprite will be shot, if your sprite uses it's first attack.100
Ammo Sprite 2This sprite will be shot, if your sprite uses it's second attack.100
TypeThe type of your sprite determines it's function. E.g. a character sprite can be controlled.
ColorThis propertie determines the color of your sprite.
Damage TypeThis determines which type of damage your sprites does.
ImmunityWhich type of damage your sprite doesn't take damage from.
WeightA weight of 0 allows your sprite to fly.
A weight above or equal to 1 doesn't and activates switches.
A weight below 0 will cause your sprite to rise up (fast).
A higher weight also causes more damage, when falling onto an enemy.
EnergyThe amount of hit points your sprite has.
If the sprite is a bonus item, energy will restore this many hit points. (E.g. feathers)
DamageHow much damage your sprite does, to other sprites.
ScoreIf the sprite is of type Character Sprite this value determines the points you will receive when knocking it out.
If the sprite is of type Bonus Item Sprite this determines how many points you receive when picking it up.
Max speedThe maximum speed of your sprite.
0 = Not moving
4 = Normal speed
Max JumpThe duration of the jump.
Normal jump is around 20 to 25.
Reload timeHow long the sprite waits before shooting again, in frames.
This also affects the lifespan of projectiles/sprites.
Attack pauseIf the sprite is of type Ammo Sprite, this will determine the time between each attack.
EnemyDetermines if this sprite is an enemy.
BossDetermines if this sprite is a boss.
If a boss sprite is knocked out skull switches will rotate.
KeyDetermines if this sprite is a key or can open locks.
ObstacleDetermines if this sprite is a wall.

Example

Example

The red dot in the top left corner represent the Position X and Position Y properties.
The blue line at the bottom represents the Frame width propertie and the green line to the right the Frame height propertie.
The yellow rectangle in the middle represents the Sprite width and Sprite height properties.

These values are used to cut out the sprite's image, that you see in the game, from the image file.
Note: The rectangle actually starts at the x and y position 0 in the game.

Animation



Animation tab

The buttons at the top play each play their respective animation, if you click on them.
The Stop button stops the animation.

The Loop checkbox determines if your sprite's animation loops.

Each frame is separated by a comma and each number represents a frame.
Zero marks the end of an animation.

The Show frames button shows you all of the sprite's frames.
Note: Make sure that you have set the Frames propertie correctly. If you don't see all your sprite's frames, check the Frames propertie.

Note: The walking/flying animation for a flying sprite is actually the Duck animation.

Propertie:Explanation:
Frame rateThe duration of one animation frame, in game frames.
FramesThe number of your sprite's frames.
AnimationsThe number of animations. If you set all of them this value would be 9.
Attack 1 durationThe duration of the Attack 1 animation, in frames.
Attack 2 durationThe duration of the Attack 2 animation, in frames.

Sounds



Sounds tab

The Browse button opens a dialog, which lets you choose a file.
The Play buttons each play their respective sound.


Propertie:Explanation:
DamageThe sounds the sprite plays when it gets damaged.
Knock outThe sound the sprite plays when it gets knocked out.
Attack 1The sound of the first attack.
Attack 2The sound of the second attack.
RandomThis sound plays randomly.
Sound frequencyThe frequency of all the sound effects, of this sprite.
Random frequencyDetermines if sounds are played at random frequencies.

All sound files can have a maximum length of 100 characters, including the ".wav".

Other



Other tab

The Destruction propertie determines the graphical effects, that appear when the sprite is knocked out.
AI patterns determine the behavior of the sprite. (A full list explaining all patterns can be found here.)

Propertie: TODOExplanation:Max length:
Transformation spriteThe sprite this sprite turns into, when knocked out.100
Bonus SpriteThe sprite this sprite drops, when knocked out.100
Parallax factorRelation to background image
BonusesThe number of bonuses the sprite drops, when knocked out.
ShakesDetermines if the sprite shakes randomly.
Tile checkDetermines if the sprite can't walk/fly through walls.
SwimDetermines if the sprite can swim.
GlideDetermines if the sprite can glide down.
Always bonusDetermines if the sprite always drops its bonuses, when knocked out.
Wall upThe sprites works as a wall upwards.
Wall downThe sprites works as a wall downwards.
Wall leftThe sprites works as a wall to the left.
Wall rightThe sprites works as a wall to the right.

FAQ



AI patterns explained


(B) = AI affects Bonus Sprites
(P) = AI affects also when sprite is controlled by player

The following list is taken from the offical Sprite Spec., which can be found here.

No AIMarks the last AI.
ChickenSprite jumps randomly and tries to get over obstacles.
An EggSprite dies, if it hits the floor.
Baby ChickenSame as Chicken, but it tries to follow the player.
Bonus (B)
Jumper
Basic AI (B)Sprite won't get off the map and looks at the same direction it's walking.
Turn horizontallySprite turns horizontally if it hits an obstacle.
Looks Out for CliffsSprite turns horizontally before it falls down from a cliff.
Random Horizontal Change of DirectionSprite turns horizontally at random points.
Random JumpingSprite jumps randomly.
Follow the PlayerSprite follows the player even if it doesn't see it.
Random Horizontal Change of DirectionSprite turns horizontally at random points.
Follow the Player if Player is in FrontSprite follows the player only if it sees it.
Transformation If Energy Below 2 (P)Sprite changes to Transformation Sprite when it's energy drops below 2.
Transformation If Energy above 1 (P)Sprite changes to Transformation Sprite when it's energy rises over 1.
Start Directions Towards Player
Ammonition
Non StopSprite is not affected by friction.
Attack 1 If Damaged
Self Destruction
Attack 1 If Player is in Front
Attack 1 If Pleyer is Below
Damaged by Water (P)
Attack 2 If Player is in Front
Kill 'em allSprite damages both enemies and friends.
Affected by FrictionFriction slows the sprite down and stops it.
HideSprite ducks if it's behind tile 144.
Return to Start Position XAfter nothing better to do the sprite always tries to return to it's start position.
Return to Start Position YAfter nothing better to do the sprite always tries to return to it's start position.
Teleport
Throwable Weapon
Falls When Shaken (B)
Change Trap Stones If KO'ed
Change Trap Stones If Damaged
Self Destructs With Mother Sprite
Moves X COS
Moves Y COS
Moves X SIN
Moves Y SIN
Moves X COS Fast
Moves Y SIN Fast
Moves X COS Slow
Moves Y SIN Slow
Moves Y SIN Free
Random Turning
Jump If Player Is Above
Transformation Timer (B)
Falls If Switch 1 Is Pressed (B)
Falls If Switch 2 Is Pressed (B)
Falls If Switch 3 Is Pressed (B)
Moves Down If Switch 1 Is Pressed
Moves Up If Switch 1 Is Pressed
Moves Right If Switch 1 Is Pressed
Moves Left If Switch 1 Is Pressed
Moves Down If Switch 2 Is Pressed
Moves Up If Switch 2 Is Pressed
Moves Right If Switch 2 Is Pressed
Moves Left If Switch 2 Is Pressed
Moves Down If Switch 3 Is Pressed
Moves Up If Switch 3 Is Pressed
Moves Right If Switch 3 Is Pressed
Moves Left If Switch 3 Is Pressed
Turns Vertically From Obstacle
Random Vertical Starting Direction
Starting Direction Towards Player
ClimberSprite bounces from walls, floor and ceiling
Climber Type 2Sprite moves along walls (kind of)
Runs Away From Player If Sees Player
Reborn (B)A new item appears when sprite is collected
Arrow LeftThese set the direction of the sprite, if the sprite has AI "Move to Arrows Direction".
Arrow Righ
Arrow Up
Arrow Down
Move to Arrows Direction
Background Sprite Moon
Background Sprite Moves to Left
Background Sprite Moves to Right
Add Time to ClockAdd time from Reload time
Make Player InvisibleSet invicibility time from Reload time
Follow the Player Vertic. and Horiz.Sprite follows the player even if doesn't see it.
Follow the Player Vertic. and Horiz.
if Player is in FrontSprite follows the player only if sees it.
Random Move Vertic. and Horiz.
Frog Jump 1
Frog Jump 2
Frog Jump 3
Attack 2 if Damaged
Attack 1 Non Stop
Attack 2 Non Stop
Turn if Damaged
Evil One
Info 1use doodle attack to knock out enemys.
Info 2use egg attack to knock out enemys.
Info 3collect all keys to open all locks.
Info 4you can activate switches by jumping on them.
Info 5green switches activate green blocks.
Info 6blue switches activate blue blocks.
Info 7orange switches turn off fire.
Info 8collect gifts to obtain useful items.
Info 9if you are hit, feathers will give you energy.
Info 10a drink from a magic bottle will change you...
Info 11drink doodle drinks to and get special doodle attacks.
Info 12drink hatching-booster and get special egg attacks.
Info 13look for hidden bonuses!
Info 14you can stomp on enemys, but you will lose energy.
Info 15look out for traps!
Info 16hurry up! your time is limited!
Info 17be aware that some enemys resist certain attacks.
Info 18a hen is mightier than the sword.
Info 19why did the chicken cross the road?

My sprite doesn't show in game

First of all, make sure that the name of your sprite plus the ".spr" doesn't exceed a total of 13 characters.
If that is not the case, then check if you placed the sprites image file in the same folder as the sprite file itself.
If that also checks out, make sure that you have set the Position X/Y and Frame width/height correctly.