Write game like Scratch
Project description
scrawl
A game engine like Scratch which can run on Node.js Pygame & Kivy
介绍
Scrawl是一个游戏引擎,允许您使用Scratch的方式编写游戏。(克隆 事件)
它支持Pygame Kivy 和 Node.js,这让它能运行在绝大多数平台。
它包含大部分所有可能使用的功能(Api 文件读写 等)
它支持开发者开发扩展包
完全不用担心“While True”的问题,只需要自然的编程就可以
示例
from scrawl import Scene, Sprite, Game
class Cat(Sprite):
def __init__(self):
self.image = "cat.png"
def main(self):
while True:
self.move(10)
yield 1000
self.clone()
def event(self):
self.say("hello")
def clones(self):
self.turn_right(10)
class Background(Scene):
def __init__(self):
self.image = "bg.png"
def main(self):
while True:
yield 500
self.broadcast("event")
class Main(Game):
def __init__(self):
self.scene = Background()
self.sprite = [
Cat(),
]
Main().run(engine="pygame")
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
scrawl_engine-0.0.1.tar.gz
(14.6 kB
view hashes)
Built Distribution
Close
Hashes for scrawl_engine-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db8b79e1894cab9adfaedb10ff990d6d26be3e5750862372d132cd6d96c448e6 |
|
MD5 | 3a697e1daaa8fb73ea95a3a1ca3af7d1 |
|
BLAKE2b-256 | b7caf29e648919d408bdadd6466e44d976202cd0352d08c94811ff0646f97e6f |