Skip to main content

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.

Metadata

Release files for termgame 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for termgame 0.0.4
File Size Uploaded
termgame-0.0.4.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for termgame 0.0.4
File Interpreter ABI Platform
termgame-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 27.9 kB

Release files / termgame-0.0.4.tar.gz

Download URL termgame-0.0.4.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
05489e168be52f348b01856e5fa8ef47d4b1d45bdddad54e54b7982c4d1186e0
BLAKE2b-256 checksum
How to use checksums
90208433259af8996adffdc5e68e379a29cc4a1f5723a04be15d6be2d137411a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release files / termgame-0.0.4-py3-none-any.whl

Download URL termgame-0.0.4-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0f4be43298306a782355a2ebe31f12d4d1321bedf37a738679b5826d2c7f1db
BLAKE2b-256 checksum
How to use checksums
c525bc279314619cca4603fb60630c5d50eda67e8ab849bf0400026d8b512102
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page