Skip to main content

Terminal Game Maker

Project description

Workflow Status

Linting

Pylint
Lint with Isort

Security

Safety Linting
SHA3-256 Generate and Update

pyTGM (Python Terminal Game Maker)

pyTGM is a simplified alternative to Pygame, focusing on ASCII and ANSI based game development, with utilities for encryption, randomization, markup, and more.

Bugs and Features

To report a bug, go here
For feature request, go here

Contributing

All contributions are greatly appreciated.
To make a contribution, make a new branch here
Then, add (or remove), to improve the repo!
Then, somebody will check to make sure it complys with all the workflows. Once we know it's working, we will merge the request!

If your modified code doesn't comply with Saftey linting, it will be immediatley denied. For security reasons, if the repo needs to be tested outside github, it will be tested on a VM. Code will also be checked manually.

Features

File Operations

file.mod_line(name)           # Modify a line of a file
file.read_line(name, line=0)  # Read specific line

Graphics and Text Styling

# Clear screen
graphics.cls()

# Color text (RGB)
graphics.color(0, 255, 0)  # Green text
graphics.RESET             # Reset color

# Markup
graphics.BOLD
graphics.ITALIC
graphics.UNDERLINE

# Placing the cursor at a pair of coords

Sound Support

Works across Windows, macOS, and Linux:

# Play audio file
play('../sounds/mysound.mp3')

# Make a file of a frequency
generate(frequency, duration, name, sample_rate=44100, volume=0.5)

Local Server Support

# Starting a server and client (PORT, message)
LocalServer(1080, {'MarkTheMighty':((243,332), 57)})

An example of a returned value would be:

{'LordMinion777':((0,0), 100), 'Muyskerm':((245,334), 43)}

Terminal Input Detection

# Mouse Click Detection
terd.click()             # A return value of (-1, -1) means the click was invalid!

# Keyboard Press Detection
terd.geky(times)

Encryption

# Set the table
b64.Table.table = 'ABCDEF...XYZ...12...90...!@..._+'
b64.Table.generate('ABCDEF...XYZ...12...90...!@..._+', 32)

# Encode and decode
b64.encode(text)
b64.decode(text)

When setting the table, it MUST include the characters that are being stored at the very least! Extra characters are suggested

Links

License

pyTGM is licensed under Bspace, created by Tokyn Blast.

4.0.0 (December 17, 2024)

  • Removed file.readChar
  • Major fixes to all variable in main init
  • Did an overhaul on Licence and README.md
  • major change in file structure
  • Renamed getch to geky
  • Put getch inside class "terd"
  • Added a click detection function
  • Updated and fixed all
  • Added init.py for an entry point
  • Moved all and links to init.py
  • Made functions satic methods
  • Changed how random works
  • Updated LocalServer error message
  • Added a To_send variable to LocalServer
  • Removed autoplay from frequency
  • Fixed windows key detection
  • Removed board and random
  • Added security hashes
  • Added badges to README.md

4.0.1 (December 17, 2024)

  • Import fixes

4.0.2 (December 17, 2024)

  • Click removed temporarily
  • Updated build in version

4.0.4 (December 17, 2024)

  • Import fixes
  • Replaced 4.0.3, as it is the same

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

pytgm-4.0.4.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyTGM-4.0.4-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file pytgm-4.0.4.tar.gz.

File metadata

  • Download URL: pytgm-4.0.4.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for pytgm-4.0.4.tar.gz
Algorithm Hash digest
SHA256 34667c80601b996fe11189a8f3bd979aacfc668a95e7ae78cccd9b9aaa19fb74
MD5 32c2d36022d3ed9a01ca67723c8d533d
BLAKE2b-256 dd37e2fe423bafc197930d19a8d9fc66fa0f4e45e75793175d7c5529207f744d

See more details on using hashes here.

File details

Details for the file pyTGM-4.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyTGM-4.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for pyTGM-4.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bbee0da76e375ee7ae475593664ac0728bf57763844a325c6b11ecb86cee6e4d
MD5 d33e42ad9a93f212a9f5466e9f6b4fa2
BLAKE2b-256 ee034fee3ebbcfbf3e01d07db57cc6e08abb22fa357c82a9607e6c068bc6da36

See more details on using hashes here.

Supported by

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