Zones Streaming

MagicLordMagicLord Posts: 578Unconfirmed
edited April 29 in Resources

Hi there,

I made a script to allow connecting levels to load and unload as the player moves around.
This is similar to Streaming while this is a very simple version using packed scenes and triggers.
Each loaded level can have it's own triggers to load others..

Many games uses that trick to simulate open worlds with connected levels scenes.

Github link :

https://github.com/DevMagicLord/Godot3/tree/master/tools/Streaming

Comments

  • MagicLordMagicLord Posts: 578Unconfirmed
    edited April 29

    A quick tutorial.

    Each trigger has two parameters you must fill :
    * Zone scene : The scene to load and unload, it must be a PackedScene object
    * Zone Position : position where the scene will be placed relative to the parent of trigger (that should be your current scene)
    In the screenshot below the scene will be positioned relative to the "level1" scene node.

    The trigger component has two sub components named "loading" and "unloading"

    Each one is an Area component to detect when the player enter their collision volume.
    * Green color volume, when the player enters it's volume it loads the packed scene
    * Red color volume , when the player enters it's volume it unloads the packed scene

    You can select the "loading" and "unloading" node and move, rotate or scale them to fit your level.

Sign In or Register to comment.