A game engine made in python which uses text as its graphic interface instead of regular 2d shapes and sprites.
Project description
Text-Based-Game-Engine
A game engine made in python which uses text as its graphic interface instead of regular 2d shapes and sprites.
Features:
- Gameobjects made of multiple lines of text
- Movement of gameobjects eithe relative or globally
- Generation of each frame at any speed
- Gameobject flips and 90 degree rotations
- Deletion of game objects
- Deletion and replacemnt of individual characters in game objects
- Collision detection
Uses of Engine:
- Platforms which only allow for text input
- Simple python console games
Getting Started:
- Start by installing the project using pip install textgameengine
- To place your first object, run this code
import textgameengine
#The stage is the area where all the gameobjects will go
stage = Stage(8, 8, ".")
#Text Assets are the equivalent of sprite assets in other game engines
textasset = TextAsset("^-^\n/|\\\n-^-")
#Stage.place places the textasset on to the stage at the coordinates
gameobject = stage.place(textasset, 2, 2, 0)
#Stage.print rebuilds the scene with any changes made to the stage and then prints it
stage.print()
- Let's say we want to move him to the right by one spot!
- To move a gameobject, you would use this code
import textgameengine
#The stage is the area where all the gameobjects will go
stage = Stage(8, 8, ".")
#Text Assets are the equivalent of sprite assets in other game engines
textasset = TextAsset("^-^\n/|\\\n-^-")
#Stage.place places the textasset on to the stage at the coordinates
gameobject = stage.place(textasset, 2, 2, 0)
#Push moves the object relative to its position; In this case, it will move 1 unit to the right
gameobject.push(1, 0)
#Stage.print rebuilds the scene with any changes made to the stage and then prints it
stage.print()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
textgameengine-0.39.tar.gz
(6.0 kB
view details)
File details
Details for the file textgameengine-0.39.tar.gz
.
File metadata
- Download URL: textgameengine-0.39.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89e083391ce5a3dd6a947d1e98766cec534ef62cea13112b7615d78ec1d450a8 |
|
MD5 | 58bca7f4c7b2e95c88a675cc46df79e9 |
|
BLAKE2b-256 | 1f3042ed6f6ab17a23470374eebeea9aec265d4c88f57a1f39cf1cc224af0093 |