GPWiki.org
GPWiki.org
It is currently Wed May 22, 2013 12:35 am

All times are UTC




Post new topic Reply to topic  [ 92 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject:
PostPosted: Mon Dec 18, 2006 10:16 pm 
Bibliotherapist
User avatar

Joined: Wed Dec 21, 2005 6:23 pm
Posts: 6210
Location: Manchester, UK
T-1 wrote:
What is an entity by your definition? That's more unclear to me.


Something that exists in some form or another? :)

_________________
God must love stupid people, he made so many.
theraje: 'God doesn't love stupid people, they're just easier to make'
http://sharedillusions.blogspot.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 18, 2006 10:31 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
Selt wrote:
Model View Controller anyone, or am I the only one who uses that?

Huh?!? :confused


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 18, 2006 11:19 pm 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Machaira wrote:
T-1 wrote:
What is an entity by your definition?

PC or NPC - basically anything living with any degree of intelligence. Actually you could just call the class Character and you'd be more correct, whether it's a player or non-player character. :)

see below.
Struan wrote:
I would do the hierarchy something like this.

Entity (Base class for interactive elements, does collision detection, etc.)
-Character (Same for PC and NPC)
-Vehicle
-ItemPickup
-Projectile
-InanimateObject

s/Entity/Actor/
s/Character/Pawn/
s/Vehicle/Pawn/
s/InanimateObject/Decoration/

Character and Vehicle should have a shared parent object (Pawn), so that Controllers can be freely and easily switched between the two.

Entity has odd meanings, Machaira takes it to mean what I mean by Pawn, Struan takes it to mean what I mean by Actor.

Machaira wrote:
T-1 wrote:
Actor == gameworld object. Actor tells me something that acts on the gameworld.

I think it's the inanimate objects as actors that gets to me. :confused

Inanimate objects still act in that they collide and can be seen.

_________________
aaaaaaaaaaaaaaaaaaa


Last edited by T-1 on Tue Dec 19, 2006 1:30 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 18, 2006 11:46 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
T-1 wrote:
Inanimate objects still act in that they collide and can be seen.

That's not acting, that's merely existing. :)

I understand what you're saying, I just don't agree with the naming conventions.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 1:32 am 
P2k
User avatar

Joined: Tue Aug 23, 2005 5:11 am
Posts: 2145
T-1 I think you are mixing up the different parts. I am just taking about the game logic (not the graphics or the controllers (human or ai)).

I take Entity to mean any object/person or whatever in the game world. All the other classes should inherit from Entity which should be an abstract class. Entity would define methods for collision detection, taking damage, etc. which would be shared by all the child classes.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 2:15 am 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Struan wrote:
T-1 I think you are mixing up the different parts. I am just taking about the game logic (not the graphics or the controllers (human or ai)).

I take Entity to mean any object/person or whatever in the game world. All the other classes should inherit from Entity which should be an abstract class. Entity would define methods for collision detection, taking damage, etc. which would be shared by all the child classes.

nope, understood perfectly.

_________________
aaaaaaaaaaaaaaaaaaa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 3:48 am 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
Struan wrote:
I take Entity to mean any object/person or whatever in the game world. All the other classes should inherit from Entity which should be an abstract class. Entity would define methods for collision detection, taking damage, etc. which would be shared by all the child classes.

See, to me that would be an WorldObject (or even just Object) class, which Entity inherits. It would go something like:

Code:
Object
   Entity
      PC
      NPCs
   Item
      Chest
      Weapon
      Car


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 4:10 am 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Machaira wrote:
Code:
Object
   Entity
      PC
      NPCs
   Item
      Chest
      Weapon
      Car

once again, Vehicles should share a parent class with characters.

Code:
Object
   Entity
      Characters
           PC
           NPCs
      Car
   Item
      Chest
      Weapon

would make more sense

_________________
aaaaaaaaaaaaaaaaaaa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 4:18 am 
P2k
User avatar

Joined: Tue Aug 23, 2005 5:11 am
Posts: 2145
Well chests/weapons/pickups still need the same collision detection as characters/cars which I think makes sense on Entity.

I don't see the need for separate PC and NPC classes. They should work exactly the same except for the are controlled by a separate class (AI or Human control classes).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 5:20 am 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
T-1 wrote:
once again, Vehicles should share a parent class with characters.

Why?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 5:23 am 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
Struan wrote:
Well chests/weapons/pickups still need the same collision detection as characters/cars which I think makes sense on Entity.

But the collision detection would be part of Object. :) Every world object will need it so it make sense to include it at the highest level possible.

Struan wrote:
I don't see the need for separate PC and NPC classes. They should work exactly the same except for the are controlled by a separate class (AI or Human control classes).

I'd have to think about it, but there might be a need to distinguish between the two. Not a bit deal though, it's basically the separation between living and non-living objects.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 2:53 am 
Paraskavedekatriaphobic

Joined: Sat Aug 27, 2005 12:24 pm
Posts: 1325
Location: aaaaaaaaaaaaaa
Machaira wrote:
Struan wrote:
Well chests/weapons/pickups still need the same collision detection as characters/cars which I think makes sense on Entity.

But the collision detection would be part of Object. :) Every world object will need it so it make sense to include it at the highest level possible.

Struan wrote:
I don't see the need for separate PC and NPC classes. They should work exactly the same except for the are controlled by a separate class (AI or Human control classes).

I'd have to think about it, but there might be a need to distinguish between the two. Not a bit deal though, it's basically the separation between living and non-living objects.

do some separation yeh. :)

_________________
aaaaaaaaaaaaaaaaaaa


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 92 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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

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