Draimond's Recent Forum Activity

  • If you can figure it out then I'm sure the Intel XDK gives you a lot more control and power.

    I wish that me and the Intel kit clicked, but I think my brain just isn't wired for it.

    I'm sold on the no fuss approach of using cocoon.io, especially considering the level of support for C2 users on their forums.

  • Creating the google account is easy, (cost $20 or something).

    As for cocoon.js, it's cocoon.io now, and after they got the bugs out, it's better then ever!

    I managed to get my game on the play store finally! (Drift Cross).

    I've decided on my preferred way of getting games outa C2 and onto the Play Store:

    step 1) uninstall intel xdk and never look back!

    step 2) use cocoon.io which now handles signing! just upload unsigned, config settings, auto sign and compile!

    step 3) upload signed apk to google play!

    .. although I still haven't made my free version with ads yet.

    I've seen a few posts about getting ads working and there's a few things you have to enable in cocoon.io

    By the way, the cocoon forums are great, they've put a tonne of effort into accommodating us C2 users.

    I really don't want to discourage anyone from having a go.

    It's been a very painful process, but if I could go back in time I would do it all again (and wait for cocoon.io to come out first).

    The thing that really threw me was that I was trying to publish during a period where things were in transition and buggy. (plus frustration and lack of sleep)

    That and the Intel XDK and Java DK suck... did a year ago, still do today. I duno what kind of brain you have to be able to understand those kits, but I'm sure it's nothing short of a bachelor degree combined with caffeine induced mental distortion. Sorry but they're just bad.

    If you came to C2 because of it's low coding, object oriented system and don't know how to code like 1337 god... stick with cocoon.io

    Regarding Monaca, I havn't used it but I noticed you get 3 apps with the free account, combine that with Cocoon's 2 and you can work with 5 apps at once, maybe you can cycle out apps that arn't getting worked on and free up a spot for a new one.

    To think it was meant to be a quick, "just get something really simple published" and move on... 1 year later.

    At least I know what I'm in for if I do it again.

  • I'm really glad too see that I'm not alone in this, thank you every for replying and adding to this thread. It's done a lot for my sanity

    I'm going to go back to basics and make a "hello world" app and see if I can get it from C2 to Google Play. I desperately need to know I can do this.

    I will document everything and post it on here. If all goes well that should be done by 15/2/16

    UPDATE:

    I the process of creating the hello world app I found a few documents and a guide video specifically for compiling with Cocoon.io

    Their documentation is great. I wish this was around 6 months ago. I'd highly recommend running through this video.

    http://docs.cocoon.io/article/publishing-a-construct-2-game-in-android/

    http://docs.cocoon.io/article-category/construct2/

    Since running through this stuff I got my app running on my phone first go, what a relief!

    In fact I'm at the point now where I'm considering uninstalling all the excess java rubbish, all the misc SDK's I downloaded and even the Intel XDK!!!

    Cocoon have a stand alone key signer too.

    https://shatter-box.com/knowledgebase/android-apk-signing-tool-apk-signer/

    I'm now back to being a 100% supporter of Cocoon, sorry for ever doubting. Looks like they just hit a transitional rough spot, but they're back to being the best method. Pending further headaches, I'd say This post is solved?

    Just create a Cocoon account, download the latest Java and the apk signing tool, get a google play dev account and use the Cocoon plugins for C2.

  • How do you use AJAX POST to change the contents of a file on your web server?

    I've been looking through various topics trying to find out how to word a POST request correctly but I'm still unsure. There's some great examples out there but I'm not sure how to translate the examples into something I can use for my project.

    I want to write to a text file hosted on a web server.

    My project is hosted on the same web server.

    The data I want to overwrite the text file with is an array.

    The text file has write permissions enabled.

    I am able to "GET" the data from the text file and update my array.

    I am unable to update / upload data to the text file

    Sorry for not including a capx, probably not relevant seeing as none of this works in preview anyway. <-[solved]

    My code looks this this:

    Button_Download On clicked = AJAX request "http://www.mysite.com/data.txt" (tag "getdata")

    AJAX on "getdata" completed = Array Load from JSON string AJAX.LastData

    Button_Upload On clicked = AJAX Send Array.AsJSON to URL "http://www.mysite.com/data.txt" (method "POST", tag "savedata")

    I think the Data field needs to be written in query string form. I don't know how to do that or what that means.

    So for "data to post" it should be some php stuff around the Array.AsJSON ?

    Am i ment to have a php file somewhere?

    Just to be clear, I'm not trying to send pieces of data, I want the whole array being uploaded and downloaded.

    EDIT

    I'm continuing to research this while I wait for a reply.

    I've found some great info that will help others trying to figure this stuff out.

    What I've learned - May or may not be correct

    • If your setting up a project that uses AJAX to work with your website, your probably going to need to learn a little about PHP and setup a PHP file in your web hosting directory (eg. where your website is hosted). I don't think the AJAX Page in the manual makes this very clear.
    • To get AJAX stuff to work in preview you need to use "header('Access-Control-Allow-Origin: *');" Which is great... but how do you use it that line of code? Does it go in the C2 project somewhere? Once again, not abundantly clear to beginners like myself.

    Turns out, you put a PHP file on your website, eg anyfilename.PHP and you put this code in that file:

    <?php
        header('Access-Control-Allow-Origin: *');
    ?>[/code:2v957n1b]
    [b]UPDATE[/b]
    [b]I think I got it working![/b]
    I've ended up with a text file called "mydata.txt" and a PHP file called "myphp.PHP".
    [ul][li] The text file holds the data that I upload and download.[/li]
    [li]The PHP file acts as an intermediary controller facilitating my C2 projects interaction with the text file![/li][/ul]
    [code:2v957n1b]<?php
    header('Access-Control-Allow-Origin: *');
    
    /* GET */
    $data = $_GET['data'];
    file_get_contents("data.txt", $data);
    echo ( file_get_contents("data.txt", $data) );
    
    /* POST */
    $data = $_POST['data'];
    file_put_contents("data.txt", $data);
    echo ( file_get_contents("data.txt", $data) );
    ?>
    [/code:2v957n1b]
    [b]AJAX Request URL ( The GET function )[/b]
    Tag = anything
    URL = the url to your PHP file - "[i]http://www.mysite.com/data.php[/i]"
    [b]AJAX Post to URL ( The POST function )[/b]
    Tag = anything
    URL = the url to your PHP file - "[i]http://www.mysite.com/data.php[/i]"
    Data = "data="&TextBox.Text - [b]This is one of the main issues I had[/b]
    [ul] [li] "data="  < this is the Query String Form mentioned in C2 [/li]
    [li] data just refers to where data is written in the php file, 
    so it can be anything but [b]must [/b]correlate to whats in the php file![/li]
    [li] &TextBox.Text is the object I used to collect data to test with,
    It can be anything you like though, e.g. Array.AsJSON or a global variable etc[/li][/ul]Method = "POST"
    
    Keep in mind that I googled my way to finding this method without really understanding the technical aspect of what I'm doing. I've seen some really awesome technical stuff along the way that I have no idea how to achieve. The way I've done this is likely not the best way of doing it. But it worked, which is a big milestone for me as a beginner. 
    
    I'm keen to hear any extra explanation as to the correct process and any features or improvements that can be implemented.
    
      
    For some reason when I GET the data, i receive it fine, but it wipes the data from the text file!
    Can anyone see what went wrong with the PHP code?
    
    [img="https://photos-4.dropbox.com/t/2/AAAFqGWpWvvDQgOoQnYlswdu8GAjg30e5IqIq0O0izfU8w/12/213776830/jpeg/32x32/1/_/1/2/ajax%20code.jpg/ENOiiqEBGF0gBygH/OMzzwMjRVNN3fEIcawnxXDhcj2zj-2L5_pEqS0Vqh3c?size_mode=5"]
  • black screen is because of plugin its does not support ...conconjs plugin also give black screen

    Would be nice if it told you which plugin was breaking the app.

    furthermore, it would be nice if the cordova plugin (made by some random) was free or native to construct...

    Can't even add a "close app" feature from within C2 without third party addons! Microsoft / Intel won't ever make a cordova plugin.

    The simplicity of Construct is ruined by the arduous and perplexing process of publishing to Android.

    I have been using C2 for years now and have a paid licence... To be honest, it looks like Construct is simply not viable for use in publishing to android. PLEASE prove me wrong, I would worship anyone who could show a clear cut procedure.

  • Awesome, ty, donated

  • well I suppose that's the trade off isn't it... If you want "real time" in C2 games that can run offline then your subject to cheating. Otherwise the game must be 100% online, as you said.

    could always have some anti cheat e.g. "current time is more then a month greater then previous time = reset game". But no I don't actually think that would help.

    As for unix plugins or just plugins in general, I'm having a hard time getting past the Intel XDK's create app button. Keeps telling me my plugins are wrong and I can't for the life of me figure out why... all I did was update the xdk, app hasn't changed. So based on those issues.. I feel even less confident to proceed with the "real time" app.

  • I was trying to keep it broad because the main question was:

    What process are people using to get from A to B, Construct 2 to Google Play.

    I got a top scrolling race game which is in beta on google play (but it's not working) and a plethora of other projects I haven't taken further because my flagship app hasn't successfully been completed.

    All the compiling services have been getting updates faster then people can make guides for them. In turn the guides are becoming less relevant.

    There are now so many ways of compiling, signing and zip aligning and thus there are tones of possible combinations of apk finalizing methods.

    Is there a sweet spot? Is there a combination that yeilds predictable results that's user friendly?

    I'm not a pro developer, I just figured out how to use construct over the course of about a year or so. The compiling services however, seem to be tailored to a more dev savvy user base, which I don't think is your average licenced construct user.

    I'll try and answer some of my own questions for the benefit of the public.

    Intel XDK

    I really like this program. I feel like it has more potential then the other services provided you put some solid time into learning it. When I first used Intel XDK it was very daunting and hand to pick up and understand. The tutorials were mostly for different versions then the one I downloaded on that day. The UI has changed a fair bit, important buttons and functionality aren't where they used to be, as seen in the tutorials.

    Once you do manage to become simi-familiar though, things start to get better. The preview on your phone feature is awesome and the game looks like it's meant to when viewed on a android device.

    HOWEVER, I havn't been able to compile anything with XDK for the last few versions. It just sits at "uploading project" with no indication of progress. I've left it for a whole day with no result, however the CPU usage shows that it is doing something?!

    Even if you don't have this issue or can get around it, you still get no real progress indicator, whether your downloading an update or uploading your project.

    Cocoon.JS

    The old Cocoon system worked. You had to push the right buttons and select the right options for it to spit out a working app, but when you did, it really did "just work". RIP

    Cocoon.IO

    The new system for cocoon that is currently replacing .JS.

    Recently tried to get it to compile my app. 9 out of 10 attempts I got the "Black Screen" known bug. There's a few fixes that require you to change physics engine and a couple lines of code manually, but despite doing that, I still got a black screen 9 out of 10 attempts.

    The one attempt that did work was ugly. Fonts looked odd and had scaled weird and were out of position.

    Looked extremely unprofessional. I don't know if a fix exists, I imagine I'd get told it's inherit to the process.

    Either way, conclusion is that you cannot expect your app to look the same on android as it does in C2 preview...

    Signs and ZipAligns your APK for you!!! you have to provide your own keystore.

    Adobe PhoneGap

    I put about an hour into this and either didn't get a working result after compiling or got a weird result. Can't comment to much here because of limited experience.

    KeyStore - Signing - ZipAligning

    This was a painful experience for a noob to be undertaking... -_-

    I hate this part so much. Download an old version of java (which u need an oracle business account to get!) because the new ones don't work. I can't remeber what else I had to download at this point, think I ended up with 3 versions of Java XDK, Android XDK, Intel XDK and something else... ALL JUST TO SIGN THE BLOODY THING!

    When doing it manually, save a notepad doc of EVERYTHING you do.

    I used notepad ++, (shift, ctrl,right click to get cmd in the location required)

    There's a tiny program floating around somewhere that can do all this rubbish for you. It's less then a few MB!

    Advanced+ApkTool+v4.1.0+By+BDFreak

    First dozen times I tried to do this I went through the entire process (with a miserably slow net speed) just to keep getting told by google that my apk wasn't zip aligned correctly or something. Days... not just hours..

    So yeh I'm not having fun

  • Hey guys, I'm looking for user feedback as to the best method of getting a game out of Construct 2 and onto the Google Play Store.

    I've tried using the Intel XDK, Cocoon.js and the new Cocoon.io. By far the Cocoon.js was the best experience I've had with publishing, having said that I still don't have a finished, bug free game on the Play Store. Having issues no matter what way I go.

    It would be amazing if i could just press a button and C2 popped out an apk that looked and played the same as what I get in the C2 preview!!!

    Alas, all the methods I've tried have given me multiple headaches.

    I bought C2 personal with hopes of getting a foot in the door to amateur android development and publishing.

    I have limited knowledge but i google everything I don't understand until I understand it.. or my head hurts too much to absorb new information.

    I feel like I'm so close to publishing my app but I just can't get a decent working apk for the life of me.

    I really need some guidance, I've put a good 6 months into this one app and I'd hate for it to all be for nothing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just tried using Browser Close in my Android Game, compiled using the new Cocoo webview+ and it doesn't work.

  • changed to wallclocktime insted over add to count ever x seconds, works well.

    int(Scores.At(Scores.CurX)/60000) & "." & int(((Scores.At(Scores.CurX)/10) - ((int((Scores.At(Scores.CurX)/10)/6000))*6000))/100) & "." & (Scores.At(Scores.CurX)/10) - ((int(Scores.At(Scores.CurX)/1000))*100)

    Set | Scores to | (int(Text_Timer_Min.Text)*60000) + (int(Text_Timer_Sec.Text)*1000) + (int(Text_Timer_Mil.Text)*10)

    Set | Play_Time to | wallclocktime - Menu_Time

    Still need a reliable unix addon that works in android for progress over time games

  • Every X Seconds | Spawn Enemy & set next X to int(random(1,6))

    so for Every X Seconds you use a global variable, I'll call it xRandomSeconds

    Every "xRandomSeconds" do

    1) Spawn your enemies

    2) System | set "xRandomSeconds" to int(random(1,6)) - now you have a new interval for the next spawn

Draimond's avatar

Draimond

Member since 19 Mar, 2014

None one is following Draimond yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies