1. Lost Twins 2
  2. News

Lost Twins 2 News

Devlog # 50 - Character physics in water Part 1

Hi guys!
Water is finally here! Adding it to our game wasn’t just about making it look cool—it completely transformed how the world and the player interact. From realistic buoyancy to swimming mechanics, creating water physics has been both a technical challenge and a rewarding experience. In this devlog, we’ll take you behind the scenes to show how we implemented character physics in water, tackled unexpected hurdles, and made swimming feel natural and fun. Let’s dive in!

Custom Physics for the Player:
In our game, we’ve built custom physics for all player interactions. While the character uses Unity’s Rigidbody and CapsuleCollider, there’s no gravity by default. Movement is handled manually in the Update() function using boxcasts to determine accurate X and Y positions. With water, we had to extend this custom approach.

Detecting Water Interaction:
To switch between normal platforming and water physics, we added four child transforms to each water area to define its bounds. These allow us to detect when the player enters or exits water. Once in water, the physics shift. A buoyancy force is introduced alongside gravity. For example:

If the player enters from above, they sink initially until buoyancy kicks in, eventually bringing them back up to the surface.

For special water areas (like those suspended in air by magical force fields), the player can enter from any direction, but the buoyancy-gravity interaction still ensures a natural flow.

Swimming Mechanics:
When the player provides input (using arrow keys), the dynamics change: Buoyancy and gravity are temporarily disabled, and the player accelerates in the direction of input. Velocity is clamped to avoid unnatural speeds, creating a deliberate swimming motion.
Additionally, the character’s head rotates to align with the direction of movement, enhancing immersion and giving the swimming motion a natural feel.

[previewyoutube][/previewyoutube]

Handling Physics in FixedUpdate:
Unlike ground movement, which is processed in Update(), water movement is handled in FixedUpdate() for better collision accuracy. Unity’s physics engine takes over here, ensuring the player is stopped by obstacles like walls or floating debris.

However, this introduced an unexpected issue: the camera became jerky since it was still updating in Update(). To fix this, the CameraController now dynamically switches to FixedUpdate() when the player enters water, providing smooth tracking.

[previewyoutube][/previewyoutube]

What’s Next?
This was just the foundation for water physics. In the next devlog, we’ll explore:

Interactions with objects in water, like floating boxes and sinking boulders.
The FX that make water feel alive, from ripples to splashes when the player interacts with it.
Thanks for reading, and as always, feel free to share your thoughts and feedback. Stay tuned for more! 😊

Best regards,
Playdew Team

https://store.steampowered.com/app/1752540/Lost_Twins_II/

Devlog # 49 - Creating Connection Overlays for Puzzle Guidance

Hey everyone! We’re back with another devlog update.. In our puzzle game, each level features three distinct blocks, each with its own unique environment, obstacles, and pathways. Each block has doorways on both the left and right sides that are meant to connect to doorways on other blocks. During playtesting, we noticed that players were having trouble figuring out which doorways connect between blocks in our puzzle game, leading to some head-scratching moments. So, we set out to create a simple, effective way to help players navigate these connections without feeling lost. Here’s how we tackled it!

Step 1: Designing the Overlay in Photoshop

The first step was creating a visual map for each block. Using Photoshop, we traced the layout of each block, focusing on key elements:

Floors, Obstacles, and Platforms: These were outlined to show where characters can move and where they cannot, helping players visualize possible paths.
Doorway Connections: a color-coded system to indicate potential connections
Red: Doorways that cannot connect to the current block.
Green: Doorways that can connect to the side doorways of the block in focus.
Blue: Doorways that can connect to the bottom doorways of the block in focus.

This tracing process created a simplified, visual guide for each block, making it easier for players to understand the connection possibilities at a glance.

WITHOUT OVERLAYS



WITH OVERLAYS





Step 2: Enhancing the Overlay in Unity

After completing the tracings,we imported the Photoshop files into Unity and worked on integrating them into the game. To make the overlays more effective, we developed a custom shader that adds a subtle glow effect. This glow highlights the overlays without being too intrusive, making them stand out even when players zoom out to view the entire level. The shader’s effect directs players’ attention to key areas without overwhelming the visual experience, providing a clean, intuitive map.

Outcome:
The introduction of the Connection Overlay system has significantly improved the player experience. The overlays offer clear visual guidance on how blocks can connect, reducing confusion and helping players solve puzzles faster. This feature has now become a core component of our game’s user experience, offering an engaging way to assist players without breaking immersion.

By simplifying the connection process, we’ve been able to enhance the overall gameplay flow, making the puzzle-solving experience more enjoyable and less frustrating. We look forward to sharing more updates as we continue refining the game!

Best regards,
Playdew team

https://store.steampowered.com/app/1752540/Lost_Twins_II/

Devlog # 48 - Water cutscene

Hi guys! This week, we focused on enhancing the water flow mechanics with a dynamic cutscene that highlights the water filling and emptying containers. To achieve a more engaging visual experience, we needed a smooth camera system that follows the movement of the water seamlessly, giving players a clear and immersive view of the process. Here’s a deep dive into how we tackled this challenge.

