PV3D expiriment
Hi,
In order to make an MMORPG you need to have a 3d engine. I use papervision3d. You also need 3d models. I don’t have those yet. But…. I do have made a way to easy load those models. Normally spoken you make a 3d model in pv3d and you say where the model file is and where the texture file is located. For a program with many models you need to write lots of code and every model will be loaded separately. I have made 2 classes that open a zip file and parse it and then put every file in an array. You can access a texture file by saying zipLoader.getTexture(textureName); and a model by saying zipLoader.getCollada(modelName); the getTexture returns a BitmapData object and the getCollada will return an XML object. Both can be directly used in pv3d.
I followed a tutorial (http://papervision2.com/basic-mouse-interaction-v2/) and enhanced it so it first loads every model (only one now) and the texture(’s) then starts rendering.
My outcome looks exactly the same but it is different under the hood. My code adds 5,43 kb to the swf. But it makes the loading of multiple models alot easier. Only one file needs to be downloaded then.
For the actual dezipping I used the classes from nochump (http://nochump.com/)
My result:
http://synercoding.com/blog/wp-content/uploads/2010/01/Pv3dTest.swf