ranma's Forum Posts

  • they don't call themselves that, phonegap is a technology name, not company's. both appmobi and nitobi (adobe) uses phonegap technology to create native apps from html5 apps that are exported from construct. construct exports using phonegap technology adjusted to nitobi's (adobe's) phonegap build and NOT appmobi's phonegap xdk.

  • appmobi phonegap xdk also is not the same thing as phonegap :)

    phonegap export is meant for phonegap build service, not appmobi phonegap xdk.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • the signed apk is for testing purposes, you can upload and test it on your device before deployment. the release unsigned.apk is the final application that you will upload to google play store after you signed and aligned it manually (this can be a bit of pain for newbies, but trust me, it's better than automatic signing like appmobi does - you retain the possibility to change cocoonjs to any other library anytime, while with appmobi - you HAVE TO stick with them as you won't be able to update your app).

    as for signing and aligning the apk -> http://wiki.ludei.com/cocoonjs:androidapk

  • just to warn you, the cloud compilation produces android apk requiring users to accept following permissions:

    android.permission.CAMERA

    android.permission.WRITE_EXTERNAL_STORAGE

    android.permission.INTERNET

    android.permission.ACCESS_COARSE_LOCATION

    android.permission.ACCESS_NETWORK_STATE

    android.permission.READ_PHONE_STATE

    android.permission.ACCESS_FINE_LOCATION

    android.permission.VIBRATE

    android.permission.RECEIVE_BOOT_COMPLETED

    don't know how about ios files, but in android's google play store these are a sign NOT to download the game, because a simple game, shouldn't have access to users location, boot completed signal, camera, etc.

    i asked ludei if there could be some kind of control over these permissions though.

  • eldods you are exporting your game from construct using phonegap export - that's why you get error in appmobi. you need to export using "export to appmobi" option from construct2. phonegap IS NOT appmobi.

    the best thing to do would be sharing capx as always.

  • Hey, thanks!

    I just contacted Joe7, so if he implements this change in the original plugin, I don't think there's much sense in listing it in plugins list.

    Cheers

  • if you can't get calljs to work on cocoonjs (and probably direct canvas also), open plugin's runtime.js file and edit it around line 49:

    change this:

    this.nameOfExternalScript = this.properties[0];

              this.returnValue= "";

              var myScriptTag=document.createElement('script');

              myScriptTag.setAttribute("type","text/javascript");

              myScriptTag.setAttribute("src", this.nameOfExternalScript);

              

              if (typeof myScriptTag != "undefined")

                   document.getElementsByTagName("head")[0].appendChild(myScriptTag);

    to this:

    if (typeof this.properties[0] != "undefined" && this.properties[0] != "") {

    this.nameOfExternalScript = this.properties[0];

              this.returnValue= "";

              var myScriptTag=document.createElement('script');

              myScriptTag.setAttribute("type","text/javascript");

              myScriptTag.setAttribute("src", this.nameOfExternalScript);

              

              if (typeof myScriptTag != "undefined")

                   document.getElementsByTagName("head")[0].appendChild(myScriptTag);

    }

    and it should work, but remember to clear the plugin's Scriptfile property (it must be empty for it to work with cocoonjs). this change should be done in original plugin also to prevent creating empty <script> tag.

    hope I helped anyone :)

  • if containers would help, and if they are on todo list, that's enough for me :)

    cheers.

  • well yea, but every way is kinda messy, and this new addition would make things very clear I think :)

  • yea, but the thing is, say, I have a sprite with 100 pinned objects to it, and i want to destroy all of them when sprite is destroyed - ergo 100 instance variables? :) there are messy and could be easily dropped with this "compare uid" condition, also, there's "pick by uid" condition which is similar, but other way around, right?

  • it would be super helpful if I could compare objects' UIDs.

    imagine you have a sprite "foo" and sprite "bar" pinned to "foo" and you want to destroy "bar" on "foo" destroyed. currently thr only ways to do that is to store "bar"'s UID in "foo"'s instance variable "barsuid":

    on foo destroyed

    pick bar by uid = foo.barsuid

    -- destroy bar

    or to loop through all "bar"'s on destroying "foo":

    on foo destroyed

    • for every bar
    • system->compare (bar.pinned_object_uid == foo.uid)

    --> destroy bar

    this addition would change not so much, but it would be clearer:

    on foo destroyed

    foo.uid == bar.pinned_object_uid

    --> destroy bar

    hope it would not be too much to ask :)

  • for some reason search failed when I tried to find an original calljs plugin, so new thread.

    if you can't get calljs to work on cocoonjs (and probably direct canvas also), open plugin's runtime.js file and edit it around line 49:

    change this:

    this.nameOfExternalScript = this.properties[0];
              this.returnValue= "";
              var myScriptTag=document.createElement('script');
              myScriptTag.setAttribute("type","text/javascript");
              myScriptTag.setAttribute("src", this.nameOfExternalScript);
              
              if (typeof myScriptTag != "undefined")
                   document.getElementsByTagName("head")[0].appendChild(myScriptTag);

    to this:

    if (typeof this.properties[0] != "undefined" && this.properties[0] != "") {
    this.nameOfExternalScript = this.properties[0];
              this.returnValue= "";
              var myScriptTag=document.createElement('script');
              myScriptTag.setAttribute("type","text/javascript");
              myScriptTag.setAttribute("src", this.nameOfExternalScript);
              
              if (typeof myScriptTag != "undefined")
                   document.getElementsByTagName("head")[0].appendChild(myScriptTag);
    }
    

    and it should work, but remember to clear the plugin's Scriptfile property (it must be empty for it to work with cocoonjs). this change should be done in original plugin also to prevent creating empty <script> tag.

    hope I helped anyone :)

  • calljs doesnt seem to work with cocoonjs, simply inserting a calljs plugin to game will make your game not load in cocoonjs launcher.

  • since the numbers on my previous post are actually quite out of date, shameless bragging: fishing actually got 152,872 total downloads while being installed on about 28,000 devices in its peak day, which had actually a jump from 15,000 to 28,000 in 24 hours.

    I wish everyone of you the same success and first of all, I wish you to have the same amount of fun I had while creating the game and while watching the number of downloads rise :)

  • well my screen actualy has accelerometer, but only left and right (cannot be upside down - what a pity :D) so on some screens it would work, but i don't really think it's large enough target :D

    anyway, the success of this "game" is something I never expected and it was a real shocker to me, because games that I put much more effort in, had lower downloads and plays, so... don't really know what to think of this :)