1. Lost Twins 2
  2. News

Lost Twins 2 News

Devlog # 55 - Water movement inside a piece

Hi guys!

In the previous devlog, we shared insights into the intricate mechanics of water flow. This time we delved deeper into the evolution of these mechanics by introducing a new functionality that empowered players to manipulate water movement between specific points within a piece. This enhancement not only elevated the gameplay experience but also encouraged players to engage in creative problem-solving as they navigated through the puzzles.

The newly implemented feature allowed players to direct the flow of water in both horizontal and vertical dimensions. This dual-directional movement was contingent upon the initial movement direction set for the water, providing players with a broader range of strategic options. The ability to control water flow in multiple directions significantly increased the complexity of the puzzles, challenging players to think outside the box and devise innovative solutions to advance through the game.

To facilitate this functionality, the development team defined two Vector3 variables: one to store the water's current position and another to hold its target position. This decision was crucial in enabling smooth transitions as the water moved across the game environment. When a player pressed the pressure button, the MoveTowards function was activated. This function was designed to guide the water from its current position to the designated target position, which was predefined in the inspector. This setup ensured that the movement was not only fluid but also predictable, allowing players to plan their actions with confidence.

The code snippet below illustrates how the movement was executed:
if (canChangePosition)
transform.position = Vector3.MoveTowards(transform.position, wantedPosition + myPieceHoverGroup.position, MyTime.deltaTime * speed);

Upon releasing the pressure button, the water return to its original position, providing a satisfying feedback loop for players. This return mechanism ensured that players could experiment with water movement without fear of permanently altering the game environment, thus fostering a sense of exploration and creativity. The design choice to revert the water's position reinforced the idea that the puzzles were designed to be solved through trial and error, encouraging players to learn from their mistakes and refine their strategies.

The use of the Vector3 type for the wantedPosition variable was particularly significant, as it allowed for adjustments to both the X and Y values. This flexibility meant that players could effectively control the water's movement in either direction, whether they aimed to navigate the water horizontally across the screen or vertically up and down.

Here’s a video to visualize this new functionality in action:

[previewyoutube][/previewyoutube]

See you next time!

Best regards,
Playdew Team

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

Devlog # 54 - Water mechanics (Simulating Water Flow Between Connected Pieces)

Hi guys! Welcome to today’s devlog. Today we dive into a fascinating mechanic: simulating water flow between two connected pieces. It's always exciting to explore how programming can mimic the behavior of natural phenomena, like water levels rising and falling. In this post, the team will take you through the process of developing a dynamic water flow system that reacts autonomously, adding a realistic touch to the game environment.

To create this effect, the team first set the pivot point of the water prefab to its center bottom. This positioning ensures that when the water is scaled, it appears to be filling up or emptying out realistically. The next step was defining two levels for the water: maximum and minimum. The maximum level represents the current water level for each piece, while the minimum level indicates the empty state.

The flow mechanism comes into play when there are two distinct water pieces: one at its full state (maximum) and the other at its empty state. A variable called `wantedScale` is used to control the water's state. When the `wantedScale` value is 0, the water’s Y scale is interpolated from its maximum value to 0, using Unity’s Update function as shown below:

if (canChangeScale && !isWaterFlowPaused && IsRequiredPieceConnected || (!isPieceDependent && !isWaterFlowPaused))
{
pondVisual.localScale = Vector3.MoveTowards(pondVisual.localScale, wantedScale, MyTime.deltaTime * scalingSpeed);
}


This interpolation effect creates the illusion of the water gradually rising or falling, based on the scaling speed. Once the value reaches 0, the water state transitions to empty, and the other piece begins to fill up with water. The two water pieces operate independently, responding only to their current state.

[previewyoutube][/previewyoutube]

For the flow sequence to begin, the correct piece must be connected to the current piece. If an incorrect piece is connected, the water flow will not initiate, ensuring the mechanic behaves as expected only under the right conditions.

And that’s a wrap on today’s devlog! By using this system, the team was able to replicate the natural behavior of water flow, which adds a layer of immersion to the game world. It's always exciting to bring these mechanics to life, and the team looks forward to refining this feature further.

