Skip to main content

A simple tile engine based on OpenGL

Project description

pytgl v3.0.4 - Python Tile Game Library

Simple implementation of a tile engine, including a physical and graphical engine based on OpenGL. The python package embbed the following functions:

  • render a tilemap from textures which are stored in the GPU memory
  • render of entities on the map
  • render a GUI over the map with mouse input detection
  • manage the collision between the entities and the level
  • manage the collision between two entities with an exact collision resolution (two entities never overlap)
  • a event pipeline for the collision and the external inputs

Requirement

Your GPU should support OpenGL 3.3.0 and GLSL 3.30 (unless you create custom shaders compatible with previous versions)

Installation

This package can be installed using pip install pytgl. It is also necessary to install the GLFW bindings which can be found on the GLFW website.

Windows

Download the GLFW bindings and unzip the archive. Put the glfw3.dll file from the lib-mingw folder in your project (it should be placed in the root folder).

macOS

Download the GLFW bindings and unzip the archive. Put the glfw3.dylib file from the lib-macos folder in your project (it should be placed in the root folder).

Linux

You can simply run sudo apt-get install libglfw3 libglfw3-dev but it might not support the lastest version of the glfw package. You can downgrade it using pip install --upgrade glfw version==1.7.0 to match the versions of the libraries.

If you want to run the on the lastest version of GLFW, you have to compile GLFW from sources using cmake.

Dependencies

The library requires the following packages (the latest stable versions should be used):

  • moderngl
  • glfw
  • numpy

Optional packages

Other usefull packages:

  • PyOpenGL-accelerate (deprecated since pytgl uses ModernGL)
  • imageio (library for reading and writing a wide range of image, video, scientific, and volumetric data formats)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytgl, version 3.0.4
Filename, size File type Python version Upload date Hashes
Filename, size pytgl-3.0.4-py3-none-any.whl (35.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pytgl-3.0.4.tar.gz (32.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page