Skip to main content

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:

  1. Make a fork and clone the repo.
  2. Install package as editable.
  3. Use tox to test and run other useful scenarios.
  4. (VS Code) Install recommended extensions to follow the code style. Make sure you have installed mypy in your system if you want to check static typing on save .

What about tools?

  • Use ruff to lint your code
  • Use black to format your code
  • Use mypy to check static typing in your code

All this you can do with tox.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kikan-0.0.3.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kikan-0.0.3-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

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

Hashes for kikan-0.0.3.tar.gz
Algorithm Hash digest
SHA256 693ce7440d3534f8a7a9704bc112a97ef9d50b2569d03c9e7a13b1668d3d1a4e
MD5 3c37002e50e225658b2ee95f78828166
BLAKE2b-256 6146e4cc43f3581979a1e298c9828353fd86dec808ef5a685f76cb5165702b76

See more details on using hashes here.

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

Hashes for kikan-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 54562d958198447237e8d45b44137eda90bcbf43195fa29fbd490e85b2a5ec5d
MD5 410cb80a3a11853612d642b08a3dd5ef
BLAKE2b-256 a19703c9510ba243e2344f59e9ac82784222cd3ecf8045274f529b3bd2d3db79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page