Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Well I was looking at a few game based tutorials, as well as articles. I found out about two terms:

Entities and Sprites. Now they seem related but different, what is each and how are they the same and/or different?

I have some basic ideas already:

  1. An entity is an item/thing/object/person any object that can be interacted with in the world.

  2. A sprite is like an entity, but usually for NPCs/players/monsters.

  3. Or a sprite can be the name of a picture assigned to a specific entity.

Do I have the right idea or are sprites and entities something completely different?

share|improve this question
    
I was going to remove the entity-system tag, because it seems like you're not talking about entities in that sense. Is that correct? –  Byte56 Jul 30 '12 at 0:12
    
It's correct, It was just the closest tag that I needed, that was all. –  Link Jul 30 '12 at 0:14
    
Oh, I misread your comment. You are talking about entities in entity component systems? Or you're just talking about entities/characters/guys/objects in game? –  Byte56 Jul 30 '12 at 0:16
    
The latter. Just in game –  Link Jul 30 '12 at 0:17

1 Answer 1

up vote 5 down vote accepted

An entity is thing which exists in the world that is not represented by terrain. Entities generally have a position in the world, collision with the terrain and/or other entities, etc.

A sprite is a 2D bitmap that is drawn to the screen somewhere. Entities can have sprites, but they don't have to (in which case, they generally aren't drawn), but sprites cannot have entities. A sprite is purely a visual construct.

Sprites do not even have to be associated with entities at all. Particle systems, which are usually just visual fluff (ie: don't have gameplay effects) will generate one or more sprites.

In short, you need a separation between what is happening in terms of the game and what the player is watching. The player sees sprites, while the gameplay code deals with entities and collision regions.

Sprite-less entities are often used for just their collision-detection properties. That is, you place an entity somewhere in the world and set something to happen when the player or something else touches their collision region. This lets you know when the player has reached a location or something.

share|improve this answer
    
wow, that clears it up, can you give an example of how an entity cannot have a sprite? –  Link Jul 30 '12 at 0:12
    
@TheEliteNoob: See my edit. –  Nicol Bolas Jul 30 '12 at 0:14
    
Ah, so I can use it for scrolling? Or maybe portals and such? –  Link Jul 30 '12 at 0:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.