plugin Request: Game Closure export

Discussion and feedback on Construct 2

Post » Mon Nov 11, 2013 2:33 am

@spy84 @jayderyu

I can somehow understand anti-iOS/Android-native-exporter Ashley's attitude, but I don't get why Construct 2 don't have professional support for mobile ad networks.
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Mon Nov 11, 2013 2:30 pm

Tried gameclosure on android.
On my main project it seems like CocoonJS 1.0. Same problems with tiledbackgrounds (sometimes they simply not end where they are supposed to end) and a disappointing performance. For example if you use a black 2x2 tile to create a fadeout effect the framerate drops to 2-3FPS.
On another project with an insane amount of sprites and no tiledbackgrounds at all it runs like the new CocoonJS on steroids.
As Ashley said, domless engines are really a pain. Too many limitations and even if you have a standard compliant code like c2 exported js you can't expect it to run like it does on real browsers.
I'm really curious about phonegap + kitkat chromium based webview, this could be a milestone for c2 developers targeting android devices.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Mon Nov 11, 2013 4:40 pm

Trying to follow the instructions for this is crazy. It's like i'm working backwards. First I edit my html, then I install GITHub, then I install Game Closure...

I hope they do make a plugin, as their tutorials are for people who appear to have some kind of knowledge of programming or web editing.

5) replacing everything in resources/media/ with the audio assets from your game
update the AudioManager in Application.js accordingly


First part - Check
Second part... care to share how?

To download the Game Closure DevKit, issue the following commands at the terminal:

What on earth is the terminal? Where do I find the terminal?!?!?!

Sorry, just venting... and giving up. Back to slow Cocoon I go with slumped shoulders and a heavy heart.

Wouldn't be such a problem had my game not been finished for almost 2 weeks now!
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
80
S
12
G
7
Posts: 965
Reputation: 10,750

Post » Mon Nov 11, 2013 5:43 pm

[QUOTE=AnD4D]
What on earth is the terminal? Where do I find the terminal?!?!?!
[/QUOTE]

The terminal is GIT BASH.

To work with GC you "simply" have to follow these steps.

1) Follow all these instructions.
http://docs.gameclosure.com/guide/windows-guide.html
Ignore for now the android related part.


2) Once you have installed everything make sure that GC is running correctly.
Open a git-bash terminal and type

$ basil init c2test

3) If everything is going right you'll find a new folder called C2TEST under the devkit folder
(it should be located at c:\users\yourname\devkit\c2test)

4) Now go to the scblaster demo repo on github.
https://github.com/bubbleboy14/scblaster/
And click on download as ZIP.

5) Unzip the content in the c2test folder. .

6) Export your C2 game to HTML5 standard.
Replace c2test/src/c2runtime.js with the c2runtime.js generated by Construct 2 for your game
Replace everything in c2test/resources/images/ with the image assets from your game
Replace everything in resources/media/ with the audio assets from your game and update the AudioManager in Application.js with the name of your sound files. (You can skip the audio part if you want just a quick performance test on your phone)

7) Return to the git-bash terminal and write

$ cd ./c2test
$ basil serve

8) Open chrome and type http://localhost:9200.
You'll see the GC web interface up and running.
Click on the project c2test and then click to simulate.
Enjoy your simulated app on the simulator.

9) Once you have the simulator up and running you'll probably want to export your game as an android apk.

10) Install the android sdk. The instrucions on GC site are unclear because they refer to the mac version.
Go here :http://developer.android.com/sdk/index.html
Download SDK tools and run the installer.
When the installer has completed it will show you the window you can find here: http://doc.gameclosure.com/native/android-setup.html (Figure : All the checked items are required for android installation.).
Check the required items and then accept the license.

11) Install the android ndk. You can find it here: http://developer.android.com/tools/sdk/ndk/index.html.
Unzip it where you want :-)

12) Set now the android environment paths (following the instructions on the link posted at point 1)

13) Open Git-Bash and type
$ basil install native-android

14) Go to your c2test app folder and edit the manifest.json file to force landscape or portrait orientation and edit the name of your application.

15) Return to Git-Bash
$ cd ./c2test
$ basil debug native-android

16) Go to the folder C:\Users\yourname\devkit\c2test\build\debug\native-android and you'll find the exported apk. Install it on your phone and enjoy a choppy, useless and really irritating version of your game exported with gameclosure! Knifegrinder2013-11-11 17:46:57
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Mon Nov 11, 2013 5:57 pm

I'm just wondering if anyone has tried Intel XDK New yet? I was meant to try it, but I have been in Nam for a while.

The old Intel XDK was grand apart from a black screen glitch, so maybe they have fixed that. It might be worth checking out before getting too involved with GC.
B
28
S
8
G
5
Posts: 429
Reputation: 7,007

Post » Mon Nov 11, 2013 7:15 pm

[QUOTE=Tobye] I'm just wondering if anyone has tried Intel XDK New yet? I was meant to try it, but I have been in Nam for a while.
[/QUOTE]

Just tried. It works on android. Even with directcanvas (now called app game interface) turned on.
Unfortunately the framerate is horrible as ever.
CocoonJS is miles ahead in terms of performance. Despite the bad ads support and the never solved audio bugs it's still the best wrapper out there.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Thu Nov 14, 2013 12:36 pm

for me it didnt work (android phone and tablet), diagonal grey lines again.maybe i did something wrong but if Knifegrinder test it and xdk dissapointed him i dont see any reason to start using it again.
B
18
S
3
G
1
Posts: 248
Reputation: 2,353

Post » Thu Nov 14, 2013 8:11 pm

what do you think Ashley has in mind in the latest Scirra blog post (https://www.scirra.com/blog/129/ideas-for-construct-2s-future under "Improved Android exporting")? Excited to hear what this is about.
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Tue Dec 10, 2013 9:45 am

@Knifegrinder,

I follow your instruction, and working on GaneClosure simulate, but when I checked index.html(file path: MyGameName\build\debug\native-android) file in browser, it working on there and firfox'firbug show me

SyntaxError: illegal character
...te _;return function $$src_c2runtime(){// Generated by Construct 2, the HTML5...

and in browser it show me black screen...............

and I build it for .apk

with the help of this code( basil install native-android).
and run it on my google nexus 5 phone just show splash screen.......... so can you tell me where is the wrong........
B
12
S
2
G
3
Posts: 57
Reputation: 3,439

Post » Wed Dec 11, 2013 12:44 pm

Hi @rob, unfortunately i trashed gc on my pc long time ago so i can't investigate properly your issue.
However i see those "" charachters that make me think that you're having an issue with BOM UTF-8 encoding.
I really don't know how c2runtime.js file is encoded during an export since i never had an issue with it, my empirical suggestion is to open your c2runtime.js file with an advanced text editor (ex. Notepad++) and save it with the Encode as UTF-8 without BOM option.

Here's an explanation of what seems to be your problem.
B
11
S
3
Posts: 224
Reputation: 2,028

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests