unity · 3d metroidvania · dlc

Maseylia

Echoes of the Past — Additional content

Gameplay Programmer · Level Designer · Game Designer · QA Tester

A DLC for Maseylia: Echoes of the Past, a true-3D Metroidvania with a Mœbius-inspired sci-fi art direction, where the player unlocks new abilities that reopen the level design: every power changes how you traverse the world.

I designed the DLC's overall prototype and gave it its direction — from the gameplay programming of the new systems to the level design.

Unity C# 3D Metroidvania Level Design
01

The concept

Maseylia: Echoes of the Past is a true-3D Metroidvania built in Unity, with a Mœbius-inspired sci-fi art direction where nature and ancient technology merge into surreal landscapes. This DLC extends the game with a fresh arc of levels, designed around a steady ramp-up of the player's toolkit.

The through-line is classic to the genre but demanding to balance: each new ability (grapple, teleport, dash, double jump…) becomes the central mechanic of a segment, then combines with earlier ones to open increasingly technical traversals.

02

My role

Gameplay Programmer · Level Designer · Game Designer · QA Tester

Overall prototype & direction

I designed the DLC's overall prototype and gave it its direction. On the programming side, I developed new mechanics — the orbs, platforms, traps and tools detailed below — that didn't exist in the base game; the mechanics already present (the character's movement and abilities) I reused as-is. I then structured the six-segment learning curve — which ability to introduce and when — so the unlocked power and the obstacles answer each other.

  • New systems I programmed: the orbs, platforms, traps and tools detailed below
  • Reused mechanics: the movement and abilities already in the game, leveraged across my levels
  • Level design: ability gating, difficulty ramp and power recombination
03

Programming: the systems

As Gameplay Programmer, I developed in Unity these new systems — orbs, platforms, traps and tools — added on top of the existing mechanics to bring the DLC's progression to life.

Orb · Swing

Swing Orb

A swing anchor: the player latches on, builds momentum and gets launched.

Placed up high, the orb acts as an anchor point: once attached, the player swings around it, and the moment they let go decides the direction and strength of the launch. It lets the player clear gaps too wide for a jump, and the release timing becomes a skill in its own right, to be chained with the other abilities to keep momentum going.

See the code · GrappleOrb.cs + rope simulationC#
The swing runs inside the Kinematic Character Controller's velocity loop: gravity + player input, then the velocity is constrained so the next frame stays on the rope's sphere.
// GrappleOrb.cs — the orb is hit by the grapple shot and hands over to the controller
private void OnTriggerEnter(Collider collider)
{
    if (isOnCooldown || isOnFight || !player.canGrapple) return;
    if (!collider.CompareTag("playerMissile")) return;

    // The controller picks pull or swing from the orb's type
    if (!player.HandleOrbHit(this)) return;
    player.JumpCounter = 0;   // hitting an orb refills jump, dash and bash
    player.DashCounter = 0;
    player.BashCounter = 0;

    // A swing orb only goes on cooldown once the player lets go (OnSwingReleased)
    if (orbType == OrbType.Grapple)
        StartCooldownOnce(3f);
}

// ExampleCharacterController.cs — rope simulation, run in the KCC velocity update
private bool UpdateSwingVelocity(ref Vector3 currentVelocity, float deltaTime)
{
    // … guard clauses (orb disabled, swimming, dashing, landed) → StopSwing()

    Vector3 anchor = _swingOrb.transform.position;   // follows the orb on moving platforms
    Vector3 pivot = GetSwingPivot();
    Vector3 toPlayer = pivot - anchor;
    Vector3 ropeDir = toPlayer.sqrMagnitude > 0.0001f ? toPlayer.normalized : -Motor.CharacterUp;

    // Jump = leave the swing and keep the momentum
    if (_jumpRequested)
    {
        _jumpRequested = false;
        ReleaseSwingWithJump(ref currentVelocity);
        return true;
    }

    // Reel the rope in progressively toward its target length
    _swingRopeLength = Mathf.MoveTowards(_swingRopeLength, _swingTargetRopeLength, _swingReelSpeed * deltaTime);

    // Forces: gravity + stick input tangent to the rope (to "pump" the swing)
    currentVelocity += Gravity * deltaTime;
    if (_moveInputVector.sqrMagnitude > 0.01f)
    {
        Vector3 tangentInput = Vector3.ProjectOnPlane(_moveInputVector, ropeDir);
        currentVelocity += tangentInput * _swingInputAcceleration * deltaTime;
    }
    currentVelocity *= 1f / (1f + _swingDrag * deltaTime);

    // Rope constraint: if next frame overshoots the rope length, pull it back onto the sphere
    Vector3 nextOffset = (pivot + currentVelocity * deltaTime) - anchor;
    if (nextOffset.magnitude > _swingRopeLength)
    {
        Vector3 constrainedNext = anchor + nextOffset.normalized * _swingRopeLength;
        currentVelocity = (constrainedNext - pivot) / deltaTime;
    }

    currentVelocity = Vector3.ClampMagnitude(currentVelocity, _swingMaxSpeed);
    return true;
}

// Release: keep (and boost) the swing momentum, while guaranteeing an upward impulse
private void ReleaseSwingWithJump(ref Vector3 currentVelocity)
{
    StopSwing();

    Vector3 up = Motor.CharacterUp;
    float upVel = Vector3.Dot(currentVelocity, up);
    currentVelocity *= _swingReleaseVelocityMultiplier;
    // never cancels an upward speed that is already stronger
    currentVelocity += up * (Mathf.Max(upVel * _swingReleaseVelocityMultiplier, _swingReleaseJumpSpeed)
                             - upVel * _swingReleaseVelocityMultiplier);

    Motor.ForceUnground();
    JumpCounter = 1;   // the release counts as a jump
}

Platform · Jump

Flip platform

Flips when the player jumps, forcing you to anticipate the input and the landing.

A platforming object that reacts to the player's jump: by flipping, it forces them to keep their remaining jumps in reserve to correct their trajectory. A single input now requires anticipating the landing, opening up new possibilities and adding depth to the jumping sequences. Note: the final animation and visuals for the platform are not implemented yet.

See the code · FlipPlateform.csC#
Each platform belongs to group A or B; a shared static state keeps every platform in sync, and the state swaps halfway through the rotation.
// FlipPlateform.cs — only one group (A or B) is solid at any time
private static Group _solidGroup;          // shared by every platform so they stay in sync
private static int _lastFlipFrame = -1;    // stops several instances flipping on the same frame
private static event System.Action OnFlip;

// Fired on every player jump (static event broadcast by the StateManager)
private void OnJumpStateChanged(bool _)
{
    // Every platform receives it on the same frame: only the first one flips the shared state
    if (Time.frameCount != _lastFlipFrame)
    {
        _lastFlipFrame = Time.frameCount;
        _solidGroup = (_solidGroup == Group.A) ? Group.B : Group.A;
        OnFlip?.Invoke();
    }
}

private IEnumerator FlipRoutine()
{
    Quaternion startRot = transform.rotation;
    // Alternate +180° / -180° so the platform rocks back and forth instead of piling up rotation
    float flipAngle = (_solidGroup == Group.B) ? -180f : 180f;
    Quaternion endRot = startRot * Quaternion.Euler(flipAngle, 0f, 0f);

    float elapsed = 0f;
    bool swapped = false;
    while (elapsed < flipDuration)
    {
        elapsed += Time.deltaTime;
        float p = Mathf.Clamp01(elapsed / flipDuration);
        transform.rotation = Quaternion.Slerp(startRot, endRot, p);

        // Halfway (platform on its edge): swap solid / ghost in one go
        if (!swapped && p >= 0.5f)
        {
            swapped = true;
            ApplyState(IsSolid);
        }
        yield return null;
    }

    transform.rotation = endRot;
    ApplyState(IsSolid);   // guarantees the exact final state
}

Ability · Glide

Paraglider

A controlled glide that stretches and steers the fall trajectory.

A gliding ability that, once airborne, reduces fall speed and lets the player steer their horizontal trajectory to clear larger gaps and fine-tune their landing point. It turns a simple jump into a genuine aerial traversal phase, meant to be combined with the other abilities.

See the code · GliderController.csC#
The glider only touches the velocity during UpdateVelocity: only the falling speed is capped, air control stays untouched.
// GliderController.cs — glide ability plugged into the Kinematic Character Controller
public void StartGlide()
{
    if (IsGliding || controller == null) return;

    // Only glide when actually airborne
    if (controller.Motor.GroundingStatus.IsStableOnGround) return;

    IsGliding = true;
    SetAnimatorGliding(true);
    if (gliderVisual != null) gliderVisual.SetActive(true);
}

// Called by the character controller in UpdateVelocity, after gravity, while airborne.
// Only the DESCENT is capped: upward momentum and horizontal control stay untouched.
public void PostAirVelocity(ref Vector3 currentVelocity, float deltaTime)
{
    if (!IsGliding || controller == null) return;

    Vector3 up = controller.Motor.CharacterUp;
    float vertical = Vector3.Dot(currentVelocity, up);

    // Falling faster than the cap: ease toward it (frame-rate independent)
    if (vertical < -glideMaxFallSpeed)
    {
        float target = -glideMaxFallSpeed;
        float smoothed = Mathf.Lerp(vertical, target, 1f - Mathf.Exp(-glideFallSharpness * deltaTime));
        currentVelocity += up * (smoothed - vertical);   // replace only the vertical component
    }
}

Traversal · Splines

Rails

A rail system that guides the player along a defined path.

Once latched on, the player automatically follows a path laid out in advance by the level designer, at a controlled speed, and can detach at any time to chain into a jump or another ability. The rail is used both to cross areas that can't be traversed on foot and to frame more spectacular moments or set the pacing of a segment.

See the code · RailsRoller.csC#
The rail is a Unity Spline; on attach it replaces the character controller in the KCC motor, then hands it back on jump.
// RailsRoller.cs — auto-attach to the nearest spline while falling
void Update()
{
    if (!_kinematicCharacterMotor.GroundingStatus.IsStableOnGround
        && _kinematicCharacterMotor.Velocity.y < 0.1f
        && !_isGrinding
        && Time.time - _lastDetachTime > attachCooldown)
    {
        if (TryFindNearestSpline(out SplineContainer nearestSpline, out float nearestT))
            Attach(nearestSpline, nearestT);
    }
}

public bool TryFindNearestSpline(out SplineContainer bestSpline, out float bestT)
{
    bestSpline = null;
    bestT = 0f;
    float bestDistance = float.MaxValue;

    foreach (var spline in FindObjectsByType<SplineContainer>(FindObjectsSortMode.None))
    {
        Vector3 splineLocalPos = spline.transform.InverseTransformPoint(transform.position);
        SplineUtility.GetNearestPoint(spline.Spline, splineLocalPos, out float3 nearestPoint, out float nearestT);
        float distance = Vector3.Distance(transform.position, spline.transform.TransformPoint(nearestPoint));

        if (distance < bestDistance)
        {
            bestDistance = distance;
            bestSpline = spline;
            bestT = nearestT;
        }
    }

    return bestDistance < 1f;   // only attach under the grab threshold
}

// Take over the KCC motor: the rail becomes the character's controller
public void Attach(SplineContainer spline, float startT)
{
    splineContainer = spline;
    t = startT;
    splineLength = splineContainer.CalculateLength();   // computed once
    _kinematicCharacterMotor.CharacterController = this;
    _kinematicCharacterMotor.SetPositionAndRotation(splineContainer.EvaluatePosition(t),
        Quaternion.LookRotation(splineContainer.EvaluateTangent(t)));
    _isGrinding = true;
}

// Advance along the spline at a real speed in m/s
public void UpdateVelocity(ref Vector3 currentVelocity, float deltaTime)
{
    t += deltaTime * speed / splineLength;   // normalised: 0 = start, 1 = end
    currentVelocity = splineContainer.EvaluateTangent(t);
    currentVelocity = currentVelocity.normalized * speed;
    if (t > 1f) t -= 1f;   // loops on the rail
}

// Jump = leave the rail with an up + forward impulse, then hand control back
public void Detach(SplineContainer spline)
{
    _isGrinding = false;
    _lastDetachTime = Time.time;

    Vector3 DetachImpulseUp = Vector3.up * jumpForce;
    Vector3 DetachImpulseForward = splineContainer.EvaluateTangent(t) / 2;
    _kinematicCharacterMotor.ForceUnground();
    _kinematicCharacterMotor.BaseVelocity = DetachImpulseUp + DetachImpulseForward;
    _kinematicCharacterMotor.CharacterController = _previousController;
}

Orb · Time

Slow-Mo Orb

A slow-motion zone around the orb: while the player is inside it, time slows down to thread the most nerve-racking passages.

When the player enters the orb's zone, game time slows down gradually to a quarter of its speed instead of freezing all at once; the physics step follows the same pace so movement stays smooth. The camera rotation is sped up by the same factor, so aiming stays as responsive as at normal speed. As soon as the player leaves the zone, time eases back to normal speed. The level designer places these zones wherever they want to give the player a moment to read and adjust their trajectory, for instance in the middle of a chain of orbs.

See the code · SlowMotionOrb.csC#
The timeScale eases down instead of snapping, the physics step follows it, and the camera is sped up by the same factor to stay responsive.
// SlowMotionOrb.cs — time slows down while the player is inside the orb's trigger
private void OnTriggerEnter(Collider other)
{
    if (other.CompareTag("Player")) Slow_MotionOn();
}
private void OnTriggerExit(Collider other)
{
    if (other.CompareTag("Player")) Slow_MotionOFF();
}

// Ease Time.timeScale down, and scale fixedDeltaTime with it so physics stays smooth
IEnumerator SlowTime()
{
    while (Time.timeScale > slowMoTimeScale)
    {
        Time.timeScale -= Time.timeScale * slowMoSpeed;
        Time.fixedDeltaTime = currentFixedTimeScale * Time.timeScale;
        yield return null;
    }

    Time.timeScale = slowMoTimeScale;
    Time.fixedDeltaTime = currentFixedTimeScale * Time.timeScale;
}

// Camera rotation boosted by 1 / timeScale so aiming stays responsive in slow motion
private void BoostCamera()
{
    if (characterCamera == null || slowMoTimeScale <= 0f) return;

    float factor = 1f / slowMoTimeScale;
    characterCamera.RotationSpeed = origRotationSpeed * factor * cameraSpeedMultiplier;
}

Tool · Editor

Teleport to save point

A Unity editor tool that lists the level's save points and teleports the player to any of them in one click.

A development tool, not a player-facing feature: an editor window (Tools ▸ Teleport Player To Save) gathers every save point in the loaded scenes and sorts them into folders by zone, with a filter. For each one, you can edit its index and name, find it in the hierarchy, add a note that survives Play Mode and editor restarts, and above all teleport the player to it, in play mode or in edit mode. On a DLC split into six segments, it avoids replaying the whole level to test one specific slice: a real iteration booster for level design and playtests.

See the code · TeleportPlayerToSaveTools.csC#
An EditorWindow that groups the save points by zone and teleports the player, both in Play Mode and in edit mode.
// TeleportPlayerToSaveTools.cs — editor window (Tools ▸ Teleport Player To Save)
private void RefreshSaveSpots()
{
    saveSpots = new List<savespot>(FindObjectsByType<savespot>(FindObjectsSortMode.None));

    // Group the save points into zones by thousand (5000, 6000…) for the folders and the filter
    zoneBands = saveSpots
        .Where(s => s != null)
        .Select(s => (s.LocationIndex / 1000) * 1000)
        .Distinct()
        .OrderBy(band => band)
        .ToList();
}

// Teleport the player (the object carrying the KinematicCharacterMotor)
private void TeleportPlayer(Vector3 target)
{
    KinematicCharacterMotor[] motors = FindObjectsByType<KinematicCharacterMotor>(FindObjectsSortMode.None);
    if (motors.Length == 0) return;
    KinematicCharacterMotor motor = motors[0];

    if (Application.isPlaying)
    {
        // Play mode: go through the KCC API so the motor doesn't overwrite the position next frame
        motor.SetPosition(target);
    }
    else
    {
        // Edit mode: move the transform directly, with Ctrl+Z support
        Undo.RecordObject(motor.transform, "Teleport Player To Save");
        motor.transform.position = target;
    }
}

// Per-save-point note kept in EditorPrefs: survives Play Mode and editor restarts
private static string NoteKey(savespot spot)
{
    return "SavespotNote_" + GlobalObjectId.GetGlobalObjectIdSlow(spot).ToString();
}

Other mechanics

More straightforward systems, reused across the segments.

Platform

Rotating platform

A continuously rotating platform, an unstable footing to cross on rhythm.

Trap

Timed traps

Timed on/off cycles: reading the rhythm and nailing the timing.

System

Rollback with orbs

Returns the player to a previous state/position tied to the orbs: a controlled reset.

Platform

Conveyor belt

Applies a constant velocity to whoever stands on it, in a given direction.

Traversal

Dash-breakable wall

Only shatters under a dash impact: a hidden gate gated by the ability.

Trap

Laser circle traps

Laser beams rotating around a center, with tight windows to slip through.

04

Level design: the progression

The DLC is split into six segments. Each one unlocks a new core ability that becomes the heart of its teaching, then introduces its dedicated obstacles and traps before recombining everything.

Download the LD Blender file
SEG 01

The fundamentals

Kit: Jump · Roll
Jump Roll

Mechanics introduced

Trampolines Spike platform on jump Falling platforms

Screenshots

Maseylia — Segment 1, capture 1
Opening path through the canyon
Maseylia — Segment 1, capture 2
Climbing the first blocks
Maseylia — Segment 1, capture 3
Spiked pillars on the way
Maseylia — Segment 1, capture 4
Looking down on the climb
SEG 02

The grapple

Unlocks: Grapple
Jump Roll Grapple

Mechanics introduced

Grapple points Jumps between grapple orbs Moving platforms (up) Moving platforms (forward) Timed traps Spike walls

Screenshots

Maseylia — Segment 2, capture 1
First grapple points over the void
Maseylia — Segment 2, capture 2
Grapple orbs between the pillars
Maseylia — Segment 2, capture 3
Spike walls
Maseylia — Segment 2, capture 4
Run of spiked pillars
Maseylia — Segment 2, capture 5
Vertical climb along the grapple orbs
SEG 03

The teleport

Unlocks: Teleporter Orbs
Jump Roll Grapple Teleporter Orbs

Mechanics introduced

Wooden crates Teleport between orbs Fall control after teleport Ice ground Slow down on ice

Screenshots

Maseylia — Segment 3, capture 1
Teleporter orbs past the hanging platforms
Maseylia — Segment 3, capture 2
Chaining teleports across the gap
Maseylia — Segment 3, capture 3
Overview of the teleport section
Maseylia — Segment 3, capture 4
Controlling the fall between platforms
Maseylia — Segment 3, capture 5
Landing ledge at the end of the section
SEG 04

The dash

Unlocks: Dash
Jump Roll Grapple Teleporter Orbs Dash

A mastery segment

Combining every ability learned so far

Screenshots

Maseylia — Segment 4, capture 1
Mixed route: orbs and pillars
Maseylia — Segment 4, capture 2
Pillar run toward the long platform
Maseylia — Segment 4, capture 3
Pillars below the long bridge
Maseylia — Segment 4, capture 4
Lone teleporter orb over the void
Maseylia — Segment 4, capture 5
Looking down on the descent
SEG 05

The double jump

Unlocks: Double Jump
Jump Roll Grapple Teleporter Orbs Dash Double Jump

Mechanics introduced

Double path Race against timed traps Water Bubble orbs

Screenshots

Maseylia — Segment 5, capture 1
Line of floating funnel platforms
Maseylia — Segment 5, capture 2
Spiked pillars over the abyss
Maseylia — Segment 5, capture 3
Ring traps around the towers
Maseylia — Segment 5, capture 4
Two routes through the pillars
Maseylia — Segment 5, capture 5
Field of ring traps
Maseylia — Segment 5, capture 6
Funnel platform and floating blocks
SEG 06

The sand dash

Unlocks: Sand Dash
Jump Roll Grapple Teleporter Orbs Dash Double Jump Sand Dash

Mechanics introduced — the climax

Laser circle enemy Fall management & reaction Jump-count management Spike-jump interaction Flip platform on jump Moving walls Slow-mo orb

Screenshots

Maseylia — Segment 6, capture 1
Winding trail of floating blocks
Maseylia — Segment 6, capture 2
Moving wall between the orbs
Maseylia — Segment 6, capture 3
Free fall: managing the descent
Maseylia — Segment 6, capture 4
Chain of orbs across the open sky
Maseylia — Segment 6, capture 5
Chaining different orbs mid-air
Maseylia — Segment 6, capture 6
Tilted pillars on the final stretch

Want to see more?

The DLC isn't out yet, but the base game is available on Steam.

Steam Other projects