Skip to main content

An object-oriented wrapper for the Python curses library.

Project description

crsgame

An object-oriented wrapper for the Python curses library.

Installation

pip install crsgame

Example

import curses
from crsgame import Renderer, Color, Vector, Box

def main(stdscr):
    r = Renderer(stdscr, fps=15)

    r.RegisterColor("white", Color("white"))

    obj = Box(Vector(5, 5), Vector(2, 2), True, "#", "white")

    def loop(deltaTime):
        r.Render([box])
    r.RenderStep.Connect(loop)

    r.Run()

curses.wrapper(main)

Features

  • Object-oriented curses API
  • Automatic delta rendering
  • Shapes, colors, input handling
  • Asynchronous game loop support

Links

PyPI: https://pypi.org/project/crsgame

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

crsgame-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

crsgame-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file crsgame-0.1.0.tar.gz.

File metadata

  • Download URL: crsgame-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for crsgame-0.1.0.tar.gz
Algorithm Hash digest
SHA256 818f938bc4a26af31918ec4ef820192a3693e17df52d2aeadb76bf9f90a83b93
MD5 c6c2a2c76cc38ae70f10302c1410a782
BLAKE2b-256 43435baba9b734040fc6d079de18e17cc7446529507f8286e0ad88cf58b33d1e

See more details on using hashes here.

File details

Details for the file crsgame-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: crsgame-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for crsgame-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62d689dc1472fec6074f7c221b741cc0109f319c20d0b06e1b4b8b48bd409622
MD5 c11dcc7350d8efab0c1d84d17ffa037e
BLAKE2b-256 e5b586a7b106ef942fc38a9796e78bfb370d920012d171a9eca5b42a0dd3213d

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