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.4.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: termgame-0.0.4.tar.gz
  • Upload date:
  • Size: 13.1 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.4.tar.gz
Algorithm Hash digest
SHA256 05489e168be52f348b01856e5fa8ef47d4b1d45bdddad54e54b7982c4d1186e0
MD5 980bf61cb54f1d06f7bbeaff50998a36
BLAKE2b-256 90208433259af8996adffdc5e68e379a29cc4a1f5723a04be15d6be2d137411a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: termgame-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c0f4be43298306a782355a2ebe31f12d4d1321bedf37a738679b5826d2c7f1db
MD5 dcd4f456b26e3d5b00f5d7d6a546dbbe
BLAKE2b-256 c525bc279314619cca4603fb60630c5d50eda67e8ab849bf0400026d8b512102

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