{"author_link":"\/users\/sadvest","author_name":"sadvest","author_uid":"sadvest","comments":[],"epoch":1744571825,"event":"LD57","format":"md","ldjam_node_id":414881,"likes":3,"metadata":{"p_key":"211360","p_author":"sadvest","p_authorkey":"1411561","p_urlkey":"451165","p_title":"Postmortem of my first Ludum Dare","p_cat":"LDJam ","p_event":"LD57","p_time":"1744571825","p_likes":"3","p_comments":"0","p_status":"WAYBACK","us_key":"1411561","us_name":"sadvest","us_username":"sadvest","event_start":"1743811200","event_key":"111","event_name":"Ludum Dare 57"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD57","removed_author":false},"_superparent":406845,"_trust":1,"author":411561,"body":"I made my first fully playable game(a 3D sokoban puzzle) in this event! I\u2019d like to share some things I have learned about using DOTween and tips for building with Unity WebGL.\n\n **DOTween**\n\n1. DOTween\u2019s 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.\n\n2. More importantly, sequences support function callbacks and interruption controls. I used this to make action cancelling, and got a control feel I\u2019m pretty satisfied with. Here's how it works:\n```\n\/\/  This is not the best way to handle action cancelling, but it's simple and effective for a game jam.\nif (canReceiveInput && playerHasInput)\n{\n    \/\/ the true parameter tells DOTween to complete the current movement sequence immediately,\n    \/\/ rather than stopping it\n    moveSequence.Kill(true);\n\n    \/\/ ... (Create a new movement sequence based on the player's input)\n    \n    \/\/ Insert a callback to reopen the input window at the cancelable time\n    moveSequence.InsertCallback(canCancelTime, () => \n    {\n        canReceiveInput = true;\n    });\n\n    \/\/ Immediately close the input window to prevent duplicate inputs\n    canReceiveInput = false;\n}\n```\n\n3. Here\u2019s an unexpected discovery: In my game, the movement of boxes uses DOTween\u2019s default easing `Ease.OutQuad()`, while the player movement uses `Ease.OutCubic()`. This means that, over the same distance and time, the player starts off moving faster than the box.\nThis setup creates a surprisingly smooth, inertia-like effect when pushing the boxes, and I really liked the result!\n\n![LD57_PushBoxAnim.gif](\/\/\/raw\/9a7\/46\/z\/6c277.gif)\n\n **Delay function in Unity Web build**\n\nIn Unity's WebGL builds, you can't use `await Task.Delay()` for delays because WebGL doesn't support multithreading. There are a few \talternative solutions:\n\n1. Use **UniTask** plugin (seems like a lot of people are using this)\n\n2. Unity `Coroutine`, but more clunky to write.\n\n3. `Awaitable` provided by Unity (since **2023.1**).\n\nAlso, 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.\n\nLastly, here's my entry:\nhttps:\/\/ldjam.com\/events\/ludum-dare\/57\/theres-no-depth-in-top-view\n\nIf you enjoy solving puzzles, give it a try!\n\n","comments":1,"comments-timestamp":"2025-04-13T19:47:41Z","created":"2025-04-13T17:52:14Z","files":[],"files-timestamp":0,"id":414881,"love":3,"love-timestamp":"2025-04-13T19:51:34Z","meta":[],"modified":"2025-04-13T19:51:34Z","name":"Postmortem of my first Ludum Dare","node-timestamp":"2025-04-13T19:17:05Z","parent":411563,"parents":[1,5,9,406845,411563],"path":"\/events\/ludum-dare\/57\/theres-no-depth-in-top-view\/postmortem-of-my-first-ludum-dare","published":"2025-04-13T19:17:05Z","scope":"public","slug":"postmortem-of-my-first-ludum-dare","subsubtype":"","subtype":"","type":"post","version":1310098},"node_metadata":{"n_key":"414881","n_urlkey":"451165","n_parent":"411563","n_path":"\/events\/ludum-dare\/57\/theres-no-depth-in-top-view\/postmortem-of-my-first-ludum-dare","n_slug":"postmortem-of-my-first-ludum-dar","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"411561","n_created":"1744566734","n_modified":"1744573894","n_version":"1310098","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/57\/theres-no-depth-in-top-view\/postmortem-of-my-first-ludum-dare","text":"I made my first fully playable game(a 3D sokoban puzzle) in this event! I\u2019d like to share some things I have learned about using DOTween and tips for building with Unity WebGL.\n\n **DOTween**\n\n1. DOTween\u2019s 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.\n\n2. More importantly, sequences support function callbacks and interruption controls. I used this to make action cancelling, and got a control feel I\u2019m pretty satisfied with. Here's how it works:\n```\n\/\/  This is not the best way to handle action cancelling, but it's simple and effective for a game jam.\nif (canReceiveInput && playerHasInput)\n{\n    \/\/ the true parameter tells DOTween to complete the current movement sequence immediately,\n    \/\/ rather than stopping it\n    moveSequence.Kill(true);\n\n    \/\/ ... (Create a new movement sequence based on the player's input)\n    \n    \/\/ Insert a callback to reopen the input window at the cancelable time\n    moveSequence.InsertCallback(canCancelTime, () => \n    {\n        canReceiveInput = true;\n    });\n\n    \/\/ Immediately close the input window to prevent duplicate inputs\n    canReceiveInput = false;\n}\n```\n\n3. Here\u2019s an unexpected discovery: In my game, the movement of boxes uses DOTween\u2019s default easing `Ease.OutQuad()`, while the player movement uses `Ease.OutCubic()`. This means that, over the same distance and time, the player starts off moving faster than the box.\nThis setup creates a surprisingly smooth, inertia-like effect when pushing the boxes, and I really liked the result!\n\n![LD57_PushBoxAnim.gif](\/\/\/raw\/9a7\/46\/z\/6c277.gif)\n\n **Delay function in Unity Web build**\n\nIn Unity's WebGL builds, you can't use `await Task.Delay()` for delays because WebGL doesn't support multithreading. There are a few \talternative solutions:\n\n1. Use **UniTask** plugin (seems like a lot of people are using this)\n\n2. Unity `Coroutine`, but more clunky to write.\n\n3. `Awaitable` provided by Unity (since **2023.1**).\n\nAlso, 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.\n\nLastly, here's my entry:\nhttps:\/\/ldjam.com\/events\/ludum-dare\/57\/theres-no-depth-in-top-view\n\nIf you enjoy solving puzzles, give it a try!\n\n","title":"Postmortem of my first Ludum Dare","wayback_source":[]}