Stay tuned for more updates, and as always, keep experimenting with dynamic systems in your own projects!

Best regards,
Playdew team

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

Devlog # 53 - Designing achievements for game

Hello!
Welcome to another behind-the-scenes look at Lost Twins 2! This week, we’re diving into a feature that adds depth, creativity, and a sprinkle of challenge to the game—Achievements.

Achievements aren’t just about collecting rewards; they’re about redefining how you approach the game. They encourage exploration, experimentation, and sometimes, a little out-of-the-box thinking. Whether it’s finding a clever solution to a puzzle or discovering hidden interactions, achievements in Lost Twins 2 are designed to enhance your journey in exciting and unexpected ways.

The Philosophy Behind Achievements

From the outset, we approached achievement design with a simple yet ambitious goal: to make them as rewarding and delightful as the core gameplay itself. We wanted achievements to challenge players in meaningful ways, pushing them to pause, think, and experiment.

In Lost Twins 2, achievements aren’t just about ticking off tasks—they’re invitations to explore the game’s puzzles from fresh perspectives. Every level includes its own unique achievement, encouraging players to rethink conventional solutions and uncover new ways to interact with the game world.

Let’s take a closer look at how our achievements elevate gameplay.

Example 1: Feathers with Abi

[previewyoutube][/previewyoutube]

In this level, it’s natural to use Ben to collect the feathers—it’s the easier option. But the achievement flips the script, challenging players to use Abi instead. This seemingly small change shifts the strategy, encouraging players to see Abi’s unique abilities in a whole new light.

Example 2: Rethinking Boulder Placement



Here, the standard solution involves placing a boulder on a button to open the path to the portal. The achievement, however, encourages players to find an alternate solution. It’s a clever twist that turns a straightforward puzzle into a moment of creative problem-solving and satisfaction.

Balancing Fun and Challenge
We worked hard to strike the perfect balance between challenge and accessibility, ensuring that every achievement feels rewarding without becoming frustrating. Our aim? To make 100% completion an achievable goal for everyone, while adding replayability and depth to each level.

Thank you for joining us on this deep dive into the achievements of Lost Twins 2. We hope this glimpse behind the curtain has inspired you to see these challenges as more than just goals—they’re opportunities to explore, experiment, and experience the game in new and exciting ways.

Your feedback and support mean the world to us, and we can’t wait to hear about the creative solutions you discover while unlocking these achievements. Don’t forget to share your favorite moments with us on social media!

Until next time, happy puzzling and see you next week!

Best regards,
Playdew Team

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

Devlog # 52 - Water effects

Hi guys! Hope you are enjoying our water devlog series. Water is a crucial element in the game, adding depth and interactivity to the game world. From creating immersive visuals to simulating realistic physics and effects, the implementation of water was a multi-faceted challenge that pushed our creativity and technical skills. In this devlog series, we’ve explored various aspects of how we brought water to life. The last two parts focused on character and interactive physics in water. Today, let’s dive into water visuals and the various effects that bring it to life.

[previewyoutube]https://youtu.be/s3SYq48etoM[/previewyoutube]

Water Visuals and Shader Implementation

Water in Lost Twins 2 is generally cuboid in shape, whether it’s in a tank or sometimes suspended in the air. To achieve this, we added planes on five sides of the cuboid, excluding the back plane. We created a custom water shader with parameters like tint, specular highlights, and most importantly, distorted refraction—a key element in making it feel like water.

The front plane, positioned close to the camera, distorts everything behind it, including characters, interactables, and the environment. This distortion is achieved using a normal map integrated into the material. The distortion effect is dynamic, influenced by a noise factor that changes over time.

Although all five planes use the same shader, their materials have slightly tweaked parameters to enhance the overall look and feel. For instance, the side, top, bottom, and front planes each have unique material settings to ensure visual consistency and immersion.

[previewyoutube][/previewyoutube]

Character Interaction

When a character or interactable enters the water, we simulate bubbles, foam, and turbulence using spritesheet effects. We utilize two distinct spritesheets: one for the water surface reaction and another for underwater turbulence.

