Building a game for mobile devices - what do I need to know for the basics?

0 favourites
  • 10 posts
From the Asset Store
The Device
$4.20 USD
30% off
A futuristic device, can be used as radarscreen, optionscreen, infodisplay, research device, ...
  • Hi hi!

    Thanks to our great community here I've been able to build a few games and I'm planning to build a mobile game for the first time - an endless runner game.

    I would be very happy if you could share your rich experience with me about what basic things I need to know - and mainly:

    - How do I make my screen fit different devices? I read the guide at this address - construct.net/en/tutorials/supporting-multiple-screen-17 - but it's from 2017, is it still relevant? Are there new and better ways? This, I admit, is one of my main problems...

    Which aspect ratio is better to choose? 16:9?

    - How do I put my game on Google Play? There's a tutorial here https://www.construct.net/en/tutorials/publish-mobile-apps-26 but it's from 2018, it's super old...maybe there's something updated?

    It's the second things that mainly worry me at the moment, I'm sure I'll have some outstanding questions, but right now I want to research the issue in depth before I dive in and not find out that I worked and then I have to spend hours and hours to fix things....

    I thank you very much!! Thank you!

    Tagged:

  • Hello dev friend!

    As someone also planning to do mobile games too (after 101 PC games in HTML5 format)(for my ultimate life personal project. which will only reveal in a few months), I did my test and research too.

    So, your first question is one of the most important. The screen is responsive. The tutorial you showed us is PERFECT. I tried it for a big WIP game and doing the viewport as 1920 x 1080 (with a layout view of 1024 x 768 with ScrollTo tho) the result is good enough for an HD responsive game. Tips: Be sure your sprites are looking nice when small, will be useful later. Trust me.

    About Google Play, I will be honest with you, I never tried. However, I got asked the same question on an indie game dev platform by a young dev (maybe after looking at my games catalogue). Here is the video I tell him to watch:

    youtube.com/watch

    I know I know, this is GDevelop and NOT Construct 3. However, I did a timestamp in the link to show you how to add your exported game to Google Play (assuming Construct 3 uses the same standard APK files for Google Play as intended).

    Don't forget to watch some tutorials or documentation about Touch Object (for mobile input) and Browser Object (if you need to lock the screen rotation or other mobile settings needed).

    If any more questions, I will be glad to reply. Have a nice day!

  • The documentation for adding your exported app to the Google Play Store is all available on Google side and is easy to follow.

  • Documentation and a YouTube video. What asking more? Thanks lionz.

  • Yes from 4:37 on that video should help.

  • 16:9 is the most common aspect ratio on mobiles but a lot of manufacturers are going wider. My preferred way of going about this is scale inner/outer depending on the game. Expand your backgrounds about 20% wider than your viewport and you'll cover most odd resolutions that Xiaomi (in particular) like to use.

    Compress every image/sprite whenever you add one to the game! Need to keep that package size down, and it helps with performance on lower end devices. It'll save you hours of work in the long run.

    Don't over complicate things or it won't run well on old devices - or at all. I have a huge 70% crash rate or ANR rate on Android 8/9 due to the amount that's going on in one of my games - even with a low performance button (disables lighting, shadows, effects etc) the game can be very choppy on lower end devices (even if they are modern).

  • One thing to know before coding is that Android games with Construct are limited to 100MB

  • 100MB? I didn't knew that :o

    Good to know!

  • We can use .AAB to upload into the Play Console at a max size of 150mb. After that, you need to add an OBB file for the remaining content. I assume you'd have to create this in Android Studio and would probably require a lot of additional work that's not documented on C3.

    So anything over 150mb, you can't simply export from C3 ready for a roll out on the Play Console.

    I had to do a lot of optimising and remove 8 languages (they were built with sprites so took up a fair few mb) to get under the 150mb for a re release of one of my games. Just compress all of your sprites and hope for the best!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ALWAYS test your game on 3 different devices (low/medium/high specs). This might seem obvious but is not. For testing, I mean installing the app from the store. Preview mode gets close to the real specs, but sometimes the app runs slight different from the app (for Android). If you do not test the game and you do not apply good practice regarding events, you will hit a huge wall that will force you to rebuild the whole game. I'm saying that because I hit that wall. The game I was working on years ago would run 60fps per second on my old laptop. On my phone, was not playable, because it was extremely laggy. The suggestions below apply to any game, however, you might skip some of the steps if the game you make is really simple. So, these steps are the ones I'm taking when making a complex/big game.

    This is how I improved my games, to make sure they would run fine on mobile:

    - Always test several event logic on a separate project, and check for the best performance. Ask the forum if you might think there is a better way to achieve what you are looking for. Someone else might already encounter the same problem.

    - Use overlapping and on-collision when is REALLY needed, otherwise, use distance.

    Avoid physics if you can replicate it using events or scripts.

    - Do not make a frame bigger than 200px if possible (in the animation tool).

    - Use groups to organize your events. For example, if you are making donkey kong country, you might want to organize the code as follow:

    - Group events regarding the barrel launch

    - Group events regarding item

    - Group events regarding specific enemies

    - For platform 2d, I find out in my case that tilemap would work less efficiently than using tiledbg, here is more info: https://www.construct.net/en/forum/construct-3/general-discussion-7/mesh-distortion-editor-155675

    Once you have the groups, enable/disable them based on when they are needed. For example, you might want to enable the group barrel launch when the barrel is on screen, and disable it as soon is not in use.

    - It extremely helps to set a really small viewport size and use the scale view. I have noticed a huge increase in performance and the graphic still looks good.

    - Set downscaling quality to Low. I do not notice a huge difference with the medium downscaling.

    - Once you are happy with the results, start stressing your game by adding hundreds or thousands of objects to see what is the limit.

    From my test projects, I was able to run a Donkey Kong Country remake on low-spec devices (like an iPhone 5s), at 60fps per second. My current game, which is pretty complex (like a mix of Super Mario World and Donkey Kong Country) with additional features, such as items inventory, dynamic light, dynamic weather...etc., runs at 60fps on low specs.

    Before using the techniques above, the game I'm working on, with a simple graphic, fewer layers, no weather/light, no items, no effects, or no complex events, was running extremely badly on the iPhone 6, lower than 35fps even if the level was really small compared to the huge levels I can make now (with over 3500 objects per level vs the 75 objects).

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