0plus1's Forum Posts

  • I tried this method and it lowers the fps of my game, making me think that it's a little taxing for the browser.

    If you are using PhoneGap this is the best method for audio as it uses the internal iPhone audio library.

    scirra.com/tutorials/283/phonegap-low-latency-audio

  • It's not true that PhoneGap cannot be used for games, not only that but it's currently the only way to have Game Center support on iOS as well as iAds and IAP.

    The problem is the online building service. To reach decent (and I stress decent) you have to compile everything by yourself and edit some of the PhoneGap code for optimization, with the online build service this is not possible and result in unsitable packages.

    I'm about to publish the game I made with c2 with PhoneGap only because both CoocoonJS and AppMobi are incomplete products, it is possible but it requires extensive knowledge of xCode if publishing for iOS or Eclipse for Android.

    My dream would be that Ashley could edit PhoneGap (leaving all the good things such as plugins intact) to work with DirectCanvas that could really be the beginning of something great.

    If I'll ever be able to finish this game I'll publish a tutorial for optimizing PhoneGap.

    To potential developers, do not dismiss PhoneGap.

  • The more you know.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley you should considering adding a condition to count the number of fingers on the screen (aka number of touches) there is a plugin that already do this it would be nice to have the official version ;.)

  • I believe you are speaking for android?

    I'm using 2.0 on iOS and it's exactly the same, sound and music never worked well on PhoneGap.

    Ashley, please please keep supporting PhoneGap, I'm polishing my new game and I'm at 28fps stable with 80 objects on screen, optimizing for PhoneGap it's absolutely possible if you are willing to delve into the PhoneGap (Cordova) code!

  • Hi Ashley, thanks, I was just searching for a way to test without having to export, and in the end I found the variable in the "Setting" array, so no problem.

    Still it would be nice to have a way to "switch" off retina mode based on the device (iPhone/iPad)

  • ramones, thanks that seems like a nice solution.

  • Thanks

    I understood the issue, but I'm stuck at making it work right.

    Here is a capx with the exact same logic as my game: dl.dropbox.com/u/1606950/helpme.capx .

    What I need is to check if the cloud is colliding with the blue bar and destroy ONLY the one which is colliding, not all of them like now. The problem is that I don't know how to pick that correct instance.

    If there is another solution it's more than welcome, I need the scrolly because it increases performance tenfold on mobile.

    Thanks to everybody that could help me.

  • Hi mrsponkie,

    as a fellow italian user I'll spend some word about this issue.

    I'm the only one to have an app (not properly a game, more an education tool) on the appstore made with c2 (link)link, I'm also in the process of finishing another game.

    That being said, since the last time something has changed, code has been optimized for mobile and there is (finally) an option for having retina graphics.

    That being said we are still a long way to achieve decent performance. My latest game ha been optimized to insane levels, and still I get fps drops that go as low as 5 (from steady 30fps), all this with phonegap.

    I find that the issue with mobile here is that Ashley is betting on AppMobi and CoocoonJS that are both canvas accelerator (and work very well in that regard), the problem is that AppMobi is pushing its own services (so no plugins) and CoocoonJS is having clearly problems to get published on the appstore, and still a long way from an online building service. In the end it's a good commercial choice because most of the people here do not have a mac and don't want to fiddle with code, but this will limit c2 games to unprofessional games, as for example there is no support for game center in neither of those solution, while with phonegap (compiled by you with plugins) is currently possible.

    As I see it, as of today, if you want to publish a professional game on the appstore (with gamecenter, iAP, iADS and modern monetization solution) the ONLY way is to use PhoneGap in xCode, and you have to get your hand dirty in code to optimize PhoneGap a little. I mantain that PhoneGap is the way to go as the sourcecode is publicly available and there is a lot of room for customization, if someone could add DirectCanvas support to phonegap we could have a real mobile solution.

  • Bump please, I'm really lost here.

  • I fear that there is no other way than using the admob api for android and phonegap. Use this as a starting point: wiki.phonegap.com/w/page/51172827/HOW%20TO%3a%20Add%20admob%20ads%20to%20your%20phonegap%20application

  • In an attempt to optimize my game, I decided to scroll an entire layer (setting the other layers parallax to 0) which contains sprite that moves in sync. The problem is that while touch still works, every collision with object that are on the other layers doesn't get detected.

    I imagine has something to do with the coordinates that are now desynced, is there any way to fix this?

    Thanks

  • I found how to switch the modes through code and I found out two interesting facts with phonegap

    1) Retina mode on iPhone actually improves performance by around 5fps in my game!

    2) Retina mode on iPad kills performance on an ipad3 with retina on 1fps retina off 20-30fps!!!!!

    Which brings me to ask, is there any way to programmatically switch off retina based on the device we are using?

  • Thanks but that wasn't my question.

    I just would like to know how Ashley handles the retina option.

    Thanks :-)

  • Ashley

    How is the retina option being achieved, with this: target-densitydpi=device-dpi or in the actual code?

    With tons of effort I was able to reach around 30fps in phonegap on the iPhone, the iPad instead can't handle it in retina mode (the ipad3 has too much pixel density) can you tell me what are you doing to handle this retina stuff so I can play in Xcode without having to compile everytime?

    Thank you