TUI-based game engine
Project description
kikan
TUI-based game engine in Python. Use this little thing to make awesome games right into your terminal.
Installation
All you need to do is install this module as you usual do.
$ pip install kikan
Usage
Let's cover all essential things you will use for your game.
Engine
TODO
Entities
This is main component a game is built from. Any interactable object in your game is Entity. Entities use several default methods to use engine's capabilities.
from kikan import engine
from kikan.entity import Entity
from kikan.math import Vector
class Player(Entity):
def on_pre_update(self, dt: float):
...
def on_update(self, dt: float):
...
def on_collision(self, other: Entity):
...
def on_input(self, key: str):
...
p = Player(Vector(0, 0), "P") # position and texture
engine.start() # at the very end of the file
Sometimes you want to manage some variables or display something but you don't need a whole entity with the physics and all that stuff. Then use MetaEntity. Such classes don't have to be initialized.
World
TODO
Screen
TODO
Logger
TODO
Development
So you want to contibute to this package... Let's prepare environment:
- Make a fork and clone the repo.
- Install package as editable.
- Use
toxto test and run other useful scenarios. - (VS Code) Install recommended extensions to follow the code style. Make sure you have installed
mypyin your system if you want to check static typing on save .
What about tools?
- Use
ruffto lint your code - Use
blackto format your code - Use
mypyto check static typing in your code
All this you can do with tox.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kikan-0.0.3.tar.gz.
File metadata
- Download URL: kikan-0.0.3.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
693ce7440d3534f8a7a9704bc112a97ef9d50b2569d03c9e7a13b1668d3d1a4e
|
|
| MD5 |
3c37002e50e225658b2ee95f78828166
|
|
| BLAKE2b-256 |
6146e4cc43f3581979a1e298c9828353fd86dec808ef5a685f76cb5165702b76
|
File details
Details for the file kikan-0.0.3-py3-none-any.whl.
File metadata
- Download URL: kikan-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54562d958198447237e8d45b44137eda90bcbf43195fa29fbd490e85b2a5ec5d
|
|
| MD5 |
410cb80a3a11853612d642b08a3dd5ef
|
|
| BLAKE2b-256 |
a19703c9510ba243e2344f59e9ac82784222cd3ecf8045274f529b3bd2d3db79
|