Skip to content

Instantly share code, notes, and snippets.

@fire
Last active August 6, 2024 12:48
Show Gist options
  • Save fire/f1552f558b5376d2573435ca9e2968e0 to your computer and use it in GitHub Desktop.
Save fire/f1552f558b5376d2573435ca9e2968e0 to your computer and use it in GitHub Desktop.

Revisions

  1. fire revised this gist Jun 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion world-partition.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Eficiently handling level/world partitioning in Godot Engine (ai assisted):
    # Efficiently handling level/world partitioning in Godot Engine (ai assisted):

    Here are the updated and consistently ranked definitions with the added point:

  2. fire revised this gist Jun 23, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion world-partition.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Eficiently handling level/world partitioning in Godot Engine (ai assited):
    # Eficiently handling level/world partitioning in Godot Engine (ai assisted):

    Here are the updated and consistently ranked definitions with the added point:

  3. fire revised this gist Jun 23, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion world-partition.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # Eficiently handling level/world partitioning in Godot Engine:
    # Eficiently handling level/world partitioning in Godot Engine (ai assited):

    Here are the updated and consistently ranked definitions with the added point:

    1. **Divide the Game World into Smaller Chunks**: Split the game world into manageable sections, called cells or chunks, to improve performance and resource management.
  4. fire revised this gist Jun 23, 2023. 1 changed file with 14 additions and 11 deletions.
    25 changes: 14 additions & 11 deletions world-partition.md
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,26 @@
    # Eficiently handling level/world partitioning in Godot Engine:
    Here are the updated and consistently ranked definitions with the added point:

    1. **Divide the game world into smaller chunks**: Split the game world into manageable sections, called cells or chunks, to improve performance and resource management.
    1. **Divide the Game World into Smaller Chunks**: Split the game world into manageable sections, called cells or chunks, to improve performance and resource management.

    2. **Add a "use world partition" property to Node2D/Node3D**: Create a property that allows you to specify whether an asset should be part of the world partition system or not.
    2. **Add a "Use World Partition" Property to Node2D/Node3D**: Create a property that allows you to specify whether an asset should be part of the world partition system or not.

    3. **Map assets' global positions to world cells**: Assign each asset to its corresponding world cell based on its global position within the game world.
    3. **Map Assets' Global Positions to World Cells**: Assign each asset to its corresponding world cell based on its global position within the game world.

    4. **Load and unload world cells based on player position**: Dynamically load and unload world cells as the player moves through the game world to optimize performance and memory usage.
    4. **Load and Unload World Cells Based on Player Position**: Dynamically load and unload world cells as the player moves through the game world to optimize performance and memory usage.

    4.1. **Preload world cells for special events**: Load certain world cells ahead of time when needed for specific events or situations.
    4.1. **Preload World Cells for Special Events**: Load certain world cells ahead of time when needed for specific events or situations.

    5. **Generate top-down screenshots of world cells**: Create visual representations of each world cell to help with level design and debugging.
    5. **Generate Top-Down Screenshots of World Cells**: Create visual representations of each world cell to help with level design and debugging.

    6. **Allow users to lock cells for editing**: Provide a feature that enables locking specific world cells to prevent accidental changes during editing.
    6. **Allow Users to Lock Cells for Editing**: Provide a feature that enables locking specific world cells to prevent accidental changes during editing.

    7. **Use ResourceLoader and ResourceSaver classes for loading and unloading**: Utilize these classes to manage the loading and unloading of world cells and their associated resources.
    7. **Use ResourceLoader and ResourceSaver Classes for Loading and Unloading**: Utilize these classes to manage the loading and unloading of world cells and their associated resources.

    8. **Minimize stuttering with threads**: Use multithreading to perform loading and unloading operations in the background, reducing stutter and improving overall performance.
    8. **Minimize Stuttering with Threads**: Use multithreading to perform loading and unloading operations in the background, reducing stutter and improving overall performance.

    9. **Apply frustum culling**: Implement a technique that only renders objects within the camera's view frustum, further optimizing performance.
    9. **Apply Frustum Culling**: Implement a technique that only renders objects within the camera's view frustum, further optimizing performance.

    10. **Implement occlusion culling for 3D games**: Add another optimization technique that prevents rendering of objects hidden behind other objects, improving performance in 3D games.
    10. **Implement Occlusion Culling for 3D Games**: Add another optimization technique that prevents rendering of objects hidden behind other objects, improving performance in 3D games.

    11. **Option to Instance Assets Over Multiple Frames**: Include an option to instance heavy assets over multiple frames, reducing stutter issues caused by the demanding first-time setup that a single frame cannot handle.
  5. fire created this gist Jun 23, 2023.
    23 changes: 23 additions & 0 deletions world-partition.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # Eficiently handling level/world partitioning in Godot Engine:

    1. **Divide the game world into smaller chunks**: Split the game world into manageable sections, called cells or chunks, to improve performance and resource management.

    2. **Add a "use world partition" property to Node2D/Node3D**: Create a property that allows you to specify whether an asset should be part of the world partition system or not.

    3. **Map assets' global positions to world cells**: Assign each asset to its corresponding world cell based on its global position within the game world.

    4. **Load and unload world cells based on player position**: Dynamically load and unload world cells as the player moves through the game world to optimize performance and memory usage.

    4.1. **Preload world cells for special events**: Load certain world cells ahead of time when needed for specific events or situations.

    5. **Generate top-down screenshots of world cells**: Create visual representations of each world cell to help with level design and debugging.

    6. **Allow users to lock cells for editing**: Provide a feature that enables locking specific world cells to prevent accidental changes during editing.

    7. **Use ResourceLoader and ResourceSaver classes for loading and unloading**: Utilize these classes to manage the loading and unloading of world cells and their associated resources.

    8. **Minimize stuttering with threads**: Use multithreading to perform loading and unloading operations in the background, reducing stutter and improving overall performance.

    9. **Apply frustum culling**: Implement a technique that only renders objects within the camera's view frustum, further optimizing performance.

    10. **Implement occlusion culling for 3D games**: Add another optimization technique that prevents rendering of objects hidden behind other objects, improving performance in 3D games.