Android and Memory Usage

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
PiFace
Prole
Posts: 28
Joined: Mon Sep 05, 2016 5:35 pm
Location: Brazil

Android and Memory Usage

Post by PiFace »

I'm intending to try out using Löve for Android but I have a question about memory usage. I opened Löve with no game loaded and checked the task manager on my computer and it said about 30MB of memory was being used. That is beyond the regular limit for android devices, right? But does that value represent what happens when the game runs on android? If it's different, how can I check the amount of memory the game would use on a phone?

Right now I'm downloading the android tools for Löve. My connection is very slow, so while I wait, I decided to ask.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Android and Memory Usage

Post by raidho36 »

Most of the memory is consumed by hooked up libraries, such as OpenGL. It of course depends on implementation, it could be a lot smaller on Android. You can always use build flags to disable some modules you wouldn't need, that will reduce the amount of machine code generated, amount of libraries hooked up, and amount of memory taken up by metadata. Either way it's not relevant, most of your game memory footprint will be graphics and sounds. It's super easy to create a game that takes absurd amounts of memory, you'll quickly find out you need to take very deliberate steps to reduce the amount of memory it requires. You can check the amount of memory an app takes in the "installed apps" settings menu, where "running" and "cached" tabs should be. To me, the nogame screen takes 30-something megabytes. My phone has 2 GB of memory though.
User avatar
PiFace
Prole
Posts: 28
Joined: Mon Sep 05, 2016 5:35 pm
Location: Brazil

Re: Android and Memory Usage

Post by PiFace »

This app is like a helper for a table RPG I play with some friends, so it only contains images (a lot of them though) and ~maybe~ some sounds will be added. Putting those images together as an atlas (that's the name right?) and later use as quads would help?

Anyway, I should test the 'game' on my phone as soon as the downloads finish, that's the only way to know for sure...
Last edited by PiFace on Fri Dec 23, 2016 7:11 pm, edited 1 time in total.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Android and Memory Usage

Post by raidho36 »

Individual texture objects don't have significant memory overhead, and lack of those will be offset by memory overhead from quads. Using atlas is a measure to improve performance through reducing number of draw calls - one is issued each time you switch current texture, if you use atlas you never switch texture.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests