jack: (Default)
[personal profile] jack
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? :)

Date: 2007-04-23 11:10 am (UTC)
From: [identity profile] stephdairy.livejournal.com
I'm confused by your (to me) backwards class specification; you seem to have the parent class on the right and the subclass on the left.

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)

Date: 2007-04-23 12:28 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
Oh, thank you. How about any more suggestions for two-syllable names...? :)

Date: 2007-04-23 12:34 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
LOL. I'll be restrained. It felt right in this case, in that I do want objects.

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.

Active Recent Entries