The effects dynamically adjust based on the object’s velocity, particularly in the Y-axis. For example, objects dropped from a greater height create more pronounced turbulence before buoyancy takes over. The FX scale and movement adapt to the object’s behavior, adding a sense of realism.

While we initially experimented with Unity’s particle system, it didn’t achieve the desired visual quality. Ultimately, we opted for custom spritesheets to better match the aesthetic we envisioned.

A similar approach was taken for when characters climb out of the water. We used a different spritesheet to simulate water splashing onto the character and surrounding environment. This effect adds a finishing touch, enhancing the interaction’s believability.

[previewyoutube][/previewyoutube]

The Water Wall

Another unique feature is the “water wall,” which characters can pass through while still containing water when objects are thrown into it. Initially, we tried creating the wall using two parallel planes with a 0.2-unit distance between them, adding front and top planes for thickness. However, for optimization, we simplified the design to a single side plane. Despite this reduction, the addition of front and top planes creates the illusion of thickness, maintaining the desired visual effect.

[previewyoutube][/previewyoutube]

Thanks for sticking with us through this deep dive into water implementation! We hope you enjoyed learning about the techniques and creativity that went into making water a key feature in the game. See you next time!

Best regards,
Playdew Team
https://store.steampowered.com/app/1752540/Lost_Twins_II/

Devlog # 51 - Character physics in water Part 2

Hi again!
In our last devlog, we tackled the intricacies of character physics in water, exploring how buoyancy and fluid dynamics affect movement. This time, we’re taking it a step further by diving into the interactions between characters and in-game objects submerged in water. From floating boxes to sinking boulders, we’ll walk you through the mechanics behind how these objects behave when they enter the water, and how we’ve enhanced their physics to create a more immersive and dynamic experience. Let’s jump in!

These objects already have rigidbodies, colliders, and ground physics implemented, so adding buoyancy to them was the logical next step. Just like the characters, we added buoyancy forces to make these objects behave more naturally when submerged. The boulder, being denser, sinks slowly compared to how it behaves in air, while the box rises to the surface at a steady pace.

[previewyoutube][/previewyoutube]

Floating Box Physics

The floating box required a few extra tweaks to make it feel more natural. To achieve a gentle wobble when the box floats at the water’s surface, we added a slight variation to the buoyancy force. Initially, the box rises and falls more noticeably when it first reaches the surface, as the buoyancy force gradually decreases and stabilizes. As the forces of gravity and buoyancy find a balance, the box settles, but we continuously introduce slight fluctuations in the FixedUpdate() to maintain a subtle wobble effect.

Additionally, we had to account for when a character lands on top of the box. Since all our physics are custom, we applied a small downward impulse when the character jumps onto the box. This decreases the buoyancy just enough to submerge the box slightly more than when the character is not on it. To add a bit of realism, we also introduced a small torque force. The torque is based on the character’s X position relative to the box’s center, causing the box to rotate toward the character’s landing position. If the character lands too far to the side, the box rotates by up to 90 degrees, eventually submerging the player if they fall off.

To ensure the box remains upright in the water, we applied a lerp function to rotate the box back to the nearest 90-degree angle relative to the water’s surface.

[previewyoutube][/previewyoutube]

Pushing Boxes Underwater

When the character pushes a box underwater, we use the OnCollisionEnter() function to detect when the player collides with the box. If the player presses any directional key, force is applied to the box in that direction. Additionally, it switches the character’s animation from normal swimming to a “pushing box” animation to reflect this action.

Unstucking Boxes and Boulders

Sometimes, the box or boulder can get stuck in corners between a wall and a roof. When this happens, we added an extra layer of logic: when the character presses the up key while stuck in a corner, an additional force is applied in the opposite direction of the wall to free the object. This ensures the box or boulder can escape these tight spots and continue interacting with the character.

[previewyoutube][/previewyoutube]

In the next part of this water series, we’ll be covering how we implemented some of the special water-based effects for both characters and interactable objects. Stay tuned for more!

Best regards,
Playdew Team

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