Skip to content

Cloning and other parallel scripts #86

Open

Description

@BookOwl

I've been thinking about how to add cloning to Slither, and this is what I came up with:
We would replace
clone
with clone = sprite.clone(), and
start
with

@sprite.whenIStartAsAClone
def cloned(clone):
     # clone is the new clone of sprite
     pass

@Tymewalk, what do you think?

Activity

  1. BookOwl commented on Sep 13, 2016

    @BookOwl
    MemberAuthor

    How would we handle the events going in parallel?

  2. BookOwl commented on Sep 13, 2016

    @BookOwl
    MemberAuthor

    We could use yield to handle pausing the functions, which would turn this problem into running coroutines...

    If we decide to go that route, we could replace slither.runMainLoop(framefunc) with

    @slither.whenGFClicked
    def started():
        # This would be a coroutine with yield
        ...
    
    slither.start()

    and we could also add broadcasts very similarly.

  3. changed the title [-]Cloning[/-] [+]Cloning and other parallel scripts[/+] on Sep 13, 2016
  4. BookOwl commented on Sep 13, 2016

    @BookOwl
    MemberAuthor

    After the v0.4.0 PRs get merged, I'll try making a branch that implements this idea. It would be a big, breaking change though.

  5. Tymewalk commented on Oct 30, 2016

    @Tymewalk
    Member

    (This project lives in the shadowy place between lots of activity and nothing. 😛)

    @BookOwl Any chance that it would break older projects (not that there's very many of them)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions