Hierarchy naming
Apr. 22nd, 2007 10:42 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
CSprite -- encapsulates notion of animation and position, eg. a flapping bird at (x,y)
C???:CSprite -- a sprite with a velocity and subject to gravity, eg. a snowflake or an enemy
CChordate:C??? -- a C??? that interacts with other CChordates and the ground
CHero:CChordate -- the main character, movement specified by the keyboard
CDino:CChordate -- virtual base class for enemies, each of specifies a movement pattern as a function.
The question is, on this ad hoc palaeontological inheritance hierarchy, can you suggest a name for ???? Or a more general name for Chordate? Most games must have similar breakdowns, I wonder if there's a standard? :)
C???:CSprite -- a sprite with a velocity and subject to gravity, eg. a snowflake or an enemy
CChordate:C??? -- a C??? that interacts with other CChordates and the ground
CHero:CChordate -- the main character, movement specified by the keyboard
CDino:CChordate -- virtual base class for enemies, each of specifies a movement pattern as a function.
The question is, on this ad hoc palaeontological inheritance hierarchy, can you suggest a name for ???? Or a more general name for Chordate? Most games must have similar breakdowns, I wonder if there's a standard? :)
no subject
Date: 2007-04-23 11:10 am (UTC)Also, I would eschew the Hungarian nonsense.
Your C??? is probably something like a SolidSprite or NewtonianSprite.
(S) (too much oop will kill you every time)
no subject
Date: 2007-04-23 12:28 pm (UTC)no subject
Date: 2007-04-23 12:34 pm (UTC)I haven't done enough programming on my own to develop a sane style. The Hungarianism was inherited from the example code. But I'm not sure how much I would *like* to use, and as at work I'm typically working with nothing I thought I'd try something more structured and see what it's like.
What Joel on Software said sounded good to me fwiw, but I haven't read more.