tegen 0.0

Creator: bradpython12

Last updated:

0 purchases

TODO
Add to Cart

Description:

tegen 0.0

tegen











Terminal game engine for Python, made by 7d
Latest release version: v0.0 (29/8/21)
Changelogs: https://tegen.readthedocs.io/en/latest/changelog.html
Documentation: https://tegen.readthedocs.io/en/latest/

Why 'Tegen'?
Terminal Game Engine
Usage
import tegen
from blessed.keyboard import Keystroke

game = tegen.Game()
scene = tegen.Scene()

class GameObj(tegen.objects.Sprite):
direction = 1

def on_keyboard_press(self, g: tegen.Game, key: Keystroke):
if key == "a":
self.x += 1

class GameText(tegen.objects.Text):
def on_keyboard_press(self, g: tegen.Game, key: Keystroke):
self.text += key
if key == 'q':
g.end()

scene.add_object(GameObj(), "obj", 0, 0)
scene.add_object(GameText("", back="ffa500"), "key", 0, 4)

try:
game.start(info_wait=1)
game.add_keyboard_listener()
game.load_scene(scene)
except Exception:
game.handle_error()

Example tictactoe game

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.