Maybe the memory usage increase unexpected (Memory leak).
Maybe some object is active and hidden.
Maybe some unnecessary calculation.
Maybe ... i don't know
You should monitor lua memory and texture memory and fps
1- do not use large texture
2- reuse objects if its possible (thank you ar2rsawseen)
3- monitor fps, lua memory, texture memory (attached)
4- make sure removed objects are really deleted (object = nil)
5- preload all texture on scen…
There are two types of memory:
1- like Hard disc memory
2- like RAM memory
APK size is type 1.
for example if a 1024*1024 pixel image file consume 200KB in type 1 memory then if will be 4*1024*1024 = 4MB in type 2 memory.
Don't worry about animating Sprites. Do it by Movieclip Class(OpenGL and native code =very fast)
Don't worry about using Gideros functions(Like setX(),getX(),...) (Lau and native code = fast)
Just worry about using a lot of Calculation in …
this my solution:
1- choose a resolution for your base design (example: 600*800 for PORTRAIT)
2- write this: application:setLogicalDimensions(600, 800)
3- use letterbox mode for Scaling
4- write this: application:setScaleMode("letter…
local function onKeyDown(event)
local function onKeyUp(event)
if event.keyCode == KeyCode.BACK then
----- Your function
if your game is not so huge, you can use this method:
1- create 3 class background, player, foregoround
background = gideros.class(Sprite)
player = gideros.class(Sprite)
foreground = gideros.class(Sprite)
2- add all game objects to classes(ba…