Beta versions are not as thoroughly tested as stable

Beta versions are not as thoroughly tested as stable

Beta branch

Construct 3 r151

Introducing JavaScript coding in Construct!

28 May, 2019 ()

Email Me New Releases

Don't miss out on the latest and greatest new features in Construct 3

Create an Account

Notes

This release introduces JavaScript coding in Construct! This is currently only available for existing subscribers. For more information see the blog post Introducing JavaScript coding in Construct.

While we do not normally document features until the next stable release, in this case we recognise it would be difficult to make full use of the feature without documentation. So we will shortly be adding preliminary documentation for the scripting feature in the manual. Check back at that link in the near future for updates.

Please note that this beta has a very early version of the scripting feature - there is still a lot more we want to do, so don't consider this anywhere near a final version. Just some of the improvements we're keen to make include better code editing with features like syntax highlighting when adding code to events, error highlighting, autocomplete (aka intellisense), and a great many more APIs to be able to modify the runtime from code. We'll be continuing to make such improvements over the next several releases. However we've always believed in "release early, release often" and we're keen to get even a basic version in to your hands as soon as possible so we can start testing and listening to your feedback as soon as possible.

Other than scripting, this release has a few more improvements, notably:

• Function and parameter descriptions are now shown in tooltips when hovering them in the Event Sheet View

• We've done more work to ensure the editor starts up as quickly as possible, and moved more work to happen in the background while the Start Page is showing

• The Dutch language is now available by default!

We hope you enjoy this early release of scripting! Stay tuned for more updates, there's still a lot more on the way!

Like this Release?

Let us know with a thumbs up!

37
Launch r151

New Features

29 favourites
Scripting! Write JavaScript code in events, or in separate files

New Additions

7 favourites
Event sheet view: now shows function and parameter descriptions in tooltips for both function blocks and 'Call function' actions
12 favourites
Solid behavior: 'Set tags' action
6 favourites
Shadow Light: 'Set cast from' action
4 favourites
Advanced Random: 'Remove probability entry' action to remove an item from a weighted probability table (useful for "unique" draws)
5 favourites
Settings: button to download all local browser saves as zip file

Changes

2 favourites
Attempt to get right popup window size when installed as app (PWA mode)
2 favourites
Project Bar: improved validation when drag-dropping files between folders
2 favourites
Block context menu in debugger and whole game window

Bug Fixes

4 favourites
Themes not applying correctly (regression in r150)
1 favourites
Possible "key is not defined" error when loading browser saves

Performance Improvements

14 favourites
Optimise editor loading time by loading more resources after Start Page appears

Language updates

4 favourites
Dutch language is now available by default!

Share Construct 3 Release r151 Now

  • 20 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • found this eror on r151 web export

    Uncaught TypeError: e.g_kO is not a function

    at t (c3runtime.js:2)

    works fine on r150

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

      Please report bugs to the bug tracker following all the guidelines or they won't be investigated.

  • THE feature I got a subscription for. Yeee!!!

  • I would personally love to start learning to actually code and I think this would be an amazing tool to start learning. I kept thinking to myself there's going to have to be tons of tutorials to learn the language like why do we put periods after certain words like player.x when dealing with x position I have no clue what the . Means i just learned through experience to put it there. But since its java script and not some homebrewed language there are millions of tutorials already available on the internet. This was an amazing decision on scirras part because learning a made up language is useless.

  • So now that we have a basic ability to do this, is there any kind of "hello world" template / project we could look at to help us understand how to really see the code work with a C3 project?

    I'd like to try and incorporate this into my upcoming intro to programming class at the local town community center, but i'm really just trying to see how i would demonstrate things with code and how C3 helps show basic programming concepts in a fun interactive way that is not just a bunch of text entries.. plus previewing progress is a snap in C3.

    • At the moment we don't have any sample projects, but the preliminary docs give details on how to start adding JS to your projects. Details on interfacing with the runtime from JS are pretty much non existent at the moment, but we're working on it. Your probably fine to toy around with it for now, but might want to wait a couple of release before starting classes with it. Hopefully we will have fleshed the feature out a bit more and completed the essentials of the documentation by then.

      • ok that works well because the next class won't be for another month or two, if at all. I know a few basic javascript things but little more than things i've tinkered with on Khan Academy which is a highly "walled garden" environment, so yea other than a few basic draw objects like ellipse(x,y,w,h); i wouldn't know how to even tinker with it, without some kind of working example to branch off from. So I will wait patiently to see how this new feature develops. Thanks for the response! :)

  • This is super exciting (as with many scirra updates :thumbs-up:). I've always felt reluctant to rely on plugins for important projects, but using and contributing to community scripts I'm 100% down for. I think they'll be much more stable and transparent for me.

    I'm guessing that once this feature matures, a new audience of developers might begin to feel welcome on the C3 scene.

  • Very cool. Will there be a comprenhensive tutorial and examples on how to reference objects etc?

  • Just as a test I imported moment.js and used it in a test project. This feature, to import any script, really opens up so many possibilities.

  • Dutch, my language :) Congratulations to all translators!

  • Awesome! As in "Attempt to get right popup window size when installed as app", does that mean that players that install my game have their screen resolution set automatically? Also, I have a suggestion. I would like a button that deletes all instances of a specific object on a single layout.

    Again, Cool update!

    -The Diaper Movie

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

      The popup size only affects previewing in the editor. You can already delete all instances of a specific object by selecting it in the Project Bar.

      • Ok, thank you! I don't know why I didn't see that!

        Edit: I knew you could delete all instances of an object from the entire project, but I meant on just one single layout.

        Example:

        Let's say I have 2 layouts. Layout 2 is a copy of layout 1, so they both have 50 instances of an object called Cloud. If I don't want Layout 2 to have any instances of Cloud, I don't want to have to go in and delete every single cloud. That's why I think it would be a good idea to be able to delete all instances of Cloud on Layout 2 only.

        -The Diaper Movie

        Load more comments (5 replies)
  • A big game changer! Also thanks for fixing the dark theme issues. :)