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)

  • Imoprt fixes

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

Uploaded Source

Built Distributions

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

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

Uploaded Python 3

pyTGM-4.0.1-cp313-cp313-win_amd64.whl (17.2 kB view details)

Uploaded CPython 3.13Windows x86-64

File details

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

File metadata

  • Download URL: pytgm-4.0.1.tar.gz
  • Upload date:
  • Size: 11.9 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.1.tar.gz
Algorithm Hash digest
SHA256 96f5bdabf2bd3ab642c597ca522431db6a87f1ae26767cec34793c01eea2a451
MD5 861e83b4e232bde0ce4b6fb129921d7c
BLAKE2b-256 32d914f703a63a828e35aa34462d54c1500288ccdf611df0c9f7847c6fddd229

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyTGM-4.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5893706532138de3d7d8ba3c01ba5f674890b88ea50ddc941e015233e0860cd2
MD5 9fa82fa6c92bb1b7ee45f4b8ee7c93ab
BLAKE2b-256 ed1c8bd04f50c67fba0cfc90aab0a1c9b29557e3a426f2e41f9dfd49a89d548f

See more details on using hashes here.

File details

Details for the file pyTGM-4.0.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyTGM-4.0.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for pyTGM-4.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9994056ac59477d500f94a820fa2134ca8bce5f8933285c6af10a2207adb54aa
MD5 d6df4db6df98d6a88b2bd0975bc53cb1
BLAKE2b-256 0b75590c5708ed5dae6bab45906a40c00a121655c1c49bae0494ebfa48d47d9f

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