Pekka Kana 2
Official maintenance repository (formerly known as the "Greta engine" fork)

Pekka Kana 2 (Pekka the Rooster 2) is a 2D platformer game where you control a rooster, made in the spirit of classic platformers such as Super Mario, SuperTux, Jazz Jackrabbit, Super Frog and so on.
https://www.pistegamez.net/game_pk2.html
This repository contains the official source code, build scripts, and assets
for Pekka Kana 2, maintained by SaturninTheAlien with contributions
from the Piste Gamez community.
About this repository
This repository represents the current official continuation of Pekka Kana 2.
It preserves the original gameplay and content while allowing technical
improvements, ports, refactoring, and new features for creators and developers.
Project history
Our community
⚠️ Warning!
-
If you have photosensitive epilepsy, Pekka Kana 2 (including both vanilla and 3rd party content) may not be suitable for you.
The game may contain screen shaking, flashing lights, repetitive patterns, and motion effects that could trigger seizures.
Proceed at your own risk.
-
Pekka Kana 2 (including both vanilla and 3rd party content) contains content that some players may find disturbing, such as fantasy violence and other potentially sensitive elements. We are not responsible for any potential psychological distress caused by the game.
-
Pekka Kana 2 was created for entertainment and artistic purposes only. It is not intended to offend anyone.
Platform support
The game has been tested on:
- Windows
- GNU/Linux
- macOS (Apple Silicon)
Pekka Kana 2 can also be run on older Intel-based Macs
using the Windows portable version together with Wine.
This configuration is not officially tested or supported.
Binary distribution
See the Releases tab!
MS Windows binaries were compiled using MS Visual Studio Community 2022 on MS Windows 11,
so if there is any missing DLL file you perhaps need to install the latest Microsoft Visual C++ Redistributable:
https://aka.ms/vs/17/release/vc_redist.x64.exe
Steam
Coming soon!
Flatpak
Official Flatpak distribution is available on Flathub:
https://flathub.org/en/apps/net.pistegamez.PekkaKana2
Compiling
Begin by cloning the repository using Git:
git clone https://github.com/SaturninTheAlien/pk2_greta
Linux
To compile Pekka Kana 2 you need:
- C++ compiler (GCC or Clang)
- make
- pkg-config
- SDL2
- SDL2_image
- SDL2_mixer
- libzip
- Lua5.4 or newer
On Linux with "apt-get" package manager, you can install every dependency with a command:
sudo apt install build-essential libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libzip-dev liblua5.4-dev
Then run the "make" command inside the "Pekka Kana 2" directory.
make all
The PK2 binary will be in "bin/" directory, it can be run with:
./bin/pekka-kana-2
To make the removal, within the compiled directory, execute this command:
make clean
To update the game to the latest version:
git pull
make clean
make all
Parallel builds are supported and can significantly speed up compilation:
make -j$(nproc) all
macOS on Apple Silicon
Use Homebrew to install SDL2 packages:
brew install pkgconf sdl2 sdl2_gfx sdl2_image sdl2_mixer libzip lua
Clone the repository and build the project using make all.
The game can be run in the same way as on Linux:
./bin/pekka-kana-2
Debian package
To create a redistributable .deb package (which can be installed using APT), run:
docker build -t pk2-builder .
docker run --rm -it -v $(pwd):/pk2 pk2-builder /pk2/build_deb.sh
Windows
If you only want to build and run the game, using Windows Subsystem for Linux (WSL)
is recommended.
Support for NMake is planned to simplify building on Windows in the future.
Currently, compiling a native Windows executable (.exe) requires Microsoft Visual Studio and additional setup,
so it may be more complex and tedious than on other platforms
(e.g. creating a Visual Studio project and adding source files manually).
You will need the following libraries:
- SDL2
- SDL2_image
- SDL2_mixer
- libzip
- Lua 5.4
The following tutorial may be helpful:
https://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/msvc2019/index.php
You may also need to define the following preprocessor macros:
_CRT_SECURE_NO_WARNINGS
_USE_MATH_DEFINES
Level editor
The official level editor, sprite editor, and episode packer are available at:
https://github.com/SaturninTheAlien/PekaEDS_Java
These tools can be used to create custom levels (.map), sprite prototypes (.spr2),
and full game episodes.
User-made episodes
Community-created episodes are available here:
https://sites.google.com/view/pekka-kana-fanpage/pekka-kana-2/makyunis-mapstore
To install an episode, download the ZIP file and place it in the data/mapstore
directory.
Mapstore directory location
The location of the data directory (including mapstore) depends on how
Pekka Kana 2 is installed or run. This is expected behavior.
-
Source build (running from the repository):
res/data/mapstore
-
Windows (portable build):
data/mapstore
-
Windows (installer):
C:\Users\\AppData\Roaming\piste-gamez\pekka-kana-2\mapstore
-
Linux (installed package or sudo make install):
~/.local/share/piste-gamez/pekka-kana-2/mapstore
Advanced options
Commandline arguments
The game can be started with the "--dev" argument to enable the
cheats and "--test" followed by "episode_name/level_filename" to play/test a particular level.
This example starts the level13.map (the robot boss fight) on dev mode:
./pekka-kana-2 --dev --test "rooster island 2/level13.map"
Absolute paths to custom locations are also accepted, such as:
./pekka-kana-2 --test /home/saturnin/pk2_episodes/my_episode/my_level.map
Config.txt
Advanced configuration options can be found in data/config.txt.
This file is created automatically when the game is run for the first time.
Internal formats documentation
Documentation of internal file formats is available on Makyuni's fan page:
https://sites.google.com/view/pekka-kana-fanpage/pekka-kana-2/useful-lists
Development notes
- Translation of all the Finnish variable names and comments to English is planned.
Known bugs
- Sprites sometimes do not detect edges correctly near
BLOCK_BARRIER_DOWN
(legacy behavior).
Used libraries