Sprites in game programming, several files against one "texture"?

Forgive me if my jargon is wrong, as I am new to game programming. I looked at some open source projects and noticed that some sprites are split into several files, all of which are grouped together to make the 2d object look like an animation. This is straight. Then I will see a different approach when the 2d object is all in one png file or something similar, everything is next to each other.

Is there an advantage to using one approach to another? Should sprites be in separate files? Why are they sometimes all on one sheet?

+3
source share
3 answers

, , , .

, , u, v . u, v , , , ( ) . , , , .

+15

, , ( , . , , . , , 0.

, , . , , . , , , ( ).

, , . ( , ..), , , - , .

+5

- , (256, 512, 1024,...). , , , , . .

, HD, . - , , , . , .

, . OpenGL , . , . , , , , , . , , . , . , , , , UV- , , .

+2
source

Source: https://habr.com/ru/post/1718148/


All Articles