Skip to main content

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


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 details)

Uploaded Source

Built Distribution

scrawl_engine-0.0.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file scrawl_engine-0.0.1.tar.gz.

File metadata

  • Download URL: scrawl_engine-0.0.1.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for scrawl_engine-0.0.1.tar.gz
Algorithm Hash digest
SHA256 de1492e13a98b622073bdd934b9e078ed6afcb4a816921c0be9665bfe25d29f4
MD5 40c244ab6132299692b65bb4328b2be7
BLAKE2b-256 e92bd185a610b9621485e64026508674f497a459362fe1606018423efe1181a9

See more details on using hashes here.

File details

Details for the file scrawl_engine-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: scrawl_engine-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for scrawl_engine-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db8b79e1894cab9adfaedb10ff990d6d26be3e5750862372d132cd6d96c448e6
MD5 3a697e1daaa8fb73ea95a3a1ca3af7d1
BLAKE2b-256 b7caf29e648919d408bdadd6466e44d976202cd0352d08c94811ff0646f97e6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page