![]() |
|
|
Resources Assignments
|
FPS370
- Changes from Alpha2 to Alpha3 The changes incorporated into alpha3 were to load a model into the fps370 application and use that model as the player map. The earlier versions used a teder map to build the floor tiles in the 3d arena. I was always intending on using the 2d map to build the 3d scene, but a student needed a model with textures loaded for the same purpose. This is the project I'm using to demonstrate various aspects of game programming. This is the code used to load a model (from Fps370Panel.java). //import com.mnstarfire.loaders3d.Loader3DS; As you can see there are two different loaders being used here. The first attempt which is now commented out was using Wings3d and the starfire loader3ds. I saved the model as a 3ds file and loaded, but the textures were not showing. I turned on the loging and detal(7) and noted some exceptions trying to load the actual texture image files. I fixed all the exceptions by moving the texture image files directory around in the project. The textures still did not show. After a few days of this I gave up and tried a different 3d tool and loader. The milkshape modeling tool and the java3d loader. You will need to download both and place the MS3DLoader-1.0.8.jar in the fps370/lib/ext directory. This is the code that calls the model loader. Please note a bug here. The loadModel method is being passed a file name of models/temple.3ds, but that name is ignored in the actual loadModel method. The model that is loaded is ./models/map2.ms3d. This is just a "shoe box" with textures patterned on the inside. The loadModel method returns a Scene object which we use to retrieve a BranchGroup from. That BranchGroup is added to bgMain (the main BranchGroup).
Those are basically the only changes and were a lot of work and testing. The next step is to add collision detection. |
|
CPSC370 - Games Development Chapman University Instructor: W. Wood Harter (c) copyright 2006 - W. Wood Harter - All Rights Reserved Screen shots on banner (c) copyright their resprective owners |
|