It is currently Tue Nov 21, 2017 3:26 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Jun 19, 2017 9:33 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 987
Location: Pennsylvania, USA
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.


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 9:41 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5824
Location: Canada
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".


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 9:44 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 987
Location: Pennsylvania, USA
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".


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.


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 9:55 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5824
Location: Canada
"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.


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 10:18 am 
Offline
User avatar

Joined: Sun Nov 09, 2008 9:18 pm
Posts: 987
Location: Pennsylvania, USA
rainwarrior wrote:
(There is a "lizard" for the player but it's not a subclass of "dog".)


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.)


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 10:26 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5824
Location: Canada
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?


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 10:33 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19237
Location: NE Indiana, USA (NTSC)
(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.


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 11:31 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3950
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!


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 11:43 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1017
Location: Gothenburg, Sweden
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.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 3:38 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
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.


Top
 Profile  
 
PostPosted: Mon Jun 19, 2017 4:06 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5824
Location: Canada
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.

That terminology is a bit at odds with prevailing practice, I think.

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.

For confusion's sake: in Java there is a class called Object, and you can make Object object instances of it.


Top
 Profile  
 
PostPosted: Tue Jun 20, 2017 7:27 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 256
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.

Code:
-+ Entiity
 | MusicPlayer
 | Volume
 | Camera
 +-Actor
  | Player
  | MeshWalker
  | Prop
....


Top
 Profile  
 
PostPosted: Tue Jun 20, 2017 7:53 am 
Offline
User avatar

Joined: Wed Sep 07, 2005 9:55 am
Posts: 304
Location: Phoenix, AZ
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.


Top
 Profile  
 
PostPosted: Tue Jun 20, 2017 8:14 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1017
Location: Gothenburg, Sweden
rainwarrior wrote:
the unfortunate way Game Maker has chosen to define these terms

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).

Anyway, i should update my vocabulary to the definition you wrote to avoid future confusion.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Sun Jul 16, 2017 7:12 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
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. :P

So, it's up to you which one you use, it's just however you feel like flavoring your code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group