Started working on mdl instancing; bones already work:
Code is pretty straight forward; my ackmdl.dll is hiding the ugly stuff:
Code:
Mdl* mdl = mdl_create ();
mdl_addbone(mdl, mdl_bonecreate(NULL, NULL, NULL));
mdl_addbone(mdl, mdl_bonecreate(NULL, vector(50,0,0), mdl_getbone(mdl, 0)));
mdl_addbone(mdl, mdl_bonecreate(NULL, vector(25,25,25), mdl_getbone(mdl, 1)));
MdlCollection* collection = mdl_collectioncreate();
int i, radius = 50, segments = 150;
for (i = 0; i < segments; i++)
{
VECTOR pos, angle;
var a = i * (360 / segments);
vec_set(&angle, vector(a, sin(a) * 25, 0));
vec_set(&pos, vector(radius, 0, 0));
vec_rotate(&pos, &angle);
MdlInstance* instance = mdl_instancecreate(mdl, &pos, &angle, NULL, 1);
mdl_collectionaddinstance(collection, instance);
}
Mdl* mdlCollection = mdl_collectioncreatemdl(collection);
mdl_save(mdlCollection, "mdlCollection2.mdl");
@Joozey: Your game looks so awesome. Guess what? This lead me to the wikipedia page about airports and airport infrastructures; have a look, it's darn interesting to get to know the real stuff, that drives the real world - you might enjoy it, while getting a flood of ideas for your own game. At least, I had for a theoretical, rather realistic tycoon'eqsque game I am never ever gonna make --- best wishes!!!