Need PLSM2 Developer approval, would like to write patch..

kiolakin

08-08-2006 03:40:36

@Tuan (or other appropriate team member):

I know you are busy writing on PLSM2, so I will sum up the changes I would like to make. Please respond with your thoughts on the matter so I can be sure I am going in an appropriate direction with this.

1. Make sure that PLSM2 starts up in a stable state without any options specified by:
a. Moving PagingLandScapeOptions construction to the PLSM2 construction
b. InitScene() immediately after
c. Making Data2D so that it is no longer an abstract class, but rather so that it will return Colour::White, Colour::White, 0.0f, Vector3::UNIT_Y, etc...

2. Make the config file reader set the options it reads with SetOption()

3. Moving all config options to SetOption

4. Make the config state a morph of the generic terrain you get with nothing specified to the terrain you want.

5. Make it possible to not have a config at all, but to specify everything in SetOption:
a. Change SetWorldGeometry(stream,type) so that when I NULL stream is detected and type="SetOptionOnly" it will continue to process the options already setup in it.
b. Create #define's for the commonly used set option's and "SetOptionOnly"
c. Be sure that SetOption does not try to hold on to pointers that may be temporary.

6. Readd my Data2DCallback and Data2D_Listener

7. Hopefully learn enough by then to give serious concentration to the infinitizer (the other GameState I am using uses Octree only and has already been infinitized at the program level, so I already have ideas on how to do this.)

tuan kuranes

21-08-2006 19:45:41

All seems ok to me.

About option from the plsm3 design Thread :

- GetOption/setOption use an Option class that handle Option directly, using a std::map that contains 'value/descritption/valuetype/delegates' as well as a default map (loaded/loadable from user file too) which option mechanisme reverts to if it cannot find a value from map loaded from user config file.

If you can go toward that I would be happier.
Load a Default.cfg with the "generic terrain" into mDefaultOptionMap.
Each Map load into mMapConfig

and when a value is requested the idea is :

if (mMapConfig[valueName] exists)
return mMapConfig[valueName]
else
return mDefaultOptionMap[valueName]

(best would be to use a map containing a structure with value, value type)
value type being String, Vector3, Vector3, Real, etc, and why not a delegate ptr in the case of setOption calling a command.