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)

[!NOTE] There was an accidental deletion of the original pyTGM library. This is an updated version of the newest version I had on hand.

This note will be deleted in the next version.

[!NOTE] This will be uploaded to PyPi soon.

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

  • Removed file.readChar
  • Changed choose into a function, rather than a class
  • 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
  • Added "frequency_big" for longer frequency times
  • Fixed windows key detection
  • Changed "Board" to "board"
  • Changed "f_value" to "function" and "player" to "component" in board
  • Added security hashes
  • Added badges to README.md

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.0.tar.gz (11.9 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.0-cp313-cp313-win_amd64.whl (16.4 kB view details)

Uploaded CPython 3.13Windows x86-64

File details

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

File metadata

  • Download URL: pytgm-4.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 8caad101537b1a713d758db2e25a83954e073ef6fc071fd0dfb9e4fa7844f253
MD5 5b71feb340f01f207ff3d2ed855329f5
BLAKE2b-256 72d92095f8490e8dec102529be6a6b9c83a4ad533f13cfbfde968fedf9c80eb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyTGM-4.0.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 16.4 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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 db84b8489487b26b82d71af733c7aa5d8b3128585ea96daf8d76d8c02ca598bf
MD5 fd0fff913c40960b40095d4b240f43ec
BLAKE2b-256 0ce4a579c9c1b2b7c7e133371d4b10d9635154b33df5fd94dbfc9811508a0f6d

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