04oct10 CmdrZin

Upgrading the Room Properties to Map in 3D

Having added the 3D view to the Client, it's now time to put in the correct parameter for each Room in the MudMain.properties file so that they will build up the complex as it is explored.

The base is layed out on a 60x60 grid. Currently, all of the room are four sided. Not worried about showning doors and such. Just need outlines. Future plans are to model each of the rooms.

The startng area is outside the 60x60 so the main map will be 65 x 75.
The lower left corner is 0,0. The Room position values set the center of the room. This will be useful later when positioning objects in the room.
The x is e-w, the y is elevation, and the z is n-s. Once a few rooms are done, these assumptions can be checked.
Change CheckerFloor.java
  private final static int FLOOR_LEN = 76;  // should be even
increment tile loop by 10 instead of 1.
Add to makeRoomObj()
        // map to view coords
        position.setX((position.getX() * -1.0f) + 30.0f);
        position.setZ(position.getZ() - 30.0f);
almost there..
Well, that didn't work so well. Going to remove the robo and it's view control, then make the room 1/10 the size so it fis on the existing 20 x 20 grid.
Change CheckerFloor.java back to original value and remove other mods
  private final static int FLOOR_LEN = 20;  // should be even
Change makeRoomObj()
        // map to view coords
        position.setX((position.getX() * -1.0f) + 10.0f);
        position.setZ(position.getZ() - 10.0f);
Change WrapTour3D.java
Comment out addTourist();
Ok, display show UL as -10,-10 and LR as 10,10. So offset x by -30 and scale 0.25. Offset z by -30 and scale by -0.25.
Change makeRoomObj()
        // map to view coords
        position.setX((position.getX() - 30.0f) * 0.25f);
        position.setZ((position.getZ() - 30.0f) * -0.25f);
Ok..now to enter the room data.
            Room rm = new Room(5.0f,10.0f,15.0f,n*10.0f,0.0f,n*5.0f);
to gage how the mapping works. Room(dim, pos) is suppose to LWH, xyz..we'll see..
Well....looks like it maps L(e-w)W(n-s)H(u-d) and xyz where y is u-d but already knew that.
Will enter the data for the first 6 or so rooms to check it out.
Still not right...make all dimensions 1,10,1 to fix positions info first..dims seem 3x too big..
OK..seem scale is *0.125..hmm..something doen't like negative values, so adj all to positive in properties file..nope..AHH..the origin room doens't read in the dim and pos properties because it has it's own load..doh..hmm..using default values..doesn't want to read origin room properties..
Try making the Vector3f members final...may be storage issue..description too long??..
arrrggg..had .origin. room described three times..leftover from cut-n-paste of new properties..DOH..
ok..all working correctly..commit rev 212..now to do all the currently described rooms..
all updated ..rev 213...next is update the Client and zip for distribution..