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.

Demo

from Lib.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.5.tar.gz (15.2 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.5-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyscratch_lobotomy2012-0.1.5.tar.gz
  • Upload date:
  • Size: 15.2 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.5.tar.gz
Algorithm Hash digest
SHA256 0125071c73af1d2d9e73584567913f54cb98d1fe6a9322ab9e93b0491baa1a8d
MD5 d04862c77ff530cc1115b8e57e1b591e
BLAKE2b-256 8fef011440c3fd8a4afc89fcbf7adb71534a09d833f64721ff883b374c3541c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyscratch_lobotomy2012-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 49bda1d5f9ca32e2bd4567a4de851da3da49a945565c0b8f38a26f4b9ae6a78b
MD5 e9c7a04d21d73f3f6c72be0639780687
BLAKE2b-256 bd0016477e71c1f720ec89a6e21e7d3e998d41fb59736341c3f8163fd7174b51

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