To showcase the water flow mechanics effectively, we needed smooth camera movement that follows the water filling and emptying process. This way, players can fully observe the changes as they happen in real time. We added a top boundary to the water prefab, which tracks the water’s height dynamically as it moves. This boundary’s position is stored in a `targetPositionEndOffset` variable.

The top bound stops moving when it aligns with the water surface. However, when the water fills another container below, the camera needs to follow the action seamlessly. To make this happen, we introduced an additional Y-axis offset, allowing the camera’s target position to update frame by frame. The duration of this movement is calculated based on the Y-axis distance of the water from top to bottom.

[previewyoutube][/previewyoutube]

To enhance the visual experience, we applied Robert Penner’s Quart-Ease-In-Out easing function. This easing starts slowly, accelerates in the middle, and decelerates at the end, creating a natural and fluid camera movement.

As a result, the camera smoothly tracks the water’s flow, providing players with a seamless viewing experience.

Check out the code snippet implementing this logic below:

private IEnumerator MoveTopPointCoroutine()
{
float timeElapsed = 0f;
float adjustedT = 0f;
timeToFillWater = 0f;
targetPositionEndOffset = Vector3.zero;
timeToFillWater = CalculateTimeToFillWater();

float topEndOffset = CalculateDistance() - 20f;
float topEndPositionCurrentOffset = 0f;

while (timeElapsed < timeToFillWater)
{
adjustedT = Easing.Ease(easingEquation, timeElapsed / timeToFillWater, 0.0f, 1.0f, 1.0f);
topEndPositionCurrentOffset = Mathf.Lerp(0, topEndOffset, adjustedT);
targetPositionEndOffset.y = topEndPositionCurrentOffset;
timeElapsed += MyTime.deltaTime * 0.5f;
yield return new WaitForEndOfFrame();
}
targetPositionEndOffset.y = topEndOffset;
}


This new camera system not only adds polish to the cutscene but also helps players appreciate the fluid dynamics at play, making the entire experience more satisfying. We’re excited to see how this feature elevates the gameplay, and we can’t wait to hear your feedback. Stay tuned for more updates as we continue to refine the mechanics and visuals of our game!

Best regards,
Playdew Team

https://store.steampowered.com/app/1752540/Lost_Twins_II/

Devlog # 47 - Modular library asset

In our latest development update, we’re diving into the process behind our level-building approach and the tools we’ve crafted to streamline it. From a library of modular assets to precise layout techniques, our goal is to ensure each environment is visually cohesive and optimized for performance.

We’ve developed a modular asset library specifically for streamlined level building, with unique sets of assets tailored to each zone. Leveraging this asset library,we construct each area on a 1x1m grid—marked by green boxes—to maintain consistency and precise alignment. Using a kitbashing approach, we combined different assets to craft the desired layout, refining architectural details along the way. Once the layout is set,we added foundational lighting. We’re using baked lighting for optimal quality, with each block assigned a dedicated 1k lightmap to preserve detail and ensure high visual fidelity.


[previewyoutube][/previewyoutube]



Thanks for tuning into this devlog! Our level-building journey is all about refining each space to create an immersive and visually stunning experience. Stay connected for more updates as we continue crafting each unique zone. Feel free to share your thoughts and questions—we’d love to hear from you!

Best regards,
Playdew Team

https://store.steampowered.com/app/1752540/Lost_Twins_II/

Devlog # 46 - Introducing Co-op Mode

Hi guys! We’re thrilled to announce a major update to our game! Originally designed as a single-player experience, we’re now expanding into co-op gameplay. With two unique characters already at the core of our levels—each with their own abilities and challenges—it felt like a natural progression to explore the possibilities of cooperative play.

Why Co-op?
As we played through the game ourselves, the synergy between the two characters sparked an idea: what if players could work together, each controlling a character, to solve puzzles and tackle obstacles as a team? We wanted to create a fresh, collaborative experience that amplifies the sense of accomplishment and opens up opportunities for players to bond through teamwork. This shift brings a new dimension to the game, making it more dynamic and memorable as you share these moments with a friend.

The Challenges

Of course, introducing co-op mode hasn’t been without its hurdles! One of the biggest challenges was rethinking our level design to ensure cooperation is essential. We wanted to make sure that each character contributes meaningfully and that players must strategize together to overcome obstacles. We’ve also introduced new mechanics to foster communication and coordination, ensuring that teamwork is at the heart of this new mode.

What’s Next?
We’re currently in the testing phase, gathering feedback to fine-tune the co-op experience. Our primary goal is to make sure that co-op mode feels seamless, intuitive, and above all—fun! We’re dedicated to preserving the core essence of the game while giving players an exciting new way to play.

Stay tuned for more updates as we continue to develop this feature! We can’t wait for you and a friend to dive in and see how co-op mode transforms the game. Thanks for your continued support—it’s what keeps us going!

Best regards,
Playdew Team

https://store.steampowered.com/app/1752540/Lost_Twins_II/