Skip to main content
Version: 0.11.0

Core Concepts

Unique Engine is built around a clear and modular architecture. Before diving deeper, it's important to understand the main building blocks of the engine.


🧩 Object3D

UeObject3D is the base class for all 3D elements in the scene, meshes, lights, and even the camera.
It supports hierarchical parenting, transformation, and visibility.

Tip: All transforms are automatically updated only when needed, improving performance, unless you mark your objects as static (matrixAutoUpdate = false).


🖼️ Scene

The scene acts as the root container for your 3D world. You add all objects, meshes, lights, etc. to the scene.

scene = new UeScene();
scene.add(myMesh);
scene.add(myLight);

🎥 Cameras

Unique Engine provides two types of cameras to project your 3D scene to the 2D screen:

Perspective Camera

The most common camera type, mimicking how human eyes perceive depth. Objects farther away appear smaller.

camera = new UePerspectiveCamera();
camera.setPosition(0, 5, 10);

Orthographic Camera

Objects maintain the same size regardless of distance. Perfect for 2D games, isometric views, or technical drawings.

camera = new UeOrthographicCamera({
left: -400, right: 400,
top: 300, bottom: -300
});
camera.setPosition(0, 5, 10);

You don't need to manually handle GameMaker's view system - the engine integrates cameras automatically by simply calling their use() method.

Field of View & Clipping

By default, the perspective camera has:

  • FOV: 60 degrees
  • Near plane: 0.1
  • Far plane: 2000

Cameras are UeObject3D instances, so you can move or rotate them like any other object.

🖌️ Renderer

The renderer is responsible for drawing the scene. It does:

  • Recursively traverses the scene graph
  • Updates world matrices only where necessary
  • Sorts opaque and transparent objects independently
  • Render the scene on the shadow maps (if available)
  • Passing light data to shaders
  • Calls the render function for each visible mesh
renderer = new UeRenderer();

// Per-frame rendering:
renderer.render(scene, camera);

💡 Light

Lights bring depth and realism to the scene. Currently supported types:

  • Ambient (default): base illumination

  • Point: A point light emits light in all directions from a specific position in 3D space. It simulates a light bulb or any other light source that radiates light uniformly. The intensity of the light diminishes with distance, creating a natural falloff effect.

  • Directional: simulates distant light sources like the sun, with parallel rays from a fixed direction. Position doesn't affect intensity, only the direction matters (defined by position and target).

  • Spot: A spot light emits light in a specific direction from a point in 3D space. It has a defined cone angle, where the light is strongest and falls off gradually outside that cone. Spotlights are commonly used for simulating flashlight effects, torchlights, or any other light source with a limited range.

  • Hemisphere: A light source positioned directly above the scene, with color fading from the sky color to the ground color. This light cannot be used to cast shadows.

Example:

light = new UeDirectionalLight(c_ltgray, .8, { x: 150, y: 80, z: 90 });
scene.add(light);

Lights automatically inject their data into shaders when the material support them, no manual uniform handling needed.