Skip to content

An object oriented demo of a platformer loading a map from the Tiled map editor using PyGame and PyTMX. Graphics from the HTML5 game "Biolab Disaster."

Notifications You must be signed in to change notification settings

katmfoo/pygame-tiled-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

PyGame and Tiled Platformer Demo

An object oriented demo of a platformer game loading a map from the Tiled Map Editor using PyGame and PyTMX. Graphics from the HTML5 game Biolab Disaster.

Running

Just download and run main.py, dependencies are Python 3.4, PyGame, and PyTMX.

Documentation

The basic structure of the game and how it loads the map is as follows..

  • A basic game class that has a list of level objects
  • The level objects are loaded with a TMX map file, using PyTMX
  • Levels contain a list of layer objects, one for each layer in the map
  • Each layer has a list of tiles, that is actually a PyGame sprite group

The tile objects are created in the initialiation of each layer. A player is added through the player class and collision is easily detected by checking the sprite collision of whatever layer your map uses for collision.

About

An object oriented demo of a platformer loading a map from the Tiled map editor using PyGame and PyTMX. Graphics from the HTML5 game "Biolab Disaster."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages