Difference between sprite and texture?

user5622430 picture user5622430 · Jan 3, 2016 · Viewed 13.6k times · Source

Can you please explain the difference between texture and sprite? When we zoom in a sprite, it appears blurry because it's basically an image. Is it the same for a texture?

I read this comment on the image below online:

The background layers are textures and not sprites.

enter image description here

Can someone explain?

Answer

Cyxo picture Cyxo · Jan 3, 2016

Sprites and Textures are both images.

A Sprite is an image that can be used as a 2d object, which have coordinates (x, y) and which you can move, destroy or create during the game.

A Texture is also an image, but that will be used to change the appearence of an object. E.g. you can set a texture for the faces of a cube, a layer (like the background) or even a sprite. But as texture are not objects, you can't move them during the game.