Ainxty's Forum Posts

  • Insignia

    I've been able to get the back button to work in some of my games, but not others. I don't know if this is an XDK issue, because I can always get the back button to work in jquery mobile apps I write and export with the XDK.

    Of course despite all the above issues, it's still arguably the best platform to export with.

  • Just do if (touching falling sprite) +0.. since you only want to subtract one, you're already subtracting one from the background. If you want to add 1 point for touching something else, go +2 to that object. I guess just offset everything by -1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Should probably include some instructions on how to play.

  • Please reduce the size. It's a pretty significant increase. I wonder if it'd be possible to just include components you need during the build process (letting users select prior). Something similar to where you ask for permissions - maybe for permissions that aren't included don't include those packages in the build? Not sure if that's feasible..

  • All things considered, I've had a fair amount of issues with the crosswalk wrapper. Back button binding doesn't work, CPU utilization jumps (not a game logic issue, even a 10 event game burns battery), home button hard crashes the app, window button works, but when you go back to the app it can sometimes hang, and other times the sound cuts out. There are also issues with script minification (though, there issues with that in regular HTML5 export as well) and gamepad support doesn't work (using r161) on Android. At least, I haven't been able to get it to work with an Xbox360, or a PS3 controller hooked up to my N10. Obviously a limited testing environment, but still...

    I think I might hold off on deploying to the Play Store until the wrapper is a bit more stable. Don't want 1-stars because the wrapper keeps crashing :(

    Oh, also, exported app (pre-crosswalk) 18mb. Installed app on phone, 58mb - what?

  • I've successfully compiled a fairly large game (over 500 assets, 820 events) with Crosswalk and pushed it to my device without any issues. One thing I noticed is that large (2mb) audio tracks do not load right away. They appear to pre-load sort of like what you'd expect to see in a hosted game (despite them being already loaded on the device). I did move the music back to the Sound folder instead of Music as I did the same with Windows 8 and it was fine. Apparently not the case here.

    RenatoB I had this issue when I had an apostrophe in my app name. I also had this issue when I tried to compile with a version number without a period. It does not seem to necessarily have anything to do with 'Assets'.

  • TiAm: Yeah that was exactly the issue. I should go to sleep, brain not working at full capacity :<

  • Oh hey I figured it out too. I'll post my solution though for anyone that searches for this exact same issue:

    1. create a global variable (gvar) you're going to count up

    Object on created > Add 1 to gvar

    System gvar >= total number of expected objects

    -->System pick a random Object instance + Trigger Once > Object (destroy, or do whatever to it)

    In my case it looks like this:

    <img src="https://dl.dropboxusercontent.com/u/29061450/construct2/pickrandomfire.jpg" border="0" />

  • How did you get it to work? I'm trying something similar and it keeps selecting all the objects. I have...

    On created

    > System Pick a random Object instance

        > Trigger Once > Object Set Opacity to 10

    Doesn't work. I tried putting the Trigger Once everywhere, inside the parent condition any outside and all over the place to no avail.

  • I'm not exactly sure what to report. How is the Silent command in C2 executed in JS?

    I thought maybe tacking on a comment on your bug (280161) would suffice.

    I've gotten around this for now by turning the music into audio since they're theoretically the same thing on a mobile device.

  • It seems to be a Chromium bug I guess more so than C2's audio plugin. It's buggy when using Intel XDK or CocoonJS too. Works just fine in Firefox on all my devices running various versions of Android.

  • Link to .capx file (required! If link is blocked remove the http and www parts):

    dl.dropboxusercontent.com/u/29061450/construct2/audio_mobile_chrome.capx

    hosted to test: ainxty.com/temp/audiobug

    Steps to reproduce:

    1. Load page in mobile chrome

    2. Press play to initiate music

    3. Try to mute music with button

    Observed result:

    Music does not become muted. Sound does become muted.

    Expected result:

    Mute music and sound.

    Browsers affected:

    Chrome: yes, 32.0.1700.99 (or any previous version dating back a couple months)

    Firefox: no

    Internet Explorer: no idea

    Operating system & service pack:

    Android 4.4.2, Nexus 5, Nexus 10

    Android 4.3, Samsung Galaxy S2

    Construct 2 version:

    r158

  • After a bit more tinkering I was able to import the json into an array without Construct 2 exploding. However, now I have this:

    <img src="https://dl.dropboxusercontent.com/u/29061450/construct2/array_data.jpg" border="0">

    Here's the capx.

    Almost there I think...

  • Hi,

    I've been working with C2 for a couple weeks now. Yesterday I ran into an issue trying to parse a JSON file into an array. It works fine with the Dictionary object, but I don't seem to be able to get the formatting right with an Array. Now, I already read through this thread:

    scirra.com/forum/use-custom-jsOn-to-array_topic66542.html

    But I'm not trying to parse "pure" JSON and I have access and ability to modify the JSON file. Here's the code I'm using (with some irrelevant data):

    <?php
    header("Access-Control-Allow-Origin: *");
    
    $name = 'Ainx';
    $level = 3;
    $experience = 56;
    $gold = 244;
    
    //Build 2nd dimension
    $arr_names = array('name' => $name);
    $arr_levels = array('level' => $level);
    $arr_experiences = array('experience' => $experience);
    $arr_golds = array('gold' => $gold);
    
    //Build 1st dimension
    $arr_data = array($arr_names, $arr_levels, $arr_experiences, $arr_golds);
    
    //Build c2array
    $arr = array('c2array' => TRUE, 'size' => array(4, 2, 1), 'data' => $arr7);
    
    echo json_encode($arr);
    ?>
    

    The code prints fine and I can parse and retrieve it with .getAjax and so on... I can also retrieve that in C2, but when I try to put it into a C2 array, it does nothing. Am I building this array incorrectly? I included C2 specific tags.

    Here's the example php file above.

    Using a dictionary works:

    $dic_data = array('name' => $name, 'level' => $level, 'experience' => $experience, 'gold' => $gold);
    $dic = array('c2dictionary' => TRUE, 'data' => $dic_data);
    

    I'm able to import that into a dictionary in C2 without a hitch, but I'd like to be able to use arrays, because Dictionary is a tad too primitive for what I need. I thought about using two Dictionaries instead when I couldn't get the array to work, but that's a bit silly...

    I'm using the AJAX Request, AJAX On completed and Array Load events; all the basic AJAX/Array stuff covered in the tutorials and the manual on the site. I think the issue is with how I'm formatting PHP which now that I think about it might not be for this forum :<

    Any help would be appreciated.