Skip to main content

Terminal-based graphical game engine

Project description

python Code style: black Checked with mypy linting: pylint

Termgame

Terminal-based graphical game engine

Created by Gregory Glatzer.

Installation

pip install termgame

Find it on PyPI here.

Features

  • Simple, easy-to-use API inspired by Unity.
  • Physics engine powered by Pymunk
  • Ability to read and render sprites from image files.
  • Framerate and physics timestep control.
  • Statically typed with mypy.
  • User input with keyboard.

Examples

To run the examples from the source code, first "build" the package by running pip install . from the root directory of the project (where setup.py is). Then, you can run any of the examples by running

python termgame/examples/<example_name>/game.py

Contributing

Contributions are welcome! Please open an issue or pull request if you have any suggestions or bug reports. The main branch is used for releases, so please open pull requests against the development branch.

Before Committing

Before committing, please run the following commands to ensure that your code is formatted correctly and passes all tests:

cd termgame
black src
mypy src
flake8 src --max-line-length=99
pylint src

Terminal settings to optimize rendering

{
    "terminal.integrated.fontSize": 8,
    "terminal.integrated.scrollback": 78,
    "terminal.integrated.gpuAcceleration": "on" // if you have a GPU, otherwise use "auto"
}

Upcoming Features

  • Decorator (@) for Gameobject events such as def walk() that pass in engine and frame to them so you don't have to.
  • Add support for 3D rendering.
    • Approach: Raycasting with pycaster, or Binary space partitioning (BSP)
  • Add support for importing 3D models.
    • Build wavefront files (obj) in Blender and import .obj files with pywavefront
  • Add support for sound effects and music.

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

termgame-0.0.3.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

termgame-0.0.3-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file termgame-0.0.3.tar.gz.

File metadata

  • Download URL: termgame-0.0.3.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for termgame-0.0.3.tar.gz
Algorithm Hash digest
SHA256 589a0e25ddb4398671ecd4fabb99c0c0ad8b548375e28c5192dd8d1e5e086cb2
MD5 456b918e4aeaea65f80e0184952910a5
BLAKE2b-256 48a819b80a687ad1416be32e8243a6b374ea4c7a62dcb48f30c6846510f9a182

See more details on using hashes here.

File details

Details for the file termgame-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: termgame-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for termgame-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bb70b5b9bb5e296e8f952c8dde1c5dd79e6557b7be9744e586a6abc6719169c2
MD5 78c6ae1829424862dfd6e43bc0a97720
BLAKE2b-256 b92ba87ceb80bbe9257e5767d08b9a3a3d81dd6280f9c8903b2575f1c20e87f7

See more details on using hashes here.

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