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 ()

  • Imoprt fixes

4.0.2 ()

  • Click removed temporarily
  • Updated build in version

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.2.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.2-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytgm-4.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d21cb1ccf1c14ac5a091303924380faf3f2725b7193d3629c620dc96338792fd
MD5 323fa94a464dad5ab0d2f9b6a5a78495
BLAKE2b-256 0755f32a1ddc81027c64bc55003b648b5d375e7bc7add5cfa33abad7b2ab4654

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyTGM-4.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a3ef40e00408589aa0ef2a787ced0ce4b2fb684db6deadad8e4a12baf1278f0
MD5 abd34754c27e383c21e26a247044f239
BLAKE2b-256 4ede5e087f00eddd5c311a75998095660546ed98ef042dcf51ec81318aea93a9

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