New features in Construct 2

Discussion and feedback on Construct 2

Post » Fri Feb 04, 2011 11:14 pm

HTML5 exporter
Construct 2's primary exporter generates HTML5 games using a Canvas element. We feel this is much more relevant in today's world than a Windows desktop EXE exporter. For those who haven't heard the term before, HTML5 is the next major revision of HTML and web technologies which modern browsers are already starting to implement. There's a nice overview I found here, and you could also check out the more in-depth HTML5 Wikipedia article.

While HTML5 doesn't have a widespread adoption just yet, we're building C2 for the future, and when it does, you'll be able to share your games on the internet across almost all devices and operating systems, with a single format. HTML5 is essentially the main features of Adobe's Flash incorporated in to pure HTML and Javascript - and it'll run on iPhone, iPad, Android, Windows, Mac, Linux, or any device at all with a modern browser. The latest version of Firefox, Safari, Chrome and IE9 all currently have good support for HTML5. Support will improve, but older browsers (IE8 and below) don't support HTML5. IE9 is due for release imminently (the beta is available here), and although it'll probably take a couple of years for HTML5 to gain the same support as Flash, we'll be ready and waiting when it happens.

Modern browsers are also in an arms race to hardware-accelerate the HTML5 canvas (using either OpenGL or DirectX depending on the browser), as well as to get the fastest javascript engine (several browsers compile javascript to machine code). HTML5 canvas is headed towards being a very high performance platform.

Plugins are written entirely in Javascript (both edittime and runtime, thanks to integrating Google's V8 javascript engine in to the exporter). Plugin developers who want to get involved in extending C2 no longer need Microsoft Visual C++ - just some everyday Javascript know-how and Notepad. Hopefully this will open the floodgates for developers - the barrier to entry is very low, and there are tonnes of opportunities for implementing cool new web technologies via plugins (WebSockets anyone?). Users win too, with more plugins to choose from, as well as being able to very easily custom-code specific plugins for their own purposes.

Multiplatform architecture
C2 is designed around external 'exporters', which are written separately as add-ons (like plugins) and should make it significantly easier to port to new platforms further down the line. This also means there'll be an Exporter Development Kit (EDK). Ambitious third party developers can write their own exporters and enable Construct 2 to export to new platforms and devices entirely independently. Since the exporters are separate to the editor, these exporters can also be sold commercially by independent developers.

Hopefully this will encourage third party ports to new platforms. This could include an official Windows desktop EXE runtime in future, a third party Android native exporter, or whatever anyone thinks up.

Checked builds
Most releases (unstable ones) will be 'checked' builds. These contain loads of internal checking that can spot problems in the code. All these checks might slow down performance a little bit, but they mean if you encounter a bug, chances are you'll trigger one of these checks, and you'll get a messagebox with a dump of useful diagnostic information. This should make it much easier and quicker to fix bugs - instead of just "it crashes", with a copy-and-pasted report from the user, we can immediately know the exact source code line and even a rough idea what went wrong. This should also help us make a lot of changes quickly and still be confident everything's working, if there are no 'check failures', and vastly improve the overall stability of Construct 2. (This, and our improved coding experience, should mean we do much, much better than Construct 0.x's stability.)

Construct 0.x has no unicode support which makes it nearly impossible to translate, and hard for people to use non-English text in their games and events. Construct 2 is fully unicode enabled - you can't translate it yet, but you can use unicode strings in your project content, object names, and so on.

XML data format
Projects, layouts, everything non-binary is saved in a human-readable XML file format.

Project folder structure
C2 can now store projects in a folder, with separate files for the project settings, layouts, and UI persistance information, and so on. This makes saves much faster (only changed files are saved back to disk, rather than regenerating 100mb of data every save if you have a 100mb .cap). Collaboration becomes much easier as well, since you can either send changed files between team members, or place a C2 project under source control like SVN, and have full versioning, merging etc. Given that the file formats are XML this is much nicer for collaboration too.

For small demos and examples single files are still more convenient. For this, you can still create .capx files which are just a zipped project folders (you can actually rename them .zip and open them). These open and edit transparently just like old .cap files, but for large projects they'll be a little slow, so they're mainly a convenience feature (eg. for posting to forum).

Improved UI
The Windows 7 ribbon looks much nicer than the old ribbon, and it's a free part of Visual Studio - no dependencies on the proprietary Prof-UIS library that we had to pay for! Much of the UI has been redesigned and thought out from scratch, and hopefully it's a lot simpler, easier and faster to use.

