Tilengine platformer in python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
lib
.gitattributes
.gitignore
.travis.yml
LICENSE
README.md
Tilengine.dll
platformer.py
screenshot.png
sound.py
tilengine.py

README.md

Tilengine python platformer

This project aims to teach actual game mechanics using the free, cross-platform Tilengine retro graphics engine under python. screenshot

Features

The features implemented so far are:

  • Two layer parallax scrolling
  • Sprite and tileset animations
  • Raster effects for sky gradient color, cloud motion, sea water linescroll and hills movement on a single background layer
  • Basic list of game entities (actors)
  • Three character states: idle, running and jumping
  • Tileset attributes in Tiled editor: type and priority
  • Player/level interaction: the player can jump on platforms, get blocked by walls and pick gems
  • Inertial control and acceleration
  • Slopes
  • Active game entities management
  • Define game entities (enemies, etc) inside tmx object layer and load into a list
  • Enemy behavior and spawn active enemies from loaded entities list
  • Enemies can hurt player and make it bounce
  • Basic sound effects with SDL_Mixer library

Prerequisites

This project depends on three external components:

Tilengine

http://www.tilengine.org

Python binding and Windows 64-bit dll are already included. If you're using another platform, please install it from github and follow its instructions.

SDL2 and SDL2_Mixer

https://www.libsdl.org/

SDL2 (Simple DirectMedia Layer) is an open-source, cross-platform library for managing windows, user input, graphics and sound. Both tilengine and this project use SDL2 internally. You must install the runtime binaries into your system.

Windows and OSX:

Download prebuilt binaries here:

https://www.libsdl.org/download-2.0.php

https://www.libsdl.org/projects/SDL_mixer/

Debian-based linux:

Open a terminal window and install directly from package manager:

sudo apt install libsdl2-dev libsdl2-mixer-dev

SDL2 python binding

http://pysdl2.readthedocs.io

You must also install the binding for using SDL2 from python language. From a terminal window type the following command:

pip install pysdl2

Acknowledge

Graphic assets are copyrighted and owned by their original authors