AppleyAppley Docs
Docs/Optimization

LOD Optimization

Use level of detail effectively.

8 min read Intermediate Updated 2026-07-01 v2.0 ~23 min to complete

Introduction

Use level of detail effectively. This page provides a complete guide to lod optimization in Appley, covering everything from setup to advanced techniques.

Optimization is a core area of Appley. Understanding lod optimization will help you build better games and use the platform more effectively. This documentation is designed for intermediate level users.

Requirements

Before working with lod optimization, ensure you have the following:

  • An Appley project to optimize
  • Understanding of performance metrics (FPS, draw calls)
  • Access to the profiling tools
  • Target hardware specifications

Estimated Completion Time

This guide takes approximately 23 minutes to complete. The estimated reading time is 8 minutes. Difficulty level: Intermediate.

Step-by-Step Guide

Follow these steps to work with lod optimization in your Appley project:

1

Profile the game

Open the profiler in Creator Studio and play your game to capture data.

2

Identify bottlenecks

Analyze the profiler results to find the slowest systems for lod optimization.

3

Apply optimizations

Implement recommended optimizations (LOD, culling, batching, compression).

4

Re-profile

Play the game again and compare metrics to verify improvements.

5

Set quality presets

Create quality presets for different target devices (mobile, desktop).

FluxScript Example

Below is an Appley Scripting (Flux Scripting) code example demonstrating lod optimization:

LOD Optimization — Appley Scripting
// Optimization — LOD Optimization
on start {
  world.setLOD("tree", [
    { distance: 15, mesh: "tree_high" },
    { distance: 40, mesh: "tree_mid" },
    { distance: 80, mesh: "tree_low" }
  ])
  world.setCulling(true, { mode: "frustum" })
  world.batchStatic(["rocks", "trees", "buildings"])
  lighting.setShadowDistance(60)
}

on update(dt) {
  fps = system.getFPS()
  if fps < 30 {
    world.setRenderScale(0.75)
    lighting.setShadowQuality("low")
  } else if fps > 55 {
    world.setRenderScale(1.0)
    lighting.setShadowQuality("high")
  }
}

Node Script Example

The same logic can be implemented using Node Scripting. Here is the equivalent node graph:

LOD Optimization — Node Graph
[On Start] ──► [Set LOD: tree, 3 levels]
         ──► [Enable Culling: frustum]
         ──► [Batch Static: rocks, trees, buildings]

[On Update] ──► [Get FPS] ──► [Branch]
            ├─ < 30 ──► [Set Render Scale: 0.75]
            └─ > 55 ──► [Set Render Scale: 1.0]

Interchangeable Systems

FluxScript and Node Scripting compile to the same runtime. You can mix both in a single project — use whichever is best for each task.

Common Mistakes

Avoid these frequent mistakes when working with lod optimization:

Not profiling before optimizing

Always profile first to find the actual bottleneck.

Over-optimizing early in development

Build first, optimize second. Premature optimization wastes time.

Using high-quality settings on mobile

Create separate quality presets for mobile and desktop.

Not testing on the target device

Test on actual hardware — emulators hide real performance.

Troubleshooting

If you encounter issues with lod optimization, try these solutions:

FPS drops below 30
Profile to find the bottleneck. Common: draw calls, high-poly models, expensive scripts.
Game uses too much memory
Reduce texture sizes. Use texture compression. Unload unused assets.
Mobile device overheats
Reduce render scale. Lower shadow quality. Simplify shaders. Cap at 30 FPS.
Loading times are long
Compress assets. Lazy-load scenes. Use streaming for large worlds.

Performance Tips

Optimize your use of lod optimization with these performance tips:

  • Profile regularly — dont guess what is slow. Use the built-in profiler.
  • Set up quality presets for different devices (mobile, desktop, high-end).
  • Use object pooling for frequently spawned/destroyed objects (bullets, particles).
  • Implement level streaming for large worlds to reduce initial load time.

Explore these related documentation pages:

Example Project

Download a complete example project demonstrating lod optimization: