3
\$\begingroup\$

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?

\$\endgroup\$
4
  • \$\begingroup\$ 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? \$\endgroup\$
    – House
    Jul 30, 2012 at 0:12
  • \$\begingroup\$ It's correct, It was just the closest tag that I needed, that was all. \$\endgroup\$
    – Rivasa
    Jul 30, 2012 at 0:14
  • \$\begingroup\$ 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? \$\endgroup\$
    – House
    Jul 30, 2012 at 0:16
  • \$\begingroup\$ The latter. Just in game \$\endgroup\$
    – Rivasa
    Jul 30, 2012 at 0:17

1 Answer 1

7
\$\begingroup\$

An entity is a 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 seeing. 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.

\$\endgroup\$
3
  • \$\begingroup\$ wow, that clears it up, can you give an example of how an entity cannot have a sprite? \$\endgroup\$
    – Rivasa
    Jul 30, 2012 at 0:12
  • \$\begingroup\$ @TheEliteNoob: See my edit. \$\endgroup\$ Jul 30, 2012 at 0:14
  • \$\begingroup\$ Ah, so I can use it for scrolling? Or maybe portals and such? \$\endgroup\$
    – Rivasa
    Jul 30, 2012 at 0:16

You must log in to answer this question.

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