Well, I knew this day would come. The day when I would have to work on Alucard’s Mist form.-_-;
I have been greatly dreading this day…. the only thing I dread more, is coding the wolf’s AI into the game. And that is probably the single HARDEST thing I will have to do in this engine. But believe me when I say that the mist form is VERY complex. It consists of:
- Two flat 3d primitives: one for a gradient on the bottom, the other for the mist goes over the bottom one. Each primitive is made of 12 triangles.
- The bottom primitive either changes alpha values, color palettes (like when an enemy blinks from damage) or possibly even scaling, repeatedly in a set pattern. Either of these three could generate the blinking effect of it.
- The top primitive uses a single frame from a flame burst explosion. This primitive is slapped right on top of the gradient one. They both use normal blending, but together they appear to “glow” as if additive blending was used.
- Each primitive is shaped in a kind of water drop shape; with the tail of the water drop pointing in the OPPOSITE direction of the one you are moving in (ex: if moving right the “tail” of the water drop shape points left; the same applies when moving diagonally).
- If you stop moving and just stay in place, until you press in a different direction, it will stay pointing in the same direction.
- The mist primitive is warped some, by pulling on the vertexes along the outer edge of it in a COUNTER clockwise pattern, and then pushing them in, and repeating this. This gives it a swelling effect that seems random, but is not.
- While all of this goes on, both primitives are rotated slowly about 5 degrees left, then right, then left, etc.
And all that is just for the gfx for being in mist form and moving around in it. I didn’t even mention the nuances of the AI! As for changing into the mist from alucard/wolf/bat mode:
- First a copy of alucard is made onto what seems like another primitive; any coloring to his cape is removed and set to default.
- This primitive has a gradient along the edges, and is faded out as the other 2 are faded in.
- Note that at first all 3 primitives start off as squares. Then by pulling on the vertexes of the primitive, they are shaped into the water drop shape.
- To change back, this process is reversed.
Even after typing all that I still feel like I left out some details. But it is safe to say that it is a VERY complex process. On my initial attempt, the in fact came out ok looking… but I wasn’t happy with it so I will be trying it again.
**SIGH** the things I do for this engine.