Android game lags - how to optimize?

Like this :


The raycast is only performed for the enemies within 650 pixels of the player that are not already on alert.

1 Like

Thank you. I will do that.

purely out of curiosity, I deleted everything from the raycast.
after that i did the export for Android.
but game again lags without raycast.
therefore raycast is not a problem…

i have done a screen record, please see:

when I move, occasionally lags in the same way like before

what could the problem be ?

Thank you

That’s not lag. A lag is a slow down or a pause in the display. What’s in the video appears to be a bit jerky, like it’s correcting or taken a jump in camera movement.

How are you moving the player - platformer behaviour, or a set number of pixels per frame?

1 Like

ok. here is the info:

Thank you

Those code snippets doesn’t appear to have anything that could be causing the jerkiness.

Do you position the camera on the player as one of the last events, so it occurs after the player placement has been done?

1 Like

At this moment camera event is almost at beginning of scene.
but it is after player animations.

what can i check also ?

also are this settings ok ?

Thank you

anyone please


thank you

I read your question correctly and I told it to my elder brother. He is a game develper and I have shared it with my friends. As soon as I get the best answer, I will tell you here Android game lags - how to optimize? - #11 by Kylenkennett10elo

1 Like

Thank you

I really appreciate it

Try different devices and try different exports, but don’t try duplicate topics.
The game Vai Julietta had a similar issue, I believe. Check if/how it was fixed.

Is this topic: Apply Force performance Issue - #46 by IttaloXD

If yes, i dont see a solution.

I tried on different devices, and the problem stays.


i have asked on some other places, and one user told me this:

In my experience this is because of half pixel coordinates.

so my question is:

What is half pixel coordinates

How to fix it

Thank you

Better ask whoever told you this. :thinking:
This is an example of sub-pixel coordinates:

Can you share a liluo build of your game?


i can share my files. but you need to test it on Android smartphone.
because my game has only problems on smartphone.
as on computer works normally.
if you can test it on smartphone, please tell me
and i will send you download link

I meant you could share a web export, not the whole project, but either way, yes, I have an Android to test it.

1 Like

ok. i have sent you msg with download link

thank you

Unfortunately, I’m unable to notice any issue on my own mobile phone. :confused:
It’s very smooth, both as apk and in network preview.

Did you eventually find the culprit to the performance issue you were having with your Vai Julietta game? I suspect @bundyboy is having the same problem.

1 Like


i don’t understand how that’s possible. i have tried on two different phones (Galaxy A52 and Realme 6), and on both phones it is the same problem.

so you have walk with player from side to another, and you passed by the green house ?

the house didn’t shake for a second?

can you make a screen record video on your phone, so that i can compare it with my.

Thank you

Yes, I did like you did, move left and right past the two houses several times, and it’s smooth.
I don’t have video record, and I don’t see the point.
My screen is small, and I’m on Android 9, maybe that’s why. :person_shrugging:

1 Like


then I’ll finish the game, so I hope it will be ok.

but it’s very strange that it works normally for you, but not for me on two different devices.

thank you