Download Construct 2 release 39

Discussion and feedback on Construct 2

Post » Tue Jun 07, 2011 10:45 pm

[size=200:3oe4d6vi]Download Construct 2 public preview 39[/size:3oe4d6vi]
[size=85:3oe4d6vi]Link to release 38.2[/size:3oe4d6vi]

Three new plugins and a few bug fixes this build. The new plugins are Ajax, Array and Browser. See the changelog for more!

Edit 08/06/11: Some updated info on the AJAX plugin: Modern browsers prevent cross-domain requests for security reasons. This means a page on scirra.com can only request other pages on scirra.com. Another difficulty is files on disk count as a different domain too. Construct 2 previews your game from files on disk. Therefore, requesting any page from the internet will fail in preview mode, because going from disk to the internet is cross-domain too.

However, servers can be set to respond to cross-domain requests. This is generally only done for things like data services, but if the server sends this HTTP header:
Access-Control-Allow-Origin: *
then the page can be requested from any domain - other servers, or files on disk. That means it works in preview too! For example, if you are requesting your own PHP file from your own server, you can add this line to the PHP script:

[code:3oe4d6vi]header("Access-Control-Allow-Origin: *");[/code:3oe4d6vi]

This will make requests work when previewing. This makes testing it a lot easier.

The only other alternative is to export the project and upload it to your server to test the AJAX requests. That's kind of slow, so if you can get it to send out that header, that will make life easier for you.

Remember you still can't make cross-domain requests by default, even when the script is online, unless the server you are requesting also sends out an Access-Control-Allow-Origin header that allows your domain. You might be able to contact the person running the server and have them modify it so your application works, but this is only likely to work if you know them or work with them.

Hopefully that will help you make the most of the AJAX plugin. Please remember these limitations aren't Construct's fault - the internet is designed like that for security reasons, so we have to work with that.

[size=150:3oe4d6vi]Changelog[/size:3oe4d6vi]
- [Add] Browser plugin: can navigate to pages, get browser details, etc.
- [Add] AJAX plugin: request URLs dynamically as the game runs. However, cross-domain requests are limited, and requests in preview may fail. See caveats above.
- [Add] Array plugin: like with Classic, store arrays of values in up to three dimensions.
- [Add] 'Edit texture' context menu option when right clicking objects with textures in a layout.
- [Change] Upgraded bundled jQuery version from 1.4.4 to 1.6.1
- [Fix] False-positive assert failure ("system_expression != NULL").
- [Fix] Multiple spaces in expressions were collapsed to a single space when saved and loaded, due to an incorrect XML parser setting.
- [Fix] Layer 'initially visible' setting was mixed up with the 'visible in editor' setting when loading a project.
- [SDK] Runtime scripts have been refactored to be simpler and minify better. It should be a bit easier to write plugins and behaviors now, and minified runtime scripts are a few kb smaller.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Jun 07, 2011 11:11 pm

Downloading. This sounds totaly awesome.

Edit: First thing I try in the configuration settings of the project setting firefox as my preview browser. I launch my quick test, result : a new firefox window opens, 4 tabs in it. The first one links to "file:///C:/Documents" and ends up as a loading error, 3 other tabs open and ends up on search engine (?) (http://www.and.com/ ; http://www.settings.com/?f) (see the pattern there ?) ^^

When letting "default" to the project setting, it does work fine though.
Also, the html preview has been refined, hasn't it ? Nice round cornered rectangle around my layout display.

I'll play with a it around a bit more. (I'm especialy interested in ajax ;) )

2nd edit: All right, AJAX seems to work. I managed in making my integrated "app" work into an elgg framework. One click, and it goes finding informations on a different webpage.
Tested on a local server, it seems nice. I'll wrap my head around this a bit more in the days to come.

So far, I haven't found the way to make the images work yet (as the framework works the "scripting" is put in a specific folder, but its execution is commanded through a totally different URL (through the framework's engine)). So yet, my image is not correctly linked to my app. But I'll figure it out sooner or later, and as you are quick into releases atm, I bet you will even have a better solution in a soon to come release.

Keep on the good work scirra, C2 will be awesome, please don't get bought by a big major society ^^
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Wed Jun 08, 2011 12:01 am

Although I'm extremely interested in C2 I won't be downloading this release, Maby in a couple more I will, because I have a strict 5gb limit on internet usage and I go on the internet...ALOT. :? At first I dimissed HTML5 as being the main talked about feature in construct 2 but after playing around with release 38.2 I'm a believer now. HTML 5 is awesome!
B
5
S
3
G
4
Posts: 189
Reputation: 2,910

Post » Wed Jun 08, 2011 1:46 am

I found out some more about how to get AJAX requests working. I've edited the OP with more info.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Jun 08, 2011 2:14 am

*Waits for animation editor*
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Wed Jun 08, 2011 2:37 am

Hi, well, thanks for another realease.
This browser plugin is one of the things i was waiting.
But now i got a problem:
When i used a solid behavior, it show this error: Assertion failure: Behavior ID "Solid" is missing.
And it crash the entire game.
B
16
S
3
G
6
Posts: 19
Reputation: 3,204

Post » Wed Jun 08, 2011 12:05 pm

Oops, I broke solid in the refactor. Attached is a fixed runtime.js, paste it in to exporters\html5\behaviors\solid to fix.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans and 11 guests