1 Reply Latest reply on Jan 18, 2007 12:42 PM by Sonic2004

    Large world

      I know this is a difficult topic and that has been discussed before, but I searched and searched and cannot find many answers. Does anyone have any pointers, or know of any tutorials about making a large world map in Director without using TONS of memory. Is there a process of constantly loading small sections at a time around in the player's line of view? What about loading texture maps and creating the world dynamically, but have it look the way I design (not random)? It woul dbe nice if it could be loaded from the internet without long wait times. I am just exploring ideas. Any input or direction would be appreciated!
        • 1. Re: Large world
          Hey there extol. A couple of pointers from what I have experienced. Some of this might be obvious to you, but I will list them anyway.
          - Where you can repeat the use of a single shader over do it. Many unique shaders will effect performance.
          - I have found that mesh objects perform much better than using the internal prims. Also, if you want to create a world that is dynamic, in my opinion, this is the way to go. In my application I have to create thousands of 3D objects at run-time that are user defined and may be unique every time. I would not have the flexibility to do this without the mesh objects. By the way, I can load 2000+ dynamic mesh objects at run-time in about a second using Lingo. Many of these objects are using the same shader.
          - Use powers of 2 with your textures. To my knowledge, this happens automatically if an image in not a power of 2; but is an extra processing step that can be avoided.
          - I have found it interesting to load images dynamically from the internet or a web server without using too much memory. It really depends on the size of the image and the bit depth. Avoid using 32bit images where you do not need them. Unless I am using alpha I never use 32bit. Others may have reason to say otherwise. Rememeber that when you import an image from an external source in Shockwave you will have to create a member at run-time to store it. Once you load this as a texture then unless you need the cast member just discard it. You can use unLoadMember() or member("").unload to do this. I use the first one and I am not sure of the difference.
          - Shockwave 3D does a pretty good job of handling the loading and unloading of objects that are not in the viewing plane of the camera.
          - I cannot remember any of the sites off hand, but there are definitely examples (and code) of folks dyanmically loading maps within the viewing plane of, for instance, a walking character inside of Shockwave. I bet you could find some links on Google.

          Ok, I could go on for a while, but I will leave you there and hope that some of my comments are useful. Good luck.