Skip to main content

A Scratch-like game engine built with Pygame

Project description

PyScratch

Scratch but python?

PyScratch bridges the gap between Scratch and Python, maybe. This module implements all code blocks in scratch, but not includes extentions.

Uses

install PyScratch

pip install pyscratch_lobotomy2012

Demo

from pyscratch import pyscratch

pyscratch.init()

class Sprite1(pyscratch.Sprite):
    def __init__(self, screen):
        super().__init__(screen, (100, 100), "costume1.png", 15)

    def run(self):
        self.core.go_to(100, 100)
        self.core.say("Hello, PyScratch!")
        self.core.say(str(self.core.current_date("year")))
        costume = ["costume1.png", "costume2.png"]
        i = 0

        while self.core.running:
            self.core.change_costume(costume[int(i%2)])
            self.core.move(5)
            self.core.bounce_if_on_edge()

            i += 0.25
            yield

code = pyscratch.Code((Sprite1,))
pyscratch.run(code)
image

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

pyscratch_lobotomy2012-0.1.7.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

pyscratch_lobotomy2012-0.1.7-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file pyscratch_lobotomy2012-0.1.7.tar.gz.

File metadata

  • Download URL: pyscratch_lobotomy2012-0.1.7.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyscratch_lobotomy2012-0.1.7.tar.gz
Algorithm Hash digest
SHA256 ca11b020c9d09f173e408c76eb34e8567d864632d2aaad789c948cd6c4b550f7
MD5 90014d250bb67ee4a26500ee382b8450
BLAKE2b-256 c51dc29a6b885e24ac07f8e1e3abf47b9e5e13aaa9141587e39d68cdc19720de

See more details on using hashes here.

File details

Details for the file pyscratch_lobotomy2012-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pyscratch_lobotomy2012-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 94161048f7c25ffec85f9a7a5beca468274e596923cf64efc08d448a421b0f3c
MD5 05f8502d5066ad3a4b606a0b79319470
BLAKE2b-256 55203df508cb8de0825bc1ea50688fb254151a8b6216dd8acc9c86e4577c685d

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