Ashley's Forum Posts

  • Internet Explorer 9 beta v-syncs the canvas so it's as smooth as the 0.x runtime - maybe give that a shot to avoid tearing?

  • Download Construct 2 public preview 26

    Why is it release 26?

    We're using an incrementing version scheme, and the previous releases were private.

    More information

    Please read Welcome to the Construct 2 public preview!

  • Known issues in Construct 2

    There are some problems and incomplete features we know about already; please don't report these as bugs!

    • [s:39nthbwz]I can't seem to persuade Windows XP to group the list items in the event wizard, like 0.x does. It works on Vista and up though.[/s:39nthbwz]
    • Collisions are only bounding box.
    • [s:39nthbwz]Collision events (Is Overlapping/On Collision) don't pick the second object properly in all cases.[/s:39nthbwz]
    • [s:39nthbwz]The initial event algorithms are inefficiently coded, so a functioning prototype could be developed quickly. This can be sped up significantly. If you find the loops or other events slow, consider this a work in progress. (It's not because Javascript is slow.)[/s:39nthbwz]
    • You can't create an instance of an object at runtime if there isn't at least one instance in a layout somewhere in the project. (This will be supported eventually, it's a new feature over 0.x though.)
    • [s:39nthbwz]Copy-pasting objects between projects isn't done yet.[/s:39nthbwz]
    • [s:39nthbwz]Opening two projects appears to remove all icons from the project bar. (Cosmetic only, rest of functionality with two projects open should work.)[/s:39nthbwz]
    • [s:39nthbwz]In some cases, switching between layouts at runtime leaves the scroll position in the wrong place.[/s:39nthbwz]
    • [s:39nthbwz]Nested looping conditions don't work, and triggers as subevents to loops don't work either. However, ordinary looping conditions by themselves should work OK.[/s:39nthbwz]
    • Missing features should not be considered bugs!
  • Since there's not currently any UI to pick expressions, here's a list of all expressions currently supported in C2.

    General expression features

    Javascript does not actually support an integer datatype, but support is emulated by the runtime by rounding floats. However, any operator involving a float returns a float (so e.g. 5 + 0.5 returns 5.5 like you expect) so this probably isn't going to be an issue for anyone. Also, division always returns a float, so 5 / 2 = 2.5 (as with 0.x), if you want integer rounded division, explicitly specify it with int(5 / 2).

    There are no expression shortcuts like in 0.x: you can't type .X as a substitute for Self.X. However, the Self keyword works.

    You can specify specific instances in object expressions: Sprite(0).X gets the first picked Sprite's X co-ordinate, Sprite(1).X the second, and so on. Sprite(N) when there are N sprites will wrap-around and return the first Sprite's X again, Sprite(N+1) the second, and so on. Sprite(-1).X will return the last picked Sprite's X co-ordinate, Sprite(-2).X the second last, and so on. You can use any expression for the instance to pick, you don't have to just enter a number.

    The usual arithmetic operators are supported: + - * / % ^

    There's a new unary minus operator, so you can write -Sprite.X instead of 0 - Sprite.X.

    The conditional a ? b : c operator was a bit buggy in 0.x - it should be working correctly in C2. Example: Sprite.X < 100 ? -1 : 1

    The & operator is string concatenation as in 0.x, or logical AND when both operands are numbers. The | operator is logical OR (and has no special behavior with strings).

    System

    int(x) - convert x to integer

    float(x) - convert x to float

    str(x) - convert x to string

    len(x) - return length of the string x

    random(x) - return a random float from 0 (inclusive) to x (exclusive) - note this differs from Construct 0.x where random would return an integer if you passed it an integer. Use int(random(x)) to reproduce this behavior.

    random(a, b) - return a random float from a (inclusive) to b (exclusive).

    sqrt(x) - compute square root of x.

    abs(x) - absolute (positive) value of x.

    round(x) - round x to the nearest whole number.

    floor(x) - round x to the lowest next whole number.

    ceil(x) - round x to the highest next whole number.

    sin(x), cos(x), tan(x), asin(x), acos(x), atan(x) - trigonometric functions, which work in degrees

    exp(x) - e raised to the power x

    ln(x) - log to base e of x

    log10(x) - log to base 10 of x

    lerp(a, b, x) - linearly interpolate a to b by x

    distance(x1, y1, x2, y2) - distance between two points

    angle(x1, y1, x2, y2) - angle between two points (degrees)

    loopindex - current (top-level) loop index

    loopindex(name) - loop index of 'for' loop of given name

    max(x, y [, z...]), min(x, y [, z...]) - returns maximum/minimum of any number passed - like 0.x you can pass any number of parameters here.

    newline - text string containing a line break character.

    dt - new name for 'timedelta' which is the standard used in games programming (it's actually usually referred to as 'delta time', so 0.x got this the wrong way round!). Currently always returns a fixed value (1/60th of a second) because Javascript does not have a high-resolution timer. You should still use it so you're future-proofed in case dt is ever modified to actually be a time measurement, and when implemented, timescale will modify this value.

    timescale - always 1.0 at this time.

    time - time in seconds since the game started.

    tickcount - number of ticks elapsed since the game started.

    objectcount - total number of object instances in the game.

    fps - current framerate in frames per second.

    scrollx, scrolly - current scroll position

    Common object expressions

    Currently, Sprite and Text implement these.

    X, Y, Width, Height - as with 0.x

    Angle - (Sprite only) Angle in degrees

    Count - number of instances

    Other object expressions

    There are no longer MouseX or MouseY system expressions - insert the Mouse object and use Mouse.X and Mouse.Y for the mouse position in the layout, or Mouse.AbsoluteX and Mouse.AbsoluteY for the position on the canvas.

    The text object also has a 'Text' expression (surprise!).

    Instance variables

    Access these by their name like this:

    MyObject.MyInstanceVariable

    You can't name an instance variable the same as an object expression.

  • <img src="http://www.scirra.com/images/html5.png" border="0">

    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.)

    Unicode

    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.

    OpenGL

    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.<div>- There is both a 32-bit and 64-bit native version of the IDE, so 64-bit users can enjoy improved performance.</div><div>- 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.)</div><div>- 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.</div><div>- Specific instances can be used in expressions, e.g. Sprite(2).X</div><div>- 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).</div><div>- 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.</div><div>- 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.

    <img src="http://www.scirra.com/images/c2cog.png" border="0">

    </div>

  • The HTML5 exporter in Construct 2 includes Google's V8 Javascript engine. This means both the editor and runtime parts of plugins can be written in javascript. This makes it much, much easier to extend Construct - previously you had to have relatively good knowledge of C++, which is a difficult language to learn, as well as Microsoft Visual C++ (the full version of which is expensive, and the express versions are difficult to set up for the SDK). Now you can do it on any computer in any text editor (even Notepad). I use Notepad++ myself, which is basically an advanced Notepad, and has syntax highlighting for javascript.

    Custom javascript plugins are a good substitute for Python scripts for advanced users, too. You can easily put together some custom functionality for your own project once you're familiar with the SDK.

    Plugins also only need to be written once for both the 32-bit and 64-bit versions of Construct - the V8 engine handles the differences itself.

    Location of plugins

    Plugins are stored under <install path>\exporters\html5\plugins. Each plugin has its own folder, with four files:

    edittime.js - defines everything the editor needs to know about the plugin.

    runtime.js - defines the plugin methods that run in the browser.

    common.js - prepended to both edittime.js and runtime.js, in case there's any code that is in common to both files. No plugins currently use this, it was added in anticipation of code duplication.

    PluginIcon.ico - icon file loaded by the editor to represent the plugin.

    To make a plugin, simply copy and paste another plugin's folder and start editing the files. (There's no template yet - sorry!)

    Documentation

    There is no SDK documentation right now, mainly because there's just no time to get it all written down. Also, the SDK is subject to change at any time! If you write a plugin now, be prepared to have to change it to fix it after some releases. This is due to the nature of pre-alpha software: it will change a lot, and it will break things.

    The best way to learn about the Javascript SDK is to read the source code to the other plugins. There are a couple of other javascript source files that are prepended to the plugin sources that will help you learn about the features available. These are under <install path>\exporters\html5, and are:

    common_prelude.js - prepended to both edittime scripts and runtime scripts.

    edittime_prelude.js - prepended only to edittime scripts.

    preview_prelude.js - prepended only to runtime scripts.

    The rest of the scripts in that folder are for the browser runtime. You can have a look through them if you want your plugin to hack around with the engine. Due to the nature of Javascript your plugin can modify any part of the runtime at any time. However, it is undocumented as to which parts will definitely break if you change them, and which parts can safely be modified. If you're not sure, make a forum post asking.

    Minification

    It is not necessary to minify/obfuscate your scripts. Construct 2 gives the option to minify script on export.

    Hope that helps get you started! Just be warned, the SDK may change at any time as functionality is added and changed.

  • <img src="http://www.scirra.com/images/c2cog.png"><img src="http://www.scirra.com/images/html5.png">

    Overview

    Welcome to the Construct 2 public preview! Development was previously done privately, and we're moving to public development now, for broader feedback and testing. Please get involved! If you're wondering what will happen to the old Construct, you probably haven't read this yet.

    New features in Construct 2

    There are a lot of changes and new features in C2. The big news is that it primarily exports to HTML5. The changes are outlined in this thread.

    State of development

    This public preview is effectively a pre-alpha. C2 does not yet have much capability - the demo below is very simple and it is difficult to make anything much more complicated than that. C2 is currently defined more by what it doesn't have than what it has - there are no private variables, behaviors, event groups, event includes, families, very few plugins with very few actions, conditions and expressions, no image editor, animations, and so on. If something's missing, it's just that we haven't got there yet. (0.x was around a quarter of a million lines of code.) Our approach to development has been to get to some useful functionality as quickly as possible - dropping as many features as possible along the way to make it quicker - then to fill out functionality from there. For example, event groups are useful, but most people can get by without them, so they were dropped to free up time for essential, unmissable features. Obviously they'll get added in the end, it's just a lower priority!

    However, we hope to expand C2 rapidly. You can build similar simple "toy" games, and if you're creative you can use some hacks (like storing variables in object's positions!) to make some more complicated games right now, but it's hard work!

    Some useful feedback would be the essential features that you're really struggling to get by without. I have private variables next on the agenda, since I presume it's incredibly limiting not having them.

    Download

    Forum threads will be posted to this forum for new releases. (I'm not linking to one here because it'll go out of date pretty quick!)

    Demo

    You can preview a really simple test of a HTML5 game made in the current build here. The .capx for it can be downloaded here. Note: you'll need a HTML5 compatible browser! The latest versions of Chrome, Firefox, Opera and Safari are compatible, but Internet Explorer 8 isn't. However, it also works in Internet Explorer 9 which actually has the best canvas support right now!

    Documentation & Known Issues

    A list of known issues can be found here - please don't report these as bugs, we know about them already. There is not currently any documentation - there are help links in the program, but there hasn't been any documentation written for them to link to. We'll set up a wiki at some point for the links to point to.

    Feedback & bug reports

    The whole point of this preview is to get feedback, so please let us know what you think! Whether you especially like something or especially dislike something, do let us know - both positive and negative feedback is valuable. Feel free to post threads in this forum with your thoughts, suggestions, ideas or anything else you want to say.

    Developers

    You can extend Construct 2 with Javascript! Find out more here.

    Get involved

    Even if you're not a developer, there's still loads you can do to help out with the project! We'll be posting some ideas for the community to get involved with Construct 2's development shortly.

    Thanks!

    Thanks for your support and we hope you enjoy trying out Construct 2, as limited as it may be! I'd also like to say thanks to Mary Jane who's done the new logo and our front-page C2 splashes, and Davo who's done a few bits and pieces and came up with the new design for the event sheet editor. Also, the HTML5 logo is the sort-of-official one from W3.

  • Thanks again for the responses everyone - overall it's been very positive and it's great nearly everyone's in favour of this! It's been really nice reading the responses.

    The preview will be starting very shortly. Also, the initial plan is for the main program to remain open-source.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the many kind and understanding messages everyone

    A commercial option is something we've thought about, but there will probably always be a free version of some description.

    There have been a lot of questions about C2, but the easiest way to answer all the questions is: we'll start a public preview this weekend, and post lots more info, and you can see for yourself then! That should also help anyone wondering where their current projects are going to go. (Remember it's in pre-alpha stage so is some time away from being full-featured.)

  • Dear Construct community,

    You may have noticed our front page banner changed recently. Construct 2 has been under private development for some time now. I haven't said anything before, because it needs this whole spiel to go with it, but C2 is at a point where it's ready for public testing. It's at a very, very early stage (sort of pre-alpha) and is primitive compared to Construct 0.x, but C2 can just about do something vaguely useful, so it's a good time to get everyone on board with suggestions, bug reports and ideas. That way, we can all try and make it as good as possible.

    The thing is, 0.x is technically poorly designed. It probably can never be patched up to a "1.0" standard - or if we did, it would just be a name, and not be as stable as users expect from a 1.0 release. We basically learnt to program from 0.x, and obviously when we started we were less experienced, and the first decisions you make when writing a program are the most important. A lot of those decisions were made wrong. As a result, people regularly go through experiences like Jonas Kyratzes describes in this article: frustrating, slow, and with lots of obscure bugs making development a nightmare.

    If we released "Construct 1.0", it would still have these problems. The poor design makes it far more work to improve than just to start again, entirely from scratch. So the time has come when Construct 0.x should be put in to "maintenance mode". This means occasional bug fixes but we won't be aiming to reach 1.0. There probably also will not be a practical way to import 0.x projects to C2, for both technical reasons, and the limited time available to devs (especially when you also have a 12,000 word university report to write!).

    This is painful, because of the years of effort the developers have put in personally, and especially for the thousands of people who visit the site every day, expressing an interest in Construct 0.x, and especially those who have invested so much time and effort building large projects, helping other forum users, writing tutorials and documentations and so on. However, the prospect of adding something to 0.x like exporting to a new platform is... daunting. It basically can't be done, so the longer we wait, the less useful 0.x becomes. C2, on the other hand, has a totally modular export system, which means we can adapt it to new technologies for years to come - and that's just for starters on improvements. To prevent 0.x going completely stale, I will grant SVN access to any interested developers, and can lend a hand with releases, but I will be focusing on C2. Also, there should be a new build of 0.x shortly, thanks to Davo and R0j0Hound.

    Please remember, everyone who ever worked on Construct 0.x have only been bedroom programmers: I'm still on a full-time university course myself, and everyone else who contributed were in similar situations. We try to look professional, but there is no office, company, income, employees or regular structure at all, like most of our competitors! We do it for the love of it. Construct 0.x was written by ordinary people in their spare time with other significant commitments.

    I also want to assure you that we learnt a huge amount from Construct 0.x, and we won't be making the same mistakes again. 0.x serves excellently as a prototype, with valuable feedback on what people like, don't like, how they use it, what works, and what doesn't work. All of this feeds in to C2 to make it even more awesome. There are a lot of exciting new features based on its new design. We're already doing a lot better. Also, it's an absolutely huge project, so I guess I have to admit I'm a little bit mad to even try. But why not? What would a program twice as good as Construct look like? What if it could even change the world, just a little?

    It's been a lot of fun having the forum here and working on Construct. However, we want to move on. We apologize to those of you with large projects and significant time investments in 0.x. We're thankful for what you've done, and we realize that we may be letting you down, at least for the moment. But in the long run the experience we've gained will allow us to make a better program for you, which will be faster, more powerful, more stable, easier to use, and easier to add new features to.

    So although this may be bad news for your project, I'm asking your support and cooperation for the development of Construct 2 - or, at least, that you understand of who's behind the program you use, and why we made this decision.

    Thanks everyone,

    Ashley

  • Arsonide: I can't find an account named 'Arsonide' on the wiki, did you log in to it first?

  • Breadcrumb navigation? There used to be one at the bottom of the forum, but the forum upgrade recently got rid of it. I don't know why. My experience with phpBB is if it does something weird for no particular reason, let it be, for the preservation of sanities... is it that big a problem?

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Thanks for the picture R0J0, that sums it up nicely. For the record, it used to be that it wouldn't be pickable until the next tick - a fix a few versions ago made it the next top level event, but due to the design of the engine, it's very tricky to make it available in subevents (where Destroy is in your diagram).