Construct 3 built-in JavaScript Library

0 favourites
  • 2 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I love that Construct 3 has introduced the ability to write scripts in JS. It's a great opportunity to increase the complexity of the project. But I've noticed a lot of people are using event blocks because that's what Construct 3 is primarily focused on, and a lot of people love it for that.

    JS is a complex programming language that requires a lot of knowledge to write anything more than

    alert();
    

    or moving characters around. I had an idea and discussed it with a good person to add a built-in library for JS to Construct 3 that would allow you to write JS scripts as close to event blocks as possible, thus killing the threshold for those who like to use event blocks, and basically making the code easier to write, but it would still be the same JavaScript. Below I've attached some screenshots of what it looks like.

    It would be a huge advantage to be able to access an object without initializing it directly.

    I don't know if it's relevant for Scirra to do something like this, but I'm sure it will make it much easier to write scripts in JS and increase the flow of those who want to use scripts.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Construct follows the same API patterns as used by the browser (e.g. addEventListener). If we deviate from that I think it actually overall makes coding harder, as you have to learn different patterns, and remember which pattern fits to which feature. This kind of inconsistency annoys me regularly when using third-party libraries which deviate from the browser way of doing things (e.g. using on instead of addEventListener). It also reduces the use of Construct in education, as if your early coding is using the same patterns as industry-standard code, then you're already learning useful real-world skills instead of tool-specific details.

    Still, there's nothing stopping anyone using the coding feature to write a library that does that kind of thing! You can always write code to "layer on top" a differently-designed API that works like you want.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)