Ok, I didn't get a chance to respond to weedkiller yet!! Also, I didn't get to comment on a few things wciow said a few days ago, so here goes.
Texture sizes & polygon countsI agree that we should be able to use much higher resolution textures and models (polygon counts). However, I want GAE to still run find on a 700MHz Celleron and also be able to view much more landscape at a time (maybe less on lower end machines). My idea at the moment is to have a single set of high resolution textures & detailed models, but have the engine create multiple scaled down versions of models & textures at load time and then only display the resolution (poly count & texture size) that's actually going matter at the viewing distance. I'm still not 100% sure on the feasibility of this from an artistic standpoint (not letting it screw up the model when it scales down), but I believe it can be done in a reasonable amount of load time. Possibly, the results can be optionally cached to speed up loading (after the 1st load at least).
First, I think that this is needed to facilitate a greater viewing distance. I would like for the camera to see as far as the army of units can and zoom out to where the entire map is on screen at once. Also, the configuration should be able to tell the engine to use lower resolution models and/or textures to help frame rates on slower machines. As weedkiller mentioned, maybe even per-pixel lighting and bump maps!!
I've noticed that different parts of the tree tend to sway differently at different times. Thus, I thought that breaking the tree up into multiple pieces (is meshes the word for this?) could facilitate better simulation of this. I've learned that we definitely don't want to have the objects sway based soley upon the wind speed, because they tend to bend down, where they get less wind so they bounce back up, catch more wind and bend down again, etc.
Animal Animationsweedkiller brings up some very good points, some of which I've considered, some I haven't. So it looks like objects (like trees) that wave in the wind will have to have meta data that we can use to align the "hang out" locations. So for a tree, the meta-data should include the axis of rotation which will probably be somewhere in the trunk or for saplings or smaller plants, will be where it meets the ground or even very slightly below that. This is the part of the model that doesn't move. Then, at the top of the model, we define the "top" location of each "bend" frame (for lack of a better word). So we can use the "axis" and "top" locations to calculate the hang-out locations (where the birds are perching) so that they sway with the tree. If we break the trees up into multiple pieces (as mentioned above) then the "top" location would have to be set for each piece.
But this doesn't solve the problem with "fly in lines" or "approach paths" (we'll have to find a good name for this too!
Here's the 1st idea I don't like:
Once upon a time there was a pretty tree with lots of polygons. But as pretty as the tree was, children used to laugh and tease the tree about it's polygons. "Hehe, those are SO triangular," one would say. "They aren't even bump mapped!" another teased. But none of this seemed to bring the tree down. Little did those children realize just how special those polygons were!
It's not because they had a texture associated with them. It's not even because they had normal vectors. They were walkable polygons! What are "walkable" polygons you might ask? Why they are the most special kind, they are polygons with meta data! It's walkable meta data that lets squirrels know that a polygon is part of a trunk that they can climb up to get to their favorite branches and lets birds know that it's part of a branch they can sit on them and build their nests! There's even polygon meta data that lets deer know that it's their favorite type of leaf to eat!
So no matter how much the children teased, the tree knew how special it's polygons were, so nobody could ever get tree down.. well, until that worker came by with an axe....
Ok, see why I don't like that idea much? First off, I'm not too big on faerie tales, second, it has a sucky ending and thirdly, it would mean altering the model format, yuck! The other idea I don't like is the tedious work of manually creating all of these lines for travel. I think that the g3d model viewer should be hacked, err, enhanced so that we can play with the model to find all of these lines and points and have them recorded in the proper xml format for us, but it's still a lot of work by hand.
Either way, one of these solutions will be needed and the data can then be easily referenced from the corresponding cells so that pathing wont take a lot of calculations (like it would if we were trying to look at this data globally). It also occurred to me that whatsits will have often have more than one "travel" action -- for squirrels, they can jump from branch to branch and birds can also walk, but each of these has constraints. I'm going to figure out a good way to organize these data structures in the xml files.
AnimationsSince the full playbackspeed should really influence the whole animation the morphtime should be relative to the animation, so perhaps X-frames, this should be possible as the animations should be so similar that its not the game forcing something but only saveing the diskspace which another g3d would require that atm.
Yea, that's exactly it. Largely, this whole animation cut & paste stuff is for reducing the amount of required disk space, but it's mostly for allowing the modder to do the most possible with the minimal animations. OK, I admit it, it's also cause I haven't learned out to animate or even make models yet, but that's beisde the point!
So let me modify my last animation example
<animations playback="loop">
<animation prob="1" type="simple" path="models/swordman_fight.g3d"/>
<animation prob="1" type="compound">
<source name="die" path="models/swordman_dying_unit.g3d">
<source name="fight" path="models/swordman_fight.g3d">
<frames source="die" start="0" end="3.2" splice-time="0.5"/>
<frames source="fight" start="5" end="4" splice-time="0"/>
<frames source="fight" start="4" end="5" splice-time="0"/>
<frames source="fight" start="5" end="4" splice-time="0.45"/>
<frames source="die" start="3.2" end="0"/>
</animation>
<animations>
The "prob" attribute (probability) is always optional and defaults to 1. To keep things cleaner, we'll have a type on the animation, which is simple or compound. A simple animation looks exactly like it would have before, except that we have a "type" attribute and an optional "prob." The compound type will be the new cut & paste, hack-'em-up style animation. Note that splice-time is a floating point number. Normally, there are 39 interpolated frame between each actual frame in a g3d animation file (somebody please correct me if I'm wrong). The splice-time attribute specifies, in relative terms, the number of interpolated frames there will be from the end of the <frames> collection and the beginning of the next <fames> collection. splice-time is ignored if it's in the last collection of <frames>.
But we haven't gotten rid of the <anim-speed> tag! The speed at which the animation is played still is determined by this, example: <anim-speed value="100"/>.