# Workflow Status
[![Pylint](https://github.com/TokynBlast/pyTGM/actions/workflows/pylint.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/pylint.yml)<br>
[![Lint with Isort](https://github.com/TokynBlast/pyTGM/actions/workflows/Isort.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/Isort.yml)<br>
[![Safety Linting](https://github.com/TokynBlast/pyTGM/actions/workflows/Saftey.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/Saftey.yml)<br>
[![SHA256 Generate and Update](https://github.com/TokynBlast/pyTGM/actions/workflows/generate-sha3-hashes.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/generate-sha3-hashes.yml)<br>
![Static Badge](https://img.shields.io/badge/C%2B%2B%20Linting-passing-lime_green)
C++ Linting isnt Github made, because I look for certain errors, and report back to here if it worked or not.<br>
Clang Tidy doesn't know how it should work.
## Installing
To install, run ```pip install pyTGM```<br>
You may need Python3-dev.
You need Microsoft Visual Studio<br>
When setting up Python, enable these:
- Add Python to PATH
- Customize installation > Development Tools
On macOS, you will need homebrew to install Python:<br>
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Then, run<br>
```
brew install python
```
On Linux, your OS will change the command you need to run:<br>
Debian/Ubuntu:
```
sudo apt-get update; sudo apt-get install -y python3-dev
```
Fedora:
```
sudo dnf install -y python3-devel
```
Arch linux:
```
sudo pacman -S python
```
Dont know what OS you have?
Run this command:
```
bash -c 'if command -v apt-get >/dev/null; then sudo apt-get update && sudo apt-get install -y python3-dev; elif command -v dnf >/dev/null; then sudo dnf install -y python3-devel; elif command -v pacman >/dev/null; then sudo pacman -Sy python; elif command -v zypper >/dev/null; then sudo zypper install -y python3-devel; else echo "Unsupported package manager. Install Python dev headers manually."; exit 1; fi'
```
# pyTGM (Python Terminal Game Maker)
pyTGM is a simplified alternative to Pygame, focusing on ASCII and ANSI based game development, contained completley within the terminal,<br>
with utilities for encryption, markup, mouse input, and much more.
It is **MOST** reccomended, that you download the latest version!
## Bugs and Features
To report a bug, go [here](https://github.com/TokynBlast/pyTGM/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=)<br>
For feature request, go [here](https://github.com/TokynBlast/pyTGM/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=)
## Contributing
All contributions are greatly appreciated.<br>
To make a contribution, make a new branch [here](https://github.com/TokynBlast/pyTGM/branches)<br>
Then, add (or remove), to improve the repo!<br>
Once we know it's working and safe, somebody will merge the request!
## Features
### File Operations
```python
file.fm_line(name) # Modify a line of a file
```
### Graphics and Text Styling
```python
# 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 coordinates
graphics.pos()
```
### Sound Support
Works across Windows, macOS, and Linux:
```python
# Play audio file
psound('../sounds/mysound.mp3')
```
### Local Server Support
```python
# Starting a server and client (PORT, message)
LocalServer(1080, {'MarkTheMighty':((243,332), 57)})
```
An example of a returned value would be:
```python
{'LordMinion777':((0,0), 100), 'Muyskerm':((245,334), 43)}
```
### Terminal Input Detection
```python
# Mouse Click Detection
terd.click() # A return value of (-1, -1) means the click was invalid!
# Keyboard Press Detection
terd.geky(times)
```
### Encryption
```python
# Set the table
b64.Table.table = 'ABCDEF...XYZ...12...90...!@..._+'
b64.Table.generate('ABCDEF...XYZ...12...90...!@..._+', 32) # (table: str, times: int)
# 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 for security.
## Links
- [Homepage](https://pytgm.tokynblast.space/home)
- [Documentation](https://pytgm.tokynblast.space/documentation/use)
- [Source Code](https://github.com/TokynBlast/pyTGM/tree/main)
- [Bug Tracker](https://github.com/TokynBlast/pyTGM/issues)
- [Changelog](https://github.com/TokynBlast/pyTGM/blob/main/CHANGELOG.txt)
## 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 (Decmeber 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
4.0.5 (Decmeber 17, 2024)
-------------------------
- Added back click
4.0.6 (Decmeber 17, 2024)
-------------------------
- Added windows implementation of click
- Fixed pybind11 missing module for pylint
- Added C++ linting
4.1.0 (December 18, 2024)
-------------------------
- Added *.txt to manifest.in
- Added C++ badge to github
- Updated licence
- Fixed click bugs for windows
- Distributed .tar.gz, instead of a .whl
- Removed sound.generate()
- Changed sound.play() to psound()
- Changed mod_line() to fm_line()
- Placed dummy functions for removed functions, that serve warnings
4.1.1 (December 19, 2024)
-------------------------
- Fixed README.md
- Forced warnings to occur
- Added clarity to warnings
- Moved b64 to encrypt
- Added sha256
- Changed psound importing
4.1.2 (December th, 2024)
-------------------------
- Changed some Python files to C++
- Changed file_mod to Python
- Bug fixes
Conversion to C++
-----------------
This was done for both speed, and to help me learn C++, for future projects and updates.
This change will occur to almost every file in pyTGM, slowly over time.
Some may stay the same for a while, untill my skill base for C++ is large enough,
to change everything to C++
file_mod Conversion to Python
-----------------------------
This happened, because as a C++ file, it was returning errors, that I wasn't capable of decoding,
with my little knowledge of C++
psound
------
psound is now a C++ function.
It now determines the OS, and decides which command to run.
Rather than using a dependency, it uses something that each OS comes with for C++
Extra notes
-----------
v4.1.2 has the shortest change list... of ACTUAL updates. Some previous versions
were an attempt to fix an import error, because I accidentally released an
untested version. Now, I test the versions before release. And, the user base for pyTGM has been growing.
Currently, at the time of release, there are 41 known users.
The biggest bug I know of so far is that terd.click() detects all over the screen, rather than just characters inside the terminal.
pyTGM is shaping up to be of some pretty good quality.
Raw data
{
"_id": null,
"home_page": "https://github.com/TokynBlast/pyTGM",
"name": "pyTGM",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "game, game maker, terminal, tools, pytgm, terminal input",
"author": "Tokyn Blast",
"author_email": "tokynblast@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/99/c4/0dd07fefea7a240cf769e7a176de3ce4ca35859bccbbb141f6626a3becac/pytgm-4.1.2.tar.gz",
"platform": "Windows",
"description": "# Workflow Status\r\n[![Pylint](https://github.com/TokynBlast/pyTGM/actions/workflows/pylint.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/pylint.yml)<br>\r\n[![Lint with Isort](https://github.com/TokynBlast/pyTGM/actions/workflows/Isort.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/Isort.yml)<br>\r\n[![Safety Linting](https://github.com/TokynBlast/pyTGM/actions/workflows/Saftey.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/Saftey.yml)<br>\r\n[![SHA256 Generate and Update](https://github.com/TokynBlast/pyTGM/actions/workflows/generate-sha3-hashes.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/generate-sha3-hashes.yml)<br>\r\n![Static Badge](https://img.shields.io/badge/C%2B%2B%20Linting-passing-lime_green)\r\n\r\n\r\n\r\nC++ Linting isnt Github made, because I look for certain errors, and report back to here if it worked or not.<br>\r\nClang Tidy doesn't know how it should work.\r\n\r\n## Installing\r\nTo install, run ```pip install pyTGM```<br>\r\nYou may need Python3-dev.\r\nYou need Microsoft Visual Studio<br>\r\nWhen setting up Python, enable these:\r\n- Add Python to PATH\r\n- Customize installation > Development Tools\r\n\r\nOn macOS, you will need homebrew to install Python:<br>\r\n```\r\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\r\n```\r\nThen, run<br>\r\n```\r\nbrew install python\r\n```\r\n\r\nOn Linux, your OS will change the command you need to run:<br>\r\nDebian/Ubuntu:\r\n```\r\nsudo apt-get update; sudo apt-get install -y python3-dev\r\n```\r\n\r\nFedora:\r\n```\r\nsudo dnf install -y python3-devel\r\n```\r\n\r\nArch linux:\r\n```\r\nsudo pacman -S python\r\n```\r\n\r\nDont know what OS you have?\r\nRun this command:\r\n```\r\nbash -c 'if command -v apt-get >/dev/null; then sudo apt-get update && sudo apt-get install -y python3-dev; elif command -v dnf >/dev/null; then sudo dnf install -y python3-devel; elif command -v pacman >/dev/null; then sudo pacman -Sy python; elif command -v zypper >/dev/null; then sudo zypper install -y python3-devel; else echo \"Unsupported package manager. Install Python dev headers manually.\"; exit 1; fi'\r\n```\r\n\r\n# pyTGM (Python Terminal Game Maker)\r\n\r\npyTGM is a simplified alternative to Pygame, focusing on ASCII and ANSI based game development, contained completley within the terminal,<br>\r\nwith utilities for encryption, markup, mouse input, and much more.\r\n\r\nIt is **MOST** reccomended, that you download the latest version!\r\n\r\n## Bugs and Features\r\nTo report a bug, go [here](https://github.com/TokynBlast/pyTGM/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=)<br>\r\nFor feature request, go [here](https://github.com/TokynBlast/pyTGM/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=)\r\n\r\n## Contributing\r\nAll contributions are greatly appreciated.<br>\r\nTo make a contribution, make a new branch [here](https://github.com/TokynBlast/pyTGM/branches)<br>\r\nThen, add (or remove), to improve the repo!<br>\r\nOnce we know it's working and safe, somebody will merge the request!\r\n\r\n## Features\r\n\r\n### File Operations\r\n```python\r\nfile.fm_line(name) # Modify a line of a file\r\n```\r\n\r\n### Graphics and Text Styling\r\n```python\r\n# Clear screen\r\ngraphics.cls()\r\n\r\n# Color text (RGB)\r\ngraphics.color(0, 255, 0) # Green text\r\ngraphics.RESET # Reset color\r\n\r\n# Markup\r\ngraphics.BOLD\r\ngraphics.ITALIC\r\ngraphics.UNDERLINE\r\n\r\n# Placing the cursor at a pair of coordinates\r\ngraphics.pos()\r\n```\r\n\r\n\r\n### Sound Support\r\nWorks across Windows, macOS, and Linux:\r\n```python\r\n# Play audio file\r\npsound('../sounds/mysound.mp3')\r\n```\r\n\r\n### Local Server Support\r\n```python\r\n# Starting a server and client (PORT, message)\r\nLocalServer(1080, {'MarkTheMighty':((243,332), 57)})\r\n```\r\nAn example of a returned value would be:\r\n```python\r\n{'LordMinion777':((0,0), 100), 'Muyskerm':((245,334), 43)}\r\n```\r\n\r\n### Terminal Input Detection\r\n```python\r\n# Mouse Click Detection\r\nterd.click() # A return value of (-1, -1) means the click was invalid!\r\n\r\n# Keyboard Press Detection\r\nterd.geky(times)\r\n```\r\n\r\n### Encryption\r\n```python\r\n# Set the table\r\nb64.Table.table = 'ABCDEF...XYZ...12...90...!@..._+'\r\nb64.Table.generate('ABCDEF...XYZ...12...90...!@..._+', 32) # (table: str, times: int)\r\n\r\n# Encode and decode\r\nb64.encode(text)\r\nb64.decode(text)\r\n```\r\nWhen setting the table, it MUST include the characters that are being stored at the very least!\r\nExtra characters are suggested for security.\r\n\r\n## Links\r\n- [Homepage](https://pytgm.tokynblast.space/home)\r\n- [Documentation](https://pytgm.tokynblast.space/documentation/use)\r\n- [Source Code](https://github.com/TokynBlast/pyTGM/tree/main)\r\n- [Bug Tracker](https://github.com/TokynBlast/pyTGM/issues)\r\n- [Changelog](https://github.com/TokynBlast/pyTGM/blob/main/CHANGELOG.txt)\r\n\r\n## License\r\npyTGM is licensed under Bspace, created by Tokyn Blast.\r\n\r\n\r\n4.0.0 (December 17, 2024)\r\n-------------------------\r\n- Removed file.readChar\r\n- Major fixes to __all__ variable in main __init__\r\n- Did an overhaul on Licence and README.md\r\n- major change in file structure\r\n- Renamed getch to geky\r\n- Put getch inside class \"terd\"\r\n- Added a click detection function\r\n- Updated and fixed __all__\r\n- Added __init__.py for an entry point\r\n- Moved __all__ and links to __init__.py\r\n- Made functions satic methods\r\n- Changed how random works\r\n- Updated LocalServer error message\r\n- Added a To_send variable to LocalServer\r\n- Removed autoplay from frequency\r\n- Fixed windows key detection\r\n- Removed board and random\r\n- Added security hashes\r\n- Added badges to README.md\r\n\r\n4.0.1 (Decmeber 17, 2024)\r\n-------------------------\r\n- Import fixes\r\n\r\n4.0.2 (December 17, 2024)\r\n-------------------------\r\n- Click removed temporarily\r\n- Updated build in version\r\n\r\n4.0.4 (December 17, 2024)\r\n-------------------------\r\n- Import fixes\r\n- Replaced 4.0.3, as it is the same\r\n\r\n4.0.5 (Decmeber 17, 2024)\r\n-------------------------\r\n- Added back click\r\n\r\n4.0.6 (Decmeber 17, 2024)\r\n-------------------------\r\n- Added windows implementation of click\r\n- Fixed pybind11 missing module for pylint\r\n- Added C++ linting\r\n\r\n4.1.0 (December 18, 2024)\r\n-------------------------\r\n- Added *.txt to manifest.in\r\n- Added C++ badge to github \r\n- Updated licence\r\n- Fixed click bugs for windows\r\n- Distributed .tar.gz, instead of a .whl\r\n- Removed sound.generate()\r\n- Changed sound.play() to psound()\r\n- Changed mod_line() to fm_line()\r\n- Placed dummy functions for removed functions, that serve warnings\r\n\r\n4.1.1 (December 19, 2024)\r\n-------------------------\r\n- Fixed README.md\r\n- Forced warnings to occur\r\n- Added clarity to warnings\r\n- Moved b64 to encrypt\r\n- Added sha256\r\n- Changed psound importing\r\n\r\n4.1.2 (December th, 2024)\r\n-------------------------\r\n- Changed some Python files to C++\r\n- Changed file_mod to Python\r\n- Bug fixes\r\n\r\n\r\n\r\n\r\n\r\n\r\nConversion to C++\r\n-----------------\r\nThis was done for both speed, and to help me learn C++, for future projects and updates.\r\nThis change will occur to almost every file in pyTGM, slowly over time.\r\nSome may stay the same for a while, untill my skill base for C++ is large enough,\r\nto change everything to C++\r\n\r\n\r\nfile_mod Conversion to Python\r\n-----------------------------\r\nThis happened, because as a C++ file, it was returning errors, that I wasn't capable of decoding,\r\nwith my little knowledge of C++\r\n\r\n\r\npsound\r\n------\r\npsound is now a C++ function.\r\nIt now determines the OS, and decides which command to run.\r\nRather than using a dependency, it uses something that each OS comes with for C++\r\n\r\n\r\nExtra notes\r\n-----------\r\nv4.1.2 has the shortest change list... of ACTUAL updates. Some previous versions\r\nwere an attempt to fix an import error, because I accidentally released an\r\nuntested version. Now, I test the versions before release. And, the user base for pyTGM has been growing.\r\nCurrently, at the time of release, there are 41 known users.\r\nThe biggest bug I know of so far is that terd.click() detects all over the screen, rather than just characters inside the terminal.\r\npyTGM is shaping up to be of some pretty good quality.\r\n",
"bugtrack_url": null,
"license": "Bspace",
"summary": "Terminal Game Maker",
"version": "4.1.2",
"project_urls": {
"Homepage": "https://github.com/TokynBlast/pyTGM"
},
"split_keywords": [
"game",
" game maker",
" terminal",
" tools",
" pytgm",
" terminal input"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "99c40dd07fefea7a240cf769e7a176de3ce4ca35859bccbbb141f6626a3becac",
"md5": "d14685ceb4cadbba200df66d761a4dcf",
"sha256": "f27f4172ab374e420fe6a02975ed531a0825d3abca504f9058b659fcb1bef2b0"
},
"downloads": -1,
"filename": "pytgm-4.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d14685ceb4cadbba200df66d761a4dcf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 17267,
"upload_time": "2025-01-07T03:11:15",
"upload_time_iso_8601": "2025-01-07T03:11:15.123151Z",
"url": "https://files.pythonhosted.org/packages/99/c4/0dd07fefea7a240cf769e7a176de3ce4ca35859bccbbb141f6626a3becac/pytgm-4.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-07 03:11:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TokynBlast",
"github_project": "pyTGM",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pytgm"
}