Any difference between "actor" and "entity?"
Moderator: Moderators
- GradualGames
- Posts: 1106
- Joined: Sun Nov 09, 2008 9:18 pm
- Location: Pennsylvania, USA
- Contact:
Any difference between "actor" and "entity?"
I picked up the term "entity" from a fellow nesdev member some years ago and it stuck. Everything that has its own update logic every frame is called an "entity" in my engines, there is no distinction. They have flags for whether they draw or not and their behavior and interaction and so on is entirely up to the implementation of a given entity.
However I've seen folks in other game development websites distinguish entity from actor in certain ways, but in the end it appears to be an entirely arbitrary choice.
However I've seen folks in other game development websites distinguish entity from actor in certain ways, but in the end it appears to be an entirely arbitrary choice.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Any difference between "actor" and "entity?"
In game development context these are arbitrary terms. If you're going to distinguish them youd have to explicitly define them. (Outside of game development, entity and actor do have different meanings, though.)
Actor, Entity, Pawn, Object, Character, Bob, etc. game engines have a name for the base class of their interactable "things".
In my current game I call everything a "Dog".
Actor, Entity, Pawn, Object, Character, Bob, etc. game engines have a name for the base class of their interactable "things".
In my current game I call everything a "Dog".
- GradualGames
- Posts: 1106
- Joined: Sun Nov 09, 2008 9:18 pm
- Location: Pennsylvania, USA
- Contact:
Re: Any difference between "actor" and "entity?"
Why not "lizard?" Haha. I remember your KS update referring to them as "dogs," and I thought: "directed object graph?" No, that can't be right... *edit* what does Bob mean.. "base object?" Haha.rainwarrior wrote:In game development context these are arbitrary terms. If you're going to distinguish them youd have to explicitly define them. (Outside of game development, entity and actor do have different meanings, though.)
Actor, Entity, Pawn, Object, Character, Bob, etc. game engines have a name for the base class of their interactable "things".
In my current game I call everything a "Dog".
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Any difference between "actor" and "entity?"
"Dog" doesn't have any acronymic meaning in my game. It's just the word I've chosen. Partly I just wanted it to be short, because I'd be typing it a lot. (There is a "lizard" for the player but it's not a subclass of "dog".)
I saw "bob" in some game engine once but I forget where. On the Amiga there was a "bob" that meant "blitter object" that has a similar meaning to "sprite", so perhaps it was building on that idea, but it also doesn't really have to mean anything.
I saw "bob" in some game engine once but I forget where. On the Amiga there was a "bob" that meant "blitter object" that has a similar meaning to "sprite", so perhaps it was building on that idea, but it also doesn't really have to mean anything.
- GradualGames
- Posts: 1106
- Joined: Sun Nov 09, 2008 9:18 pm
- Location: Pennsylvania, USA
- Contact:
Re: Any difference between "actor" and "entity?"
So your update logic for the player is entirely separate from your dog system? This was interesting to me because for my first two games, the main character(s) were entirely separate from the entity system, however in my current game I chose to make the main character part of the entity system itself---it's just always the first one spawned. I'm not certain there is any particular benefit to doing it differently this time except maybe one or two fewer jsr's in the main loop. Plus it shares various bits of plumbing with the rest of the entity system this time around (i.e. animation system based on structures of arrays, in previous engines I had two parallel animation systems...so now I have less code to maintain.)rainwarrior wrote: (There is a "lizard" for the player but it's not a subclass of "dog".)
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Any difference between "actor" and "entity?"
That's a very situational question. Sometimes it makes a lot of sense to do that, and sometimes not. A lot of times it doesn't really matter much either way. ...and there are also lots of ways to share code between things without them being the same "class".
The way you choose prioritize things and order the updates between various things can bear on this, for example: Does the player always update first? Does everything else update in a specific order?
The way you choose prioritize things and order the updates between various things can bear on this, for example: Does the player always update first? Does everything else update in a specific order?
Re: Any difference between "actor" and "entity?"
(Ninja'd about the "bobs", but...)
I think I picked up "actor" from an old book about classic Mac game programming, where a "sprite" just had the logic for drawing it and then redrawing the background over it when it moves, and an "actor" was a sprite with movement behavior.
I think I picked up "actor" from an old book about classic Mac game programming, where a "sprite" just had the logic for drawing it and then redrawing the background over it when it moves, and an "actor" was a sprite with movement behavior.
Re: Any difference between "actor" and "entity?"
I learned about "actor" from the Duke Nukem 3D CON files, but still call them objects living in the object tables.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2033
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Any difference between "actor" and "entity?"
When talking about it, i use "object" and "instance". Object is the ideal form. Instance is every "material" object in memory, on- or off screen, with or without sprite. Think of object as a stamp, and instance as every clone you produce with the stamp. I think i picked it up from game maker a decade ago or so.
Using a one-syllable word in coding is a very good idea, though.
Using a one-syllable word in coding is a very good idea, though.
http://www.frankengraphics.com - personal NES blog
Re: Any difference between "actor" and "entity?"
When coding or writing technical documents I use "object", but when I'm being less technical I use "entity". Not a big fan of "actor", for whatever reason.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Any difference between "actor" and "entity?"
That terminology is a bit at odds with prevailing practice, I think.FrankenGraphics wrote:When talking about it, i use "object" and "instance". Object is the ideal form. Instance is every "material" object in memory, on- or off screen, with or without sprite. Think of object as a stamp, and instance as every clone you produce with the stamp. I think i picked it up from game maker a decade ago or so.
In C++ and many other programming languages, an "object" is an "instance" of a "class".
So, your use of "instance" is normal, but what you're calling an "object" is a class, and thet word normally refers to an instance. After looking it up, I guess I should say "Game Maker" rather than you, since this is indeed the unfortunate way Game Maker has chosen to define these terms.
The more conventional definitions:
- class: a template or "type" for making objects, the code for an object belongs to its class because the same code can run every instance.
- instance: when you use a class to make a new object, you get an instance of that class. Each one contains its own set of data.
- object: an instance of a class, synonymous with instance but I think the word instance is used more in contexts where it's important to note that it is one of many like it.
-
Oziphantom
- Posts: 1163
- Joined: Tue Feb 07, 2017 2:03 am
Re: Any difference between "actor" and "entity?"
I would also cation against using a game specific name for "things", as you will end up reusing parts of it, then one day you will find yourself making a game with animated skeletons but they are all called "Tanks".
I've seen some engines define an Entity as something in the world, and an Actor as an Entity + Animation System. Thus something like BGM Music, or Action Volumes are Entity, but things with with a mesh and animation are Actors.
I've seen some engines define an Entity as something in the world, and an Actor as an Entity + Animation System. Thus something like BGM Music, or Action Volumes are Entity, but things with with a mesh and animation are Actors.
Code: Select all
-+ Entiity
| MusicPlayer
| Volume
| Camera
+-Actor
| Player
| MeshWalker
| Prop
....- never-obsolete
- Posts: 403
- Joined: Wed Sep 07, 2005 9:55 am
- Location: Phoenix, AZ
- Contact:
Re: Any difference between "actor" and "entity?"
I use object as a base for anything placed in the game world. All objects are either a trigger or an actor.
Triggers can be scripted events, sound, palette, graphic, or raster effects. Actors consist of the player, NPCs, enemies, or blocks.
Triggers can be scripted events, sound, palette, graphic, or raster effects. Actors consist of the player, NPCs, enemies, or blocks.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2033
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Any difference between "actor" and "entity?"
I guess it does make a bit sense inside internal logic, because you never really get to directly define classes (GM does that for you).rainwarrior wrote:the unfortunate way Game Maker has chosen to define these terms
Anyway, i should update my vocabulary to the definition you wrote to avoid future confusion.
http://www.frankengraphics.com - personal NES blog
Re: Any difference between "actor" and "entity?"
I switch back and forth between entity and actor, with "actor" being the easiest to say, but it's weird if you have something that needs to have logic but isn't actually something that's "alive"; It's weird to refer to a chair or an elevator as an "actor", even if it's semantically correct for your engine. 
So, it's up to you which one you use, it's just however you feel like flavoring your code.
So, it's up to you which one you use, it's just however you feel like flavoring your code.