Terminal-based graphical game engine
Project description
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)
- Approach: Raycasting with
- Add support for importing 3D models.
- Build wavefront files (obj) in Blender and import .obj files with
pywavefront
- Build wavefront files (obj) in Blender and import .obj files with
- 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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 589a0e25ddb4398671ecd4fabb99c0c0ad8b548375e28c5192dd8d1e5e086cb2 |
|
MD5 | 456b918e4aeaea65f80e0184952910a5 |
|
BLAKE2b-256 | 48a819b80a687ad1416be32e8243a6b374ea4c7a62dcb48f30c6846510f9a182 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb70b5b9bb5e296e8f952c8dde1c5dd79e6557b7be9744e586a6abc6719169c2 |
|
MD5 | 78c6ae1829424862dfd6e43bc0a97720 |
|
BLAKE2b-256 | b92ba87ceb80bbe9257e5767d08b9a3a3d81dd6280f9c8903b2575f1c20e87f7 |