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 True:
            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-1.3.0.tar.gz (62.6 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-1.3.0-py3-none-any.whl (64.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyscratch_lobotomy2012-1.3.0.tar.gz
Algorithm Hash digest
SHA256 f6b2667fc67bb2ca20439f020b77c73d9c7c84fc049fa4c142a18692ac6938af
MD5 ba48c4d680a8d77ce2c84170fb60fa11
BLAKE2b-256 ea6c5648db1204db0df060d0c141931eaa908bceec56addf06205e02146f0097

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyscratch_lobotomy2012-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f229a1719db5844e0bebe039cdd407105b48c0221f0e5f317e4bdd0be9e9187a
MD5 474ef33b75d0bbef5e57721b0c0938b0
BLAKE2b-256 dc9e15560283f87bf4dff3f707db2709b582cd1e5f0ec0aaa0ae71fb916cc39b

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