I have made my first game, apart From optimization which I haven’t done, game is lagging extremely ,barely unplayable in mobile, not in mine but most of others!!!
It’s a small 25mb game, single level!!!
So I will do optimization and will upload again,but here is question
Apart From optimizations can I export it via phone gap or Cordova does it improves performance on mobile
I hv read cocoon.io improves performance like too much but it’s discontinued so would phone gap or Cordova will do the job…auto android export is cool but way to laggy for mobile
Indeed and that’s why the optimization is VERY important on mobile.
When an PC have a graphic card with vram and ram, the mobile have just a little bit of ram…
In my experience with mobile, the simplest and most effective way of maintaining performance is to use resolutions less than 1280x720. I use 960x540 most of the time with sprites multiplied by 2. ( I do not experience reduce in quality of image when using 960x540 resolution.)
I have tried it with removing all particles, bit good but lags painfully on mobiles below and around 2GB of ram,…
so I m now thinking is Gdevelop even compatible for mobile games???
What is point in removing everything I mean particles etc , my resolution is around 1280-720 , removed particles and it’s Very basic game,I wonder if its a little complex game ,would it even run on any mobile I wonder???
Not sure what your code looks like but make sure your using the trigger once command so that the game isn’t creating objects over and over slowing the game down. I know this is a common problem. Hope you figure it out.
Too many objects on the scene; every instance if an I next has to be rendered, take more ram than anything else and take extra steps In The game loop (object specific ones and behavior ones). Try to limit the number of I stances if possible.
Abusive usage of for each object event; When using that event, the time used by each condition is multiplied by the number of objects. Only use it if you really need it and only for the event you need it for.
Abusive usage of conditions; Checking a condition is a time consuming process as it also affects object selection. Sub events allow to limit the number of conditions. Example:
If player is moving and right is pressed change animation to right
If player is moving and left is pressed change animation to left
Could be optimized into
If player is moving {
If right is pressed change animation to right
If left is pressed change animation to left
}
Usage of very graphical features; those often need complicated and long computation. Example: layer effects, particles, tweens etc.
Deleting is not the way to go. Optimizing is. Try to also use lower resolution assets (every additional pixel take some more time to draw) and compressing them (for faster loading), change your code to be more efficient, and limit visual effects
Yes it is but mobile games need lots of optimization as they are way more limited in performance. GDevelop itself currently is more focused on portability and stability by using the Javascript programming language over c++ which is faster, so it needs more optimizing than other platforms, but if we were still using c++ you would maybe not even be able to port your game to phones.
The video logo might be doing something, especially if the video hasn’t stopped and it’s still playing (or looping) in the background when the game is being played. That would be a resource hog.
Another guess… if you have large image files that are being scaled down, I believe GD does the scaling calculations for every frame of the game. So a large (for example 1 megabyte, 1280 x 720) image file that is scaled into a small sprite (say 100 x 100) on the game screen, you could resize the image in a paint program first and then import it back into GD. The file size could go down to like 100k and GD won’t have to do such large scaling calculations.
Thanks a lot everyone for such support its incredible , i am uploading my game folder ,anyone if want to test it,can test it out , i have made few more adjustments,there is gdevelop file inside of it ,i would like to know more of my errors so i wont repeat them in future!!!Its merely 18 mb zip
I put a post above that you didn’t read.
Because when I open the project I see lot of image of 1080px in an animation, it’s just huge for mobile, no wonder your game malfunctioning.
As mentioned above it looks like some of the images should be reduced in size. Especially the ones over a megabyte, but probably other ones too. And I’m not sure if this would improve the mobile performance but you could also try to delete the intro before the game starts in case it’s taking up ram…