Skip to main content

nygame

Project description

nygame

nygame is a wrapper around the pygame library. It's goal is to provide and more pythonic and easy to use experience.

Usage

A basic game structure can be started like this:

import nygame
import pygame

class Game(nygame.Game):
    def __init__(self):
        super().__init__(size=(300, 200))
        pass

    def loop(self, events):
        pygame.draw.circle(self.surface, "red", (150, 100), 50)

if __name__ == "__main__":
    Game().run()

After Game.__init__() is called, a new game. A window of 300x200 will be created to host the game. Further options are available in super().__init__()'s doc string.

Game.loop() will be called every frame, with the most recent events in the events argument. The screen will automatically be cleared before every frame and can be drawn to by using self.surface.

Demos

EmojiApp - A demo app that lets you browse through emoji

Development

Deployment

???

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

nygame-1.4.0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

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

nygame-1.4.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file nygame-1.4.0.tar.gz.

File metadata

  • Download URL: nygame-1.4.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nygame-1.4.0.tar.gz
Algorithm Hash digest
SHA256 a399a922f4bbb5708680e31303ad091a595aafb9580a4de3e0efba103d45ad3b
MD5 11ad24e7560eb565dd94f3fbd7e43399
BLAKE2b-256 5d4a4fbd3889c3d6cc826a7e9a03d58615e4ffb639e926b3e743e08840a93d11

See more details on using hashes here.

File details

Details for the file nygame-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: nygame-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nygame-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5262888d17cde0c1670dd070346c0bdd240bf9f74122f05c3268fff6c830e5e
MD5 494534c132bb9e6a085e990a9013d2d6
BLAKE2b-256 2fccc70badcb03a0c809535cc65bda9a95ad1e643cd07422b6ed005bfedac6b2

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