Metadata-Version: 2.1
Name: pyTGM
Version: 4.1.1
Summary: Terminal Game Maker
Home-page: https://github.com/TokynBlast/pyTGM
Author: Tokyn Blast
Author-email: tokynblast@gmail.com
License: Bspace
Keywords: game,game maker,terminal,tools,pytgm,terminal input
Platform: Windows
Platform: Linux
Platform: MacOS
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENCE.md

# Workflow Status
### Python
[![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>

### C++
[![C++ Linting](https://github.com/TokynBlast/pyTGM/actions/workflows/cpplint.yml/badge.svg)](https://github.com/TokynBlast/pyTGM/actions/workflows/cpplint.yml)


# 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.

To download pyTGM using pip, run ```pip install pyTGM```<br>
**THE NAME IS CASE-SENSETIVE**

It is **NOT** recommended that you download earlier than 4.1.0; Earlier than this, importing was untested!<br>
Amongst other things, all previous versions were built for windows only.<br>
4.1.0 fixes this.

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

v4.1.1



Warnings fix
------------
The warnings used to not show, if it caught an error
I fixed it, by adding a finally after the try and excepts


b64 and sha256
--------------
Originally, I had plans for adding sha256, but I eventually deleted it,
way back in v2. But now, I have added it, and I'm glad I waited to do it,
because I organized things a lot, and I've learned so much...


winsound
--------
Before this change, it would always check if you used windows, as soon
as you imported it, and every time you used it.
This won't last long though, I will soon be making sound a C++ function.
[More notes on C++ sound func when the change occurs]


Extra notes
-----------
v4.1.1 has a couple of changes, most of them are for organization,
to compensate for the adding or removing of functions.
It's somewhat to help prepare pyTGM, and it's users for v4.2.0

I've never used warnings before, before, I would make the change, and
then label it as a minor change, when removing it is a major breaking change.
But, now I know better, to look at what actualy changed, rather than how big
the changelog for the version is. I am also getting better at deciding
what's worth actually putting inside the changelog.

Also, v4.0.1 - v4.0.6 were released, because I didn't do what I do now;
Run the code on my computer and a VM, to make sure it works. So, most of
those versions worked with windows, and nothing else. On top of that,
v4.0.4 was a near exact copy of v4.0.3, and I couldn't reupload a file,
 under the same version, only delete it. So that led to some complications.
