At some point previously, I must have mentioned the EyeList. If not, just pretend I did. It’s a simple system: in the creatures Head object is a List of Eye objects. Every Eye object handles a number of things related to itself in much the same way that every Limb handles its own drawing and statistics: each Eye object contains an EyeType, and EyeTexture, a few Eye specific stats like size and location-on-head, and a routine to draw the Eye model in the right positions.
EyeList has served me well, but at a certain point I came to an important decision and took the ol’ fella out with me behind the shed. A few moments later, the loud sharp *BLAM* of a shotgun blast echoed around the farm. Immediately followed by a bunch of swearing and a second shotgun blast. Seriously, it was like 5cm away, how the hell did I miss?
Rest in Peace, EyeList.
Introducing its replacement, the FeatureList.
The theory is that FeatureList is a more generic and versatile system than EyeList, and that Features can do several things that Eyes could not. Contrary to logic, common sense, and indeed sanity, “being something other than eyes” is not one of those things: if I had wished I could have easily created Eye objects that were horns, ears, noses or shrunken voodoo heads: albeit horns, ears, noses or shrunken voodoo heads that either did nothing or inexplicably improved the creatures vision.
One thing that Features can do (well, okay: should be able to do, in the long run. This hasn’t been implemented yet…) is attach to body parts other than the head: primarily the torso and tail. Because the FeatureList is contained in the root Creature class rather than in the Head class inside the Neck class inside the Creature class (My Object Orientated Programming-fu was weak when I designed the Eyelist), I have a lot more freedom as to where I put them.
Another thing that Features do that Eyes didn’t is attach to procedurally generated locations on the head. The eyeList used a group of dummy objects (invisible objects that I manually put in in 3ds max), to specify the locations of the eyes. This worked, but it was slow and limiting to have to put these dummy objects on the model for every possible head model.
So now the program works out where to put the dummy objects by casting rays inwards towards the model and determining where they hit: I don’t even have to include them in the export anymore! This frees up time to spend on more important things, like modelling more head shapes.
An interesting side effect of this is that it allows me to orient the eyes so that, instead of pointing straight ahead, they look ‘out’ from the head surface. You can see the difference fairly easily if you compare early screenshots (or Development Video # 1) to later ones (or Development Video # 3): the eyes in later screenshots aren’t always pointing forwards.
This simple change drastically changes the visual style of the creatures. Where before they had ‘googly’ eyes and looked kind of cutesy, like cartoon characters, now they appear far more animalistic. And while I do kind of regret the loss of personality for many creatures, I’m of the opinion that this actually suits the game far better. This isn’t Spore or Viva Piñata, and cutesy isn’t the visual style I had in mind. Colourful and vibrant, sure: life is very colourful, after all! But not cutesy.
This change also opened up fascinating new possibility: orientation of eyes having an effect on the creatures eyesight, and thus survivability. Eyes pointed outwards will logically increase FOV, while eyes pointed forwards will improve Range.
Finally, and probably the most important thing that Features do, is change the appropriate stats for the creatures that own them, rather than being limited to vision. Horns will increase attack damage and scariness, plates will increase armour, eyes improve vision, voodoo heads will increase the power of arcane spells while sapping the power of divine spells, that sort of thing. This means that features are not just decoration: they’re functional and thus, like everything else in Species, influenced by natural selection.
Oh hey, it also means I can do away that that useless “TailTip” class and replace the Tail Tip with a feature attachment point. Please excuse me while I get the shotgun out again.
“Oh wow. The blood just goes everywhere, doesn’t it? That’s horrible.
… Hang on don’t you faint at the sight of-“ *thwump* “… yeah. Yeah, that’s what I thought.”