Giter Site home page Giter Site logo

pygame-tiled-demo's Introduction

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.

pygame-tiled-demo's People

Stargazers

 avatar Артём Шакиров avatar Paul m. p. Peny avatar  avatar  avatar Maksim Gramin avatar Will Clifford avatar kaytruck avatar Angus H. avatar

Watchers

James Cloos avatar

pygame-tiled-demo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.