Construct 0.x uses DirectX for both the editor and runtime. Construct 2 renders with OpenGL for the editor (since the primary exporter is HTML5, there's no hardware acceleration API built in - browsers can provide acceleration themselves). OpenGL 1.1 ships with Windows XP, and there's no need for D3DX installation for the editor. There's also no Visual C++ library installer required, so the installation is simpler and quicker.

Other notable changes
The entire program has been redesigned taking on board the most popular suggestions and gripes from Construct 0.x. Here's a few other smaller improvements:
- Everything in the project is organisable in to a folder heirarchy (layouts, objects, etc), which should help organise large projects.
- There is both a 32-bit and 64-bit native version of the IDE, so 64-bit users can enjoy improved performance.
- The install should be portable, so you can install to e.g. a thumb drive and run it on other computers without going through the installer. This also means it can be run in places where account limitations prevent you running installer, e.g. in schools, universities, workplaces. (Remember the 64-bit editor won't run on 32-bit Windows, so if in doubt, install the 32-bit one.)
- Expressions are statically evaluated. If a parameter can be worked out in the editor (e.g. it's constant) it's evaluated and can be checked by its plugin. For example, the Array object can reject -1 for an X index - in the editor, before you run.
- Specific instances can be used in expressions, e.g. Sprite(2).X
- All indexing in the event system is 0-based. 1-based just doesn't make sense mathematically, and it's totally consistent this way (the random() expression has always been 0-based, for example).
- There's a new "configurations" system. You can edit multiple configurations (ie. tweaked arrangements) of your project, for example, to create a demo of just the first three levels - within the same project as the main game.
- The x.xx.xx version number system has been dropped. "1.0" is an arbitrary milestone - not only was it a bit of a fiasco with the previous version, but software rarely reaches 1.0 and stays there, so "1.0" hardly means "done". To reflect this, releases will simply be numbered (1, 2, 3, 4...).

No backwards compatibility
It's important to note there is no backwards compatibility to 0.x in Construct 2. That is, you won't be able to import your old .cap files in to Construct 2.

We realise this is going to be a gripe with many users, but the whole reason we've been able to make so many of the above changes is by forgetting backwards compatibility - and just for starters, the HTML5 platform is a completely different technology to a Windows desktop runtime, so there are lots of features that aren't transferable anyway (everything from pixel shaders to the venerable but archaic INI object), not to mention the web is a whole other paradigm to the desktop.

It may be possible a third party developer creates some tool that can do some kind of partial conversion from 0.x to C2, but it won't do everything. Also, considering the many and far-reaching changes in C2, we'd recommend projects are rebuilt from scratch in C2 anyway - so you don't get stuck using old patterns and ideas, and take full advantage of new features.

Unfortunately we don't have time to write a converter tool ourselves - we're still effectively laptop-in-our-bedroom programmers, with other commitments outside of Scirra, and C2 itself is a never-ending project. We would love to have easy import from C0.x, but there's just no time, and we're excited about the future. However, we hope you'll agree the new improvements are promising and exciting. Your feedback is welcome.

Ashley2011-06-26 17:44:55
Scirra Founder
Posts: 22,952
Reputation: 178,600

Post » Sun Feb 06, 2011 12:50 pm

I jizzed in my pants

Though I somehow would be more comfortable with exe exporter coming as soon as possible even though this is too cool atm
Posts: 622
Reputation: 3,186

Post » Sun Feb 06, 2011 3:29 pm

I hope your plan xna export for Construct2
Posts: 18
Reputation: 1,086

Post » Mon Feb 07, 2011 8:22 pm

Checked builds - ...instead of just "it crashes", with a copy-and-pasted report from the user, we can immediately know the exact source code line and even a rough idea what went wrong.


Unicode - can't translate it yet...

Yet? So is it planned for the future?(near :) )

Project folder structure - Collaboration becomes much easier as well, since you can either send changed files between team members, or place a C2 project under source control like SVN, and have full versioning, merging etc.

Niceee, I like.

Is in C2 going to be something like an array runtime viewer? In 0.x, I always have to make it with the text object as in debug window it is't working.
Posts: 773
Reputation: 6,643

Post » Mon Feb 07, 2011 8:41 pm

Collaboration becomes much easier as well, since you can either send changed files between team members, or place a C2 project under source control like SVN, and have full versioning, merging etc. [/quote:1exz6sw9]

I think I love you.
Posts: 59
Reputation: 6,365

Post » Tue Feb 08, 2011 10:49 am

Will there be support for Python in C2?
Posts: 13
Reputation: 2,760

Post » Tue Feb 08, 2011 10:50 am

If someone Python savvy writes it, there will be.
Posts: 1,910
Reputation: 13,155

Post » Wed Feb 09, 2011 2:41 am

Question, are we going to get all the other nifty features html5 canvas offers?
IE lines, paths, gradients, radial gradients, curves, fills, translations... omg there's still more.
Image Image
Posts: 7,358
Reputation: 67,271

Post » Wed Feb 09, 2011 5:00 am

Gradients? :(

I thought we'd get to leave behind the gradient hell of amateur Newgrounds flash games. *sigh*
Posts: 4,348
Reputation: 10,971

Post » Thu Feb 10, 2011 10:15 pm

so, soo good! Very futureproof. The XML thing is awesome and of course javascript extentions!
Posts: 448
Reputation: 2,546


Return to Construct 2 General

Who is online

Users browsing this forum: zenox98 and 19 guests