Why big image cause Lag?

Watch this Video first please: https://www.youtube.com/watch?v=CL2pHtZrGYs
i have a bunch of 1920x 1080 size object, (Most of the Object art Aren’t an actual size of 1920x1080 pixel)
Some of the object are Hidden at the beginning of the game, and it will be show after certain event in the game, now i just noticed how heavy it is to show 10 object with 1920x1080 p Size.

as the Video Shown, the FPs was 30 then Turn into 60 after i hide all of those 10 Object.
Now Question is, how to improve Perfomance of my game without having to remove or hide the Object, i want it to stay 60. should i crop the Image Instead?

1 Like

Can you make new scene put in it your images and text object to show FPS and add only logic to show/hide your images and check does that lag?

Sorry for the late Reply but i did what you said its still cause Lag, from 30 fps to 60fps after hide the Image.
Here’s The Vid:https://www.youtube.com/watch?v=O9UAiG8znyA
What Should i do? is the image too big?

Do the images need to be that large? Can you reduce them?

Here’s a link to the GDevelop wiki recommends a maximum image size of 512x512.

If the images must be 1920x1090, then you can chop up your large image into smaller images and load those separately. So going with the max 512x512, cut up your 1920x1080 into 12 images (3 rows of 4 images, so each is 480x360). Sure it’s a little bit of extra work, but that’s all part and parcel of game development and it should help with the performance.

ah ok, i really need to know if large image cause lag. it need to be large but i’ll try to chop it, Thank You for Your Time Guys!

I am over 3 years here and i never seen any1 got any FPS drop for using large images
I am literally clueless why it happens to you
I was thinking maybe was issue with your scene but no since it happens on new scene also
Last thing to check would be new project
But that will tell if its issue with your original project and not tell us why it happens

1 Like

Wait… there’s a fundamental issue here.

Rendering an image at a higher resolution definitely requires more power than rendering one at a lower resolution,otherwise, 4K graphics cards wouldn’t exist. The same applies to 3D textures.

But it’s not just about resolution; the “physical” size matters too.
Loading a 2K image that’s 1 MB is less demanding than loading one that’s 4 MB.

The lag might not even be noticeable… but it’s there, and when it becomes too much, you start to feel it.

Hi @RACTS, just out of curiosity, can you tell us the specs of your computer?

my Spec is:
Intel I3 Gen 3
6b of ram
Nvidia Gt 610
1 ssd
1 psu
1motherboard

Btw i chopped the image and now game run better, Thanks guys!
if you guys have something to tell dont mind to tell.

1 Like

A. The GT 610 is not supported by current versions of WebGL, meaning you are likely viewing games using the canvas renderer which is going to be exceptionally slower overall in many cases.

B.The largest ram version of the Gt 610 was 1gb

Textures are loaded uncompressed into GPU ram.

A single 1920x1080 texture is 1920x1080x4 bytes, or roughly 6mb for a single texture.

If your objects have multiple frames, that is 6mb per frame. It can add up very quick, and the each image will be fully loaded into memory if even a single pixel is in frame.

That said it is much more likely A, you basically have a GPU not really capable of some of the more modern rendering tech (WebGL2) used by the engine.

4 Likes

ah i see, that make sense why my game was so laggy. i don’t know about this, btw sorry for not reading this first, somehow i didnt get the notification. Thank You!
i have changed the frame size for my asset, now it way smoother!

1 Like