Skip to main content

Python bindings for ASGE

Project description

PyASGE - Python Bindings for ASGE

CI status
docs Docs Actions Status
conda.recipe Conda Actions Status
pip builds Pip Actions Status
cibuildwheel Wheels Actions Status

A pybind11 module designed to work with the ASGE game engine and built with a CMake-based build system. ASGE is a simple 2D game framework designed to allow rapid prototyping of games. It provides the minimum of fuss when it comes to creating windows and moving sprites around the virtual game-world. Though it had humble beginnings, it's evolved to support a number of additional features over the years.

Prerequisites

On Unix (Linux, OS X)

  • A compiler with C++17 support
  • CMake >= 3.14 or Pip 10+
  • Ninja or Pip 10+

Mac OSX support is working, but not fully tested due to lack of hardware access.

Linux Build Dependencies

  • X11
  • brotli
  • bz2
  • harfbuzz
  • libpng
  • zlib

On Windows

  • Visual Studio 2015 or newer (required for all Python versions, see notes below)
  • CMake >= 3.14 or Pip 10+

Installation

Just clone this repository and pip install. Note the --recursive option which is needed for the pybind11 submodule:

git clone --recursive https://github.com/HuxyUK/pyasge.git
pip install ./pyasge

With the setup.py file included in this example, the pip install command will invoke CMake and build the module as specified in CMakeLists.txt.

Special notes for Windows

Compiler requirements

Pybind11 requires a C++11 compliant compiler, i.e Visual Studio 2015 on Windows. Unlike regular C extension modules, it's perfectly fine to compile a pybind11 module with a VS version newer than the target Python's VS version. See the FAQ for more details.

Runtime requirements

The Visual C++ 2015 redistributable packages are a runtime requirement for this project. It can be found here.

Building the documentation

Documentation for the example project is generated using Sphinx. Sphinx has the ability to automatically inspect the signatures and documentation strings in the extension module to generate beautiful documentation in a variety formats. The following command generates HTML-based reference documentation; for other formats please refer to the Sphinx manual:

  • cmake -G Ninja -H. -DASGE_BUILD_DEMOS=OFF -DASGE_ENABLE_DOXYGEN=OFF -Bbuild -DCMAKE_BUILD_TYPE=Release
  • cmake --build build --config Release -t pyasge_docs

The files will be output to the build/docs/html folder.

License

PyASGE is provided under a MIT License that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.

Test call

import pyasge
pyasge.INFO("Tis a good day to make a GAME!")
pyasge.ERROR("Oh noooes")

Project details


Download files

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

Source Distribution

pyasge-2.0.0.tar.gz (4.8 MB view hashes)

Uploaded Source

Built Distributions

pyasge-2.0.0-cp310-cp310-win_amd64.whl (960.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyasge-2.0.0-cp310-cp310-win32.whl (839.4 kB view hashes)

Uploaded CPython 3.10 Windows x86

pyasge-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyasge-2.0.0-cp310-cp310-macosx_10_15_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

pyasge-2.0.0-cp39-cp39-win_amd64.whl (944.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyasge-2.0.0-cp39-cp39-win32.whl (839.5 kB view hashes)

Uploaded CPython 3.9 Windows x86

pyasge-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyasge-2.0.0-cp39-cp39-macosx_10_15_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

pyasge-2.0.0-cp38-cp38-win_amd64.whl (960.6 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyasge-2.0.0-cp38-cp38-win32.whl (839.6 kB view hashes)

Uploaded CPython 3.8 Windows x86

pyasge-2.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pyasge-2.0.0-cp38-cp38-macosx_10_15_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

pyasge-2.0.0-cp37-cp37m-win_amd64.whl (956.6 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

pyasge-2.0.0-cp37-cp37m-win32.whl (842.5 kB view hashes)

Uploaded CPython 3.7m Windows x86

pyasge-2.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.2 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

pyasge-2.0.0-cp37-cp37m-macosx_10_15_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

pyasge-2.0.0-cp36-cp36m-win_amd64.whl (956.7 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

pyasge-2.0.0-cp36-cp36m-win32.whl (842.8 kB view hashes)

Uploaded CPython 3.6m Windows x86

pyasge-2.0.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.2 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

pyasge-2.0.0-cp36-cp36m-macosx_10_15_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.6m macOS 10.15+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page