Hello Im very new to this so I don't even know what this process is called exactly. Im posting image of flappy bird here in which it consist all the objects day, night, birds, font etc Here : enter image description here

So how to use them in 2D game? this is just example i have used. How to manipulate different objects at different coordinates ? Thanks.


2 Answers 2


"A texture atlas is a large image containing a collection, or "atlas", of sub-images" - So basicly since we have sub images we will need sub rectangles.

Depending on what you want to do, the engine you use you would use this in diferent sections.

For example, in my engine I do something like this

MyTexture.Draw(Position,SubRect,Texture ,(...));

SubRect is the section of the atlas I want , My Atlas is 100*100 I want the the piece that stays at (50,50) and is 10 Width and 10 Height, So my sub rect is equal to (50,50,10,10). this says to my engine to "slice" that part and render it a Position coordinate.

From the look of your answers you need to learn a few things before. You lack knowledge on game design.

Either way, adressing your second question,

To manipulate each sprite as independent object, you would have a abstraction class called GameObject in my case, which has a Sprite associated.

So when I loop through my objects and draw them I actually Draw the Inner Sprite at the Object position, this way I can do what i want with my Objects and they will be aligned to their sprites.

Hope this helps!


That would be called a sprite sheet/texture atlas. Your game would have objects and might have textures that all reference the same image but specify different locations. So when you go to render them, you simply load the same image, while drawing a different portion of the image. This is done differently in different frameworks/engines/platforms/etc.

  • \$\begingroup\$ How to use them? Using coordinates or something else? Im thinking to use them in android. \$\endgroup\$ Commented Jun 9, 2014 at 5:19
  • \$\begingroup\$ You would have to read more into general game design with sprites before trying to use a spritesheet. \$\endgroup\$
    – CobaltHex
    Commented Jun 9, 2014 at 6:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .