How do I Make This Game Run Smoothly

0 favourites
  • 10 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hello,

    I am trying to make a photo slide puzzle game and I have managed to make it work properly on browser but it is working very slow on android device and sometimes the sound plays late it seems like the game is lagging too much. I have exported the game with Intel XDK crosswalk and the fps is always around 58 - 60. I checked it on my Google nexus 7 tablet and it works smooth on it but it doesn't work well on Galaxy S3 and Galaxy S2. Please let me know how do I improve the performance for this game. I had so many plans to work on different games for Android using Construct 2 and the only thing stopping me is the performance of the games on Android platforms.

    Please download the .capx file from this linke: https://www.dropbox.com/s/4uxr7uu09yovg0u/slidephoto.capx?dl=0

    Please help me with it.

    Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The first thing I would do is replace all of your text objects with sprite fonts. You're using a lot of them and they are hard on performance. Also, it looks like you're updating some of them every tick. Instead you should only update them on an event where they would change.

  • Burvey Thank you so much for replying. I will replace the text objects with sprite fonts. Could you please tell me more about this line "Also, it looks like you're updating some of them every tick. Instead you should only update them on an event where they would change."

    Which Layout and Event sheet you you talking about for this please?

    Thank you

  • For example, I'm guessing that you only need your level text to update when you change levels. So instead of updating it every tick like you are now, just change it when your level changes. The same with the level score (time). Currently you're updating it every tick, but you could just update it every second instead and it would be much more performance friendly. Those are both from the Level_1_world sheet.

    Also on the Main event sheet you are saving to webstorage every tick. Is there a way that you can set that up differently (In other words, does it really need to update every tick)?

  • Burvey Thanks for the reply.

    • That every tick on Main event sheet was just for testing it is not needed at all and it wasn't included in the .apk file which I created using Intel XDK so the performance issue was before that.
    • On the Level_1_world event sheet I now realize that the for loops are running every tick and even if it doesn't find true condition it still runs every time.

    I will try to fix that as well as other suggestions you have made.

    Thank you

  • I'm glad you noticed that. I was going to bring up the for each loops after you got the text stuff figured out as not to confuse you. Even better that you noticed it on your own!

  • Burvey

    I have put the for loops under start of layout so they only run once as they are not required to run every tick but just once for the tiles placements in sequence then randomize their positions to start the game.

    Thank you very much, I am almost done with it and then I will export the .apk file to see how it works.

  • Nice! Good luck.

  • Burvey

    I have done everything you have suggested and the game performance was a lot better but still had some lag issues so I exported it for CocoonJS and compiled it using Ludei compiler it seems to work without any performance issues but the only problem I am facing now is the screen size.

    I used the window size to 600 x 800 and used Scale inner which takes a lot of game area out of the window and when I used Letter box scale the things are distorted like they are not on their proper places.

    Please tell me how do I fix this screen size problem?

    Thank you

  • I'm probably not the correct person to help you with that type of issue as I've never ran into it before.

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