Jump to content

  • Log In with Google      Sign In   
  • Create Account


What is the difference between "Entity" and "Sprite"?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#21 EWClay   Members   -  Reputation: 659

Like
1Likes
Like

Posted 05 February 2013 - 05:48 PM

For me, Entity is the top level thing, and it contains components, among them perhaps a sprite.

The sprite is rendered because the sprite component registers it with the graphics subsystem.

Similarly, an event listening component could register to receive events. But what I actually do is push the events out, because I know which entities need input.

Sponsor:

#22 nimrodson   Members   -  Reputation: 275

Like
0Likes
Like

Posted 09 February 2013 - 06:37 PM

So, in conclusion: Game object = (could be?) = entity + sprite.



#23 MrDaaark   Members   -  Reputation: 3551

Like
0Likes
Like

Posted 10 February 2013 - 12:38 AM

Yes, that or whatever works best for your purposes.

There is no 100% catch all answers for things like this, because programming allows you to organize your data any way you like.

Figure out how your game is going to work. Then you'll know what data you need to keep track of, and how you'll need to organize and process it.

A GameObject class will then consist of anything you know you'll need. Then an entity will also consist of anything the logic will need to see. It might even be an abstract class with different versions that do different things.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS