Skip to main content

A package for creating video games for command line

Project description

cl_games

This package can be used for building basic video games using the command line.

Usage

For creating a game, extend the clase "Game" and use "Game.run" `import cl_games class MainGame(cl_games.Game): """docstring for MainGame.""" def init(self): super(MainGame, self).init() self.title = "My New Game" def update(self): #This is run every frame

game = MainGame() game.run() To add a sprite, extend class spriteclass Player(cl_games.sprites.Sprite): def init(self, game): super(Player, self).init(game) self.image = [ " ^ ", " / \ ", "/___\" ] self.posX, self.posY = 18, 17 self.setLengthToImage() def update(self): #Also run every frame game.addSprite(Player(game)) `

To stop the game, just set the running variable to false on game game.running = false

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

cl_games-0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

cl_games-0.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file cl_games-0.2.tar.gz.

File metadata

  • Download URL: cl_games-0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for cl_games-0.2.tar.gz
Algorithm Hash digest
SHA256 be78520543dd86473c6324b2a255f0f237530395fd1e2d4eb55bb96b15185bf4
MD5 c09b40261545accdc367cef902d7355c
BLAKE2b-256 7092d5188814c01d454c445851ad96b90bbda4edc1937520e3ddffa3c787f7dd

See more details on using hashes here.

File details

Details for the file cl_games-0.2-py3-none-any.whl.

File metadata

  • Download URL: cl_games-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for cl_games-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2a555c68a95dedf89f59bd7d52ca9722bcdf2054c001e57af0ab3abae3b12ac5
MD5 31c289aa5c5e396627b750e1e5ae6fee
BLAKE2b-256 9883bea57cb5843bc9d9e2d04075e4ee8aa9b86b8167a712d7d5c269b0216dae

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