Discussion about game on mobile

0 favourites
From the Asset Store
A simple fun and stylish endless scroller game ready to be customized and published.
  • I open this topic in hope that people who made/are making game on mobile devices share their experience together.

    Let me start first, I just finish building a simple game on mobile devices. Targeting tablets.

    The game is a 2 player vs game, which each player control a character, collecting "coins"; harassing opponents while doing it.

    Behavior use in this game:

    1) 8 directional movement (just for using the solid behavior)

    2) Touch, for controls

    3) Bullet movement for a lot of stuffs.

    4) Solid behavior

    Thoughts at this stage (I am testing on friends device now)

    1) It is hard to work with multi-touch on construct 2 (or I just suck).

    Week was spent on this forum just to find a better way of working with it, without much help from the community sadly. (Thats why to those few who help, I am extremely thankful.)

    2) Supporting multiple screen size is a pain in the

    I created two type of layout, 4:3 and 16:10. So that I could accommodate this two main aspect ratio (the game load by choosing the layout ratio that are nearest to the expect ratio, [I haven't test if I've successfully implemented it])

    2) The performance across different device is really obvious!

    I own an ipad 2 and a huawei U8800, and which it ran 50-60 at my ipad2, it is unplayable on my phone. (not unexpected).

    But! Galaxy SII seems to handle the game okay (playable but unenjoyable)

    Galaxy Tab(7 inch 1st gen),

    Galaxy Tab 10.1(1st gen), was sloow,

    Asus Eepad(Not transformer) handles it slow too (but faster than tab 7.)

    still waiting on result on tab 2 7inch.

    This makes me wonder, what game can be made for mobile game? is the only way of doing it is either - game that can play in low FPS?

                              - very very very simple game? (because my game is very simple and it don't work)

    But how does those game on ios and android that are so much more sophisticate works...?

    Discussion on performance:

    1) Recently, I heard someone say 8 directional kills performance on mobile device.

    I need the 8 directional behavior for my player to react to solid, but I did switch the option from "8 direction" to "up and down". I think my ipad run 5fps quicker. Or was this just placebo effect i don't know.

    2)Is invisible object on the layer slow performance?

    I am not sure about this but I "destroy" everything on layers that are not using, and only spawn them when needed.

    This decrease the object count from 100 to 70. Not sure if it affects performance though.

    Please do pardon my poor english. =)

  • 1 - I made multitouch easier to work with by placing a sprite at each touch location and checking for collisions with those.

    2 - That's a problem not specific to construct 2. I set positions of the ui based upon the viewport edges expressions, then resize the browser window in preview to make sure it looks good at lots of different ratios.

    3 - different devices have different amounts of processing power and optimization for HTML5. The same device, if the carriers would allow people to upgrade the operating system, often could run HTML5 faster. It something developers, not just c2 developers, have do deal with. Some devices just can't handle it.

    Previewing on a device over lan generally results in the game running slower than if you actually export to HTML5 and upload it to a server, though, as the preview code has a lot of checks in it that the exported code doesn't have. Also have you tried cocoonjs or appmobi's directcanvas? Those can accelerate mobile games as well.

    4 - I haven't tried it, but if it does, you can easily recreate it in events. You might want to make a test to check if it does or not.

    5 - Invisible objects can slow the performance of the game, as though they are not rendered, they are still processed by the game's code and taken into account when doing things like checking for collisions.

  • I haven't developed far enough, but Arima's point 1 is super important. When dealing with any long term touch your far better off using a sprite. Even at 1x1.

    Sprite with Drag and Drop behaviour.(don't put this D&D into a folder for sorting)

    On Touch -> dragbox set position to touch.x touch.y

    if your only doing a button then no worries.

    Anyways that's my experience :

  • I'm developing a simple-fun arcade game for the kindle fire.

    1. If you are using cocoonjs, do not use too many tiled backgrounds! After trial and error, i found out that was the biggest performance hinder. Not sure if CocoonJS needs to optimize tiled backgrounds.

    2. The accelerometer is not working on the kindle fire, using cocoonjs. I get no data out of it. I checked all the expressions, and the only one that fires is touch.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. If you are using cocoonjs, do not use too many tiled backgrounds! After trial and error, i found out that was the biggest performance hinder. Not sure if CocoonJS needs to optimize tiled backgrounds.

    This defies everything I've read about mobile device development, surprising to hear!

    I have many single tile sprites imported as tileable background objects rather than sprites objects in an attempt to plan for a mobile platform.

    Can Ashley or ludei weigh in? That a single tileable background object is or is not more resource intensive than a single sprite object?

  • This defies everything I've read about mobile device development, surprising to hear!

    I only meant it using the kindle fire with cocoonjs. Sprites are technically slower then tiled background, but this is not the case it seems on the first gen, kindle.

    I have to just bite the bullet and sacrifice some textures for performance. Or, Ash could do a native android/ios exporter... ;)

  • Arima

    I use cocoonjs, it was simply the fastest.

    As some of you may know, I was obsessing about creating a touch control for 2 player.

    I've tried:

    1)Drag and drop behaviour as the control thumb-> but I ditch the idea because it needs the player regrab the stick everytime it was let go.

    2)Trigger. ->It works but for the trigger, I created 40 instance for 2 players! Not to mention that it doesn't move perfectly, the object count just.. wow.

    So, I end up with

    Touch.xat(0)and touch,yat is within "a range"----set playerbox movement from "self.x,self.y to touch.xat(0), touch.yat(0).

    Then repeat it for touch.xat(1),(2),(3) up to (5).

    It works perfectly, at least I haven't have any nasty surprise.

    I adjusted to aspect ratio the same way as Arima said. Viewportright(0)/viewportbottom(0). and compare if it is nearer to 3:4 or 10:16, and load the layout accordingly.

    But somehow it works on some phone but not on others. I am suspecting that, while dimension of phone is calculated in portrait, it was calculated in landscape in tablet.

    That's why I made abit of modification on my code. Just haven't test it out.

    Another issue that I was encountering is, in some devices, when your game stretches, it was blocked by the phone's status bar.

    In other word, the game scale, and stretches UNDER the status bar, instead of UPTO the status bar.

    I don't see myself solving the problem.


    Today I try out my game on tab 2 7.0, it is slow, looks like a design overhaul is needed. SAD.

  • PixelPalette

    Thanks for sharing~!

    This is exactly the type of information I was hoping for when I started this post XDD

  • Turns out that I was not aware that I could make my game frame rate independent!

    I was also surprised to know that movies actually have their frame rate set at 24 fps!

    After making my game frame rate independent, I'm sure it is playable from most of the tablets on the market.

    But now I wonder, is viewportright and viewportbottom really able to "read" the resolution of the device?

    Or there is other expression for that(resolution of devices)?

  • I'm a little biased towards making iOS games instead of Android because of problem number 2.

    I was a little disappointed when I heard the iPhone 5 would have a different screen size and hence different aspect ratio. But trying games with the wider screen out, I realized how much better it was.

    With Android, I would just stretch it xD

  • I've been seeing pretty decent results using preview on lan on my iPad 2. Between 30-35 frames per second. I had done some preliminary testing with xcode back when I started the project and everything seemed to be running well. I was actually expecting even better performance once I compiled out to a mobile device.

    Well this last week I started compiling with xcode only to discover that my project is only running at 3-4 fps once compiled. It runs the same in the simulator. What really gets me is that I can open the exported project directly on my Mac and I get a whopping 67fps.

    I've tried both phonegap and building a project from scratch using uiwebview. Both gave about the same results.

    Updated info below!!! 12-9-2012

  • Thunder I dont understand?you compile your game with which compiler?

    You mean, preview on Lan ->30-35fps

    Compiled game on ipad 2 ->3-4fps

    compiled game run on pc simulator ->3-4fps

    game run on Mac ->67fps?

    P.S.:I always find testing in cocoonjs launcher more accurate than preview on Lan.

  • Phonegap has no hardware acceleration, so it's unsurprising that the performance was so bad. Try cocoonjs or appmobi's direct canvas instead.

  • 1. If you are using cocoonjs, do not use too many tiled backgrounds! After trial and error, i found out that was the biggest performance hinder. Not sure if CocoonJS needs to optimize tiled backgrounds.

    Glad to see someone else has this problem too. I hope they get it fixed soon, I'm still using Sprites where Tiled Backgrounds would be much more efficient because it reduced my FPS.

  • ZhaoYun

    I was using xcode on a Mac to compile for iOS. The fps numbers in your reply are what I'm seeing.


    Yeah I knew that Phonegap doesn't use any hardware acceleration. After doing some research I found that xcode doesn't have access to Nitro JavaScript like the standard Safari does. So you will see a performance difference over a compiled app versus a web app that runs in a browser. You won't see the benefits of Nitro in a compiled app that uses uiwebview.

    I did some testing with the CocoonJS Launcher app and seen improvement in speed. But unfortunately I've went from 3-4 fps to 14-20 fps, which is still to slow to be playable.

    This isn't the first game I've ever created, and don't think I'm doing anything unusual. I guess the first game I ever modded was Doom running under Dos. Back when Windows was just a business program that you started from the command prompt.

    I've tried to keep everything optimized, graphics, audio, and code. My current Cocoon export is around 8 megabytes.

    Updated info below!!! 12-9-2012

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)