A proposal for Javascript scripting in Construct 3

You're viewing a single comment in a conversation. View all the comments
  • 24 Comments

  • Order by
    • [-] [+]
    • 2
    • Ashley's avatar
    • Ashley
    • Construct Team Founder
    • 2 points
    • (23 children)

    Ah, I think this can be done with subclassing. No need for separate scripts for that.

    • What do you mean?

        • [-] [+]
        • 2
        • Ashley's avatar
        • Ashley
        • Construct Team Founder
        • 2 points
        • (21 children)

        It's a way of using your own custom class deriving from WorldInstance. So you can add all your own custom properties and functions, and still do everything WorldInstance does.

          • [-] [+]
          • 2
          • skymen's avatar
          • skymen
          • Affiliate
          • 2 points
          • *
          • (20 children)

          That's interesting, how would it work exactly?

          Is it already possible in r151?

          Edit: nvm I just got what you meant. But that's already what I kinda do in the article, except I don't have access to the WorldInstance class so I made my own and get WorldInstance later. I didn't mean to make it possible, I meant to make it integrated in the editor and have a better workflow for it

            • [-] [+]
            • 1
            • Ashley's avatar
            • Ashley
            • Construct Team Founder
            • 1 points
            • (19 children)

            See Subclassing instances for how this works in r152.

            • That is pretty cool indeed, that's enough to write some kind of workflow of my own. However I still think it would be pretty cool to see an integrated workflow to the editor in order to make development easier when using JS only.

                • [-] [+]
                • 1
                • Ashley's avatar
                • Ashley
                • Construct Team Founder
                • 1 points
                • (17 children)

                I don't know what you mean by that - can you explain exactly what that would do, how it would work, and what benefits it would offer the way it works with subclassing?

                • Well the simple answer is:

                  Right now it's technically possible to make games using JS only. However the things you did for Ghost Shooter will not work for a much bigger project. Anything that will have more than 10 concurrent systems working together will be very hard to organise to work with.

                  I would love to actually write something that would represent what I mean, but I'd need to properly design (and possibly code) it for it to be crystal clear. And even then, since I have only a limited understanding of the inner workings of the engine and that I cant access the engine code, you will very probably find flaws to what I can give you.

                  Load more comments (16 replies)