ENGINE SCRIPT (interpreted)
<createscene name="scene1">
<loadmesh path="mesh.3ds" name="mesh23">
<loadmesh path="mesh2.3ds" name="mesh24">
<meshpos name="mesh23" x="23.435" y="34.543" z="4.543">
<dynlight x="0" y="0" z="0" color="255,255,255">
</createscene>
DATA SCRIPT (parsed)
<npcdata>
<randmessage>Hello user, how are you today?</randmessage>
<randmessage>The duck flies at midnight..</randmessage>
<spokenmessage wav="npc32.wav">Say hello to my little friend!</spokenmessage>
</npcdata>
You could make the engine recognize "loadmesh" and read the information then load the mesh, or you could just make it send the info to the programmer so he can put it in a loop and load them all. You could even do both, have like LoadEngineScript and LoadDataScript, engine script would have the engine interpret the script and actually do what its meant to do and you could have data script parse the data for the programmer to use, like messages from npcs.
Grand Theft Auto Vice City does this same thing but not in xml. Everything from car colors and availability to building names and positions are in text files. It would also be nice to have some kind of simple encryption or maybe just zip the scripts so the everyday user doesnt mess with it and screw the game up.
Im sure there are xml parsing libraries out there but since you dont use external libraries for the engine maybe you could find an open source one that would let you implement their source inside the engine, or just write your own if you have time.
I think this would add a lot to the engine. If you would like to see the Vice City scripts I can post them here. Its pretty cool how its loaded from those scripts, you could make a completely different game just by changing all of them (one reason why simple encryption would be useful).
Nice engine, by the way.
