Postmortem of my first Ludum Dare
I made my first fully playable game(a 3D sokoban puzzle) in this event! I’d like to share some things I have learned about using DOTween and tips for building with Unity WebGL.
DOTween
DOTween’s Sequence feature makes it really easy to control animations. You can freely combine multiple tweens in one sequence. In my game, for example, the jump animation is built by combining horizontal and vertical movements within a sequence.
More importantly, sequences support function callbacks and interruption controls. I used this to make action cancelling, and got a control feel I’m pretty satisfied with. Here's how it works: ``` // This is not the best way to handle action cancelling, but it's simple and effective for a game jam. if (canReceiveInput && playerHasInput) { // the true parameter tells DOTween to complete the current movement sequence immediately, // rather than stopping it moveSequence.Kill(true);
// ... (Create a new movement sequence based on the player's input)
// Insert a callback to reopen the input window at the cancelable time moveSequence.InsertCallback(canCancelTime, () => { canReceiveInput = true; });
// Immediately close the input window to prevent duplicate inputs canReceiveInput = false; } ```
Here’s an unexpected discovery: In my game, the movement of boxes uses DOTween’s default easing
Ease.OutQuad(), while the player movement usesEase.OutCubic(). This means that, over the same distance and time, the player starts off moving faster than the box. This setup creates a surprisingly smooth, inertia-like effect when pushing the boxes, and I really liked the result!

Delay function in Unity Web build
In Unity's WebGL builds, you can't use await Task.Delay() for delays because WebGL doesn't support multithreading. There are a few alternative solutions:
Use UniTask plugin (seems like a lot of people are using this)
Unity
Coroutine, but more clunky to write.Awaitableprovided by Unity (since 2023.1).
Also, I found a lot of people in this LD are using Godot. I'm thinking of learning this engine and trying it out for my next game.
Lastly, here's my entry: https://ldjam.com/events/ludum-dare/57/theres-no-depth-in-top-view
If you enjoy solving puzzles, give it a try!