Need know about sprites.

Hello,
Can you explain how many sprites can insert on the game(1 sprite got 40 frames)? :confused:
I got a lot of sprites, i hope it didn’t effect the performance.

Hello,

It’s hard to know how much, it’s all about the final scene. Your performance will depend on your hardware, on game engine you use (native or html5 ?), on the dimension of your images (width/Height/optimization), the size of the files… And all other objects, events, and the way you are using it. There is no “hard limit” on number of sprites from what i know, it’s just a matter of feeling.

During a development, always focus on performance and optimization from the start. Also ask yourself why using so much images in a sprite ? Maybe the animation can be smooth enough with less images ?

HI! in my game i use over 100 frames for my main character and ech enemy had like 20-30 and im not having to much issues whit it but yes the engine has a limit when u reach it the escene start to crashing whit no reason i put the boss battles on diferent escenes whitout enemies to prevent this crashes.

Not sure if it a limitation of the engine . When it comes to number of sprites the biggest limitation is memory of the device, in case the device run out of memory, the game will crash. In case you want to target devices with low memory, you might want to consider using smaller and less images. Also, I would recommend to use sprite sheets to reduce loading time but unfortunately it is not supported in GDevelop but in case GDevelop might get the feature one day or you decide to move on to an other engine, it is also something you might want to consider. Can make a huge different in loading time when the engine need to make a single call to load 50 sprites or 50 calls to load them all one by one.

Im 90% sure its not a literally a limitation (cant correctly articulate my sentences cuz my lack of english srry) of the engine, i guess its more a memory problem whit Gdevelop or something cuz if im working for example in Level 1 then open level 2 the bigest esprites dont load correctly (just load a white square) then i try open properties of and objet or something the gdevelop crashes,i need to restar Gdevelop every time i need to work on another escene (need to say im using sprites arround 300px * 300px for enemies and stuff, backgrounds over 3000px and some bosses arround 1000px and over 400 sprites per scene ) but if i compile the game run just well, the problem its just in the editor, but i want to stick to gdevelop a bit more its not perfect but i really like this engine :slight_smile: