Demo of script I made last night. Standalone Level of Details script for Blender Game engine. Not true level of detail as all it does is replace meshes.
However it allows for easier implementation and multiple different levels running at the same time.
At this point all it requires is for the main object to have a property on it and for the replacement objects to have sequential number. E.G. Cube (main object). Cube1,Cube2,Cube3 (replacement objects.)
Example of calling the script:
import bge import LevelOfDetail as lod def main(): lod.setLOD(prop="hasLOD",distances=[1000,75,30,20]) lod.setLOD(prop="isLOD",distances=[1000,100,50,10]) main()
hasLOD and isLOD are the property names on the cube and shape.
distance are the distances to change levels at from lowest detail to highest detail.
If they had the same property name on them then they would both change levels at the same time. and only one line would be needed to affect both objects.