Announcement

Collapse
No announcement yet.

problems about Level Streaming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    problems about Level Streaming

    I need to build a large map . so I do several small maps first , and then I want to use level streaming to connect these maps . that means when I move to the edge to a map A, another map B will load , when I enter the map B , the map A will unload .
    but I have found there are some problems .
    for example , there is a trigger in map A , and there is a trigger in map B. each trigger in each map has its own function in kismet . but always has problem , the game crashs down ... I have checked a long time , and at last I found that the two trigger's name are the same "trigger_0"..
    I do not want to delete a trigger and then add a new trigger , I want to modify the trigger's name directly , but how? I press F4, and there is no entry to modify its name ..anybody can give me an idea ?thank you ~

    and I also need some suggestion about level streaming . is there anything I have to pay attention??
    thank you

    #2
    do you use the triggers name for an action within your kismet script? if its the case, create your own trigger class, add an editable variable (maybe initialised with the Name), and use this variable for your kismet action

    Comment


      #3
      You need to arrange your streaming levels under a 'master' Persistent level which contains all the actors and logic for streaming.

      Create or load a Master persistent level. Go into the Level Manager Window and add or create your sublevels from the 'Level' menu at the top. Choose the Kismet streaming method. The levels will appear below your persistent level, and you will be able to use the Stream Level actions in the Kismet of the persistent level to load or unload each sublevel as needed, either based off Level Start events or Trigger Touch events.

      This way you shouldn't get any collisions between entity names, as all actors regulating level streaming are only in the Persistent level.

      Comment


        #4
        Grom , after reading your answer , I think that when I finish the levels , there should not exist kismet or trigger or manitee , when I put these levels into a persistent level , I should make these kismet or trigger or manitee again ?so these logical things should be in the persistent level , but these logical things affect different sub levels ??
        am I right ? thank you ~

        Comment


          #5
          You can put kismet and other logic into each sub level (you can even work on these levels completely separately if you like) but it's quite difficult to reference logic between different levels. If you do need to do this you will need to use Remote Events.

          You should arrange your sublevels so that the gameplay logic you need is loaded when you need it. You could even have a separate sublevel which contains the kismet and triggers for the whole world, or you could split the kismet between multiple sublevels which are loaded when you need them.

          Example:

          MyLevel_P [Persistent Level, player spawn, streaming triggers]
          MyLevel_L [All logic, kismet, triggers for world-wide gameplay]
          MyLevel_G [Global visuals like Skydome, Sea, Rivers, Sun Light and Fog Volumes for the world]
          MyLevel_S1 [Section 1 of the world, e.g. a forest section]
          MyLevel_S2 [Section 2 of the world, e.g. a mountain section]
          MyLevel_S3 [Section 3 of the world, e.g. a bunker section]

          So you load MyLevel_P and spawn there. Put some kismet Stream Level entities to load MyLevel_L, SFX and S1 as we're starting the player in the forest. Add some dummy geometry in MyLevel_P under the player to stop them falling while you load the levels, and make a fade-from-black Matinee so you can hide things until all the levels have loaded. When everything has loaded fade up and the player can wander around in the forest. He finds a remotely locked container with lock/unlock logic, part of the MyLevel_L sublevel.

          A trigger in P loads the mountains (S2) when the player is about to leave the forest. After a while wandering in the mountains we unload S1 as the player can no longer see the forest. The player then finds a door to S3, the bunker, which we load in as the player approaches. Underground, he finds a radio device and activates it. The logic of the device is in MyLevel_L and unlocks the container. The player goes all the way back, we load up S1 and unload S2 and S3, and he can now open the container: even though it seems to him like the container was in the forest, it was actually part of the global 'logic' level.

          When you load MyLevel_P into UDK you can show/hide different levels just like the layers system in Photoshop, which is really useful for putting stuff together and keeping the editor running smoothly. When it comes to lighting the whole level just unhide everything and build lighting so that the mountains cast shadows onto the forest, for example.

          Comment


            #6
            Any tutorials related to level streaming around the net?
            Sounds as a "must" for singleplayer oriented games.

            Originally posted by Grom View Post
            You need to arrange your streaming levels under a 'master' Persistent level which contains all the actors and logic for streaming.

            Create or load a Master persistent level. Go into the Level Manager Window and add or create your sublevels from the 'Level' menu at the top. Choose the Kismet streaming method. The levels will appear below your persistent level, and you will be able to use the Stream Level actions in the Kismet of the persistent level to load or unload each sublevel as needed, either based off Level Start events or Trigger Touch events.

            This way you shouldn't get any collisions between entity names, as all actors regulating level streaming are only in the Persistent level.

            Comment


              #7
              Hourences has one: http://www.hourences.com/book/tutorialsue3streaming.htm

              The UDN pages seem to be missing though. It's actually not that difficult to get working, the logic is very simple. It's just getting your head round the concept of sublevels and how best to arrange your content across different levels.

              Oh yeah, the bit about the fadeup matinee in my post above, you could always tick bShouldBlockOnLoad to stop the player appearing before the level has loaded. This would probably not be desirable for the illusion of seamless loading however.

              Comment


                #8
                Thank you!
                I'm trying to create something similar to the example you posted above.
                I tried to think as player and the idea of loading different levels every 3-4 minutes doesn't make me happy. From the other hand level streaming sounds like a more functional solution.

                Comment


                  #9
                  Ok, one last question:
                  In my game the first 2 levels are a small town and a forest so, the actual idea is to use level streaming between those 2 parts.
                  According to the tutorial when the player reaches a specific point where the trigger volume teleports us to the second part, a loading screen will pop up and once it's done we will find ourself at the same point...... and that same point is the end of the first level.
                  So my question is... Assuming that we are in the end of the town(where the forest sub level should load) how the heck am I suposed to connect those 2 parts physically?
                  Do I copy the last part of the first level to the starting point of the second one for example or?
                  Sounds a bit complicated and I don't fancy the idea of having to recreate my levels if something goes wrong.

                  Comment


                    #10
                    why use a loading screen when streaming levels? isn't streaming used to not having any loading screens? oO

                    Comment


                      #11
                      That's what the tutorial said... lol

                      Comment


                        #12
                        Assuming your levels are large enough that you can't load them into the game at the same time (otherwise the need for a level load is pretty much not there) then you will need to modify your levels a bit to get streaming working seamlessly.

                        In your example you will need to split both the small town and the forest up into chunks such that you don't have too much loaded at once. In a simple linear form you could have the chunks:

                        T1 - T2 - T3 - T4 - F1 - F2 - F3 - F4

                        So, the town and the forest are split up into 4 parts each. Import all these levels into a new Persistent level file (just a normal new level, which is now your 'master' level) so you can see everything loaded in the editor at once.

                        You now think to yourself "Ok, I can only have 3 sections maximum loaded into memory at once". So if you are standing in the T4 level you also have loaded T3 and F1 (because you can see them from where you are standing). Everything else, which because of your cunning level design is out of view through strategically placed buildings, cliffs and lines of trees, you should have unloaded at this point.

                        As you move into F1 you unload T3 and load F2, and so on, always having 3 levels loaded - all this logic is in the Persistent level of course. If your levels are reasonably small and are visually connected in more complicated ways then you could have 4 or more sections loaded at once.

                        Level Streaming doesn't work like magic unfortunately; you need to set these things up manually and design the entire level in advance while taking streaming into account.

                        Comment


                          #13
                          Thank you very much.. I think got the point now.
                          I've already used hills and rock-barriers to hide specific parts of the level cause I had to deal with framerate issues due to the amount of the flora used.
                          Instead of reducing the amount I just hide parts of them to avoid rendering all that mass in the same time, so connsidering this it won't be too hard to set those parts as sub levels.
                          Thanks again.

                          Comment


                            #14
                            No problem. Remember each sublevel is a separate .udk file - which you can even load on its own. There are menu options like 'Add selected to current level' in both the main editor screen and in the level manager window. Use the visibility buttons to check everything is in the correct levels.

                            It's pretty easy to select a load of actors and move them into another level, and works quite fast.

                            Remember to Save All before you quit though!

                            Comment


                              #15
                              BTW the UDN page on level streaming is back up at:

                              http://udn.epicgames.com/Three/LevelStreamingHowTo.html

                              also Level Streaming Volumes which are a more elegant solution (basically large trigger volumes which load associated levels while you are inside them) are described here:

                              http://udn.epicgames.com/Three/Level...ngVolumes.html

                              Comment

                              Working...
                              X