Sign in to follow this  
hspirdal

Clarifications on a few terms

Recommended Posts

hspirdal    218
Hi all! Could any of you clarify the following dev terms for me?
  • Entity
  • Actor
I've always thought of 'entity' as some sort of life form, i.e.: a human being, a plant, the Zerg Overmind (starcraft) etc. I've not looked at it as a lifeless object, like a rock. Wikipedia tells me that an entity in game programming is:
Quote:
In computer games and game engines, entity is a dynamic object such as a non-player character or item.
By the quote, I guess that I'm wrong in my previous assumptions, and entity is just really an object, life form or not. To me, this sounds like a GameObject. Is there any significant difference? Would an actor be what I confused entity with, being all life forms in a game? I.e.: Player character, NPC, enemies, wildlife et cetera. Anyhow, thanks for the clarifications. I’ve wondered about this for some time, and I don’t want to confuse other developers more than necessary with English not being my primary language!

Share this post


Link to post
Share on other sites
mrbastard    1577
It depends completely on the engine in question - actor and entity are not standardised terms.

In my experience it's common for actor and entity to be fairly synonymous, and to refer to things that have both a visual representation and behaviour.

Share this post


Link to post
Share on other sites
hspirdal    218
If I understand you correctly, these two often overlap each other, depending on the views of the developer. You say it often has a graphical appearance, as well as a behavior, so I guess both a sword and a in game character would be of this type. So what makes this different from the parent GameObject? A tile object would have a graphical appearance, but not a behavior in my opinion.

In my system, I plan to make everything game oriented inherit from the GameObject class. A sample architecture:

GameObject

  • TileObject (everything landscape oriented with support for animation (water moving, windmill rotating etc)

  • Entity (items and lifeless objects)

  • Actor (Any life form)


The children of GameObject will be sub classed further. I guess for instance buildings in TileObject could have its own derived class. Entity could be derived into weapon, armor, potion etc, and actor would have AnimatedSprite, PC, NPC, monster and so forth.

Share this post


Link to post
Share on other sites
Ezbez    1164
You seem to be dealing with something very specific. Are you modding a game or something? If so, tell us what game and we might be able to give you actual, concrete responses. As it is, those are just names with some connotations that many developers use. Certainly not all developers have them be the same things. Sometimes, "Entity" has no parent "GameObject" class. Sometimes, "Actor" derives from "Entity", sometimes there is neither "Actor" nor "Entity" nor "GameObject". Sometimes (perhaps most commonly) there's just one.

Now, an "Actor" can also refer to this.

Share this post


Link to post
Share on other sites
hspirdal    218
Ezbez, I'm currently developing a tile based 2D RPG, where I try to implement a reusable system which could easily be transfered into an RTS for later. So far, I've basic sprite movement, tile drawing, area change, character interaction and all the very basic things you would expect. Before I continue on, I want to refactor my system to be more robust and easier to manage. I've also developed a prototype collision system where I can define rectangle or circle bounds (in various sizes) for every game object in place.

Edit:
So I guess I want to abstract the various objects into parent categories that makes sense and seems like a clean abstraction based on classic developer logic. Before I start refactoring, I'd like to have a clear idea, drawing the architecture out in UML.

Share this post


Link to post
Share on other sites
jyk    2094
As has been mentioned, these are not standardized terms; it's really up to you to define them in a way that you find meaningful.

It sounds to me as if you're trying to establish an inheritance hierarchy of some sort for your game entities - is that correct? If so, I recommend that before you commit to this, you do some research on component-based entity systems (if you haven't already).

Personally, I've found the component-based approach to be far more maintainable, reusable, and extensible than an inheritance-based architecture.

Share this post


Link to post
Share on other sites
hspirdal    218
You are correct in assuming I'm trying to establish this based on inheritance, jyk. I'm definitly going to follow your advice and research my other alternatives!

I think I have most of my answers here, thanks for the replies guys, and if anyone has something to add, that would be great as well!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this