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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyscratch_lobotomy2012-0.1.6.tar.gz.
File metadata
- Download URL: pyscratch_lobotomy2012-0.1.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d2d57c81c2395b58fb602c13d80b2f69ac7a2130399c0b98b63cda35d66fc75
|
|
| MD5 |
70629fbb77ba4152bbacaf4bc5e5f60d
|
|
| BLAKE2b-256 |
f3c5abfca69b55ecac07ce78e9f0ec6343543ba6251133e786f4dc303ccdc26f
|
File details
Details for the file pyscratch_lobotomy2012-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pyscratch_lobotomy2012-0.1.6-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2da49f7f1426dae39c036672d5a4e1c6bb9229d91db45fbb9b7488fcb487fd30
|
|
| MD5 |
1add9582884ffb518d6d73ef77245f68
|
|
| BLAKE2b-256 |
e0bf4e6d5e3bcf1ae49a601fb0e19267158f0393d178dd7b026a041f53639b84
|