Home Game Development What precisely are sprites and entities and what are the variations between the 2?

What precisely are sprites and entities and what are the variations between the 2?

0
What precisely are sprites and entities and what are the variations between the 2?

[ad_1]

An entity is a factor which exists on this planet that’s not represented by terrain. Entities typically have a place on this planet, collision with the terrain and/or different entities, and many others.

A sprite is a 2D bitmap that’s drawn to the display someplace. Entities can have sprites, however they do not should (through which case, they often aren’t drawn), however sprites can not have entities. A sprite is only a visible assemble.

Sprites don’t even have to be related to entities in any respect. Particle methods, that are often simply visible fluff (ie: haven’t got gameplay results) will generate a number of sprites.

In brief, you want a separation between what is going on by way of the sport and what the participant is seeing. The participant sees sprites, whereas the gameplay code offers with entities and collision areas.

Sprite-less entities are sometimes used for simply their collision-detection properties. That is, you place an entity someplace on this planet and set one thing to occur when the participant or one thing else touches their collision area. This lets you already know when the participant has reached a location or one thing.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here