Skip to content

Fix/closedtileflickering#67

Merged
kimgh06 merged 10 commits into
mainfrom
fix/closedtileflickering
Dec 31, 2025
Merged

Fix/closedtileflickering#67
kimgh06 merged 10 commits into
mainfrom
fix/closedtileflickering

Conversation

@kimgh06

@kimgh06 kimgh06 commented Dec 30, 2025

Copy link
Copy Markdown
Contributor
  • fix: flickering of closed tiles when moving

…vasRender components

- Renamed variables for clarity in the Play component, improving readability of tile indexing calculations.
- Updated interaction logic in the CanvasRender component to include range checks for flagging and opening tiles, enhancing user experience and preventing unintended actions.
- Improved comment clarity in the Play component regarding explosion range.
…omponent

- Updated the moveCursor function to accept an optional callback for actions post-movement, improving flexibility.
- Refined click handling logic to differentiate between special and general clicks, ensuring appropriate actions are taken based on tile state and click type.
- Introduced a new utility function to find opened neighbors around a target tile, enhancing the movement logic for out-of-range clicks.
- Improved code readability and maintainability through better variable naming and structured logic.
- Changed project name from "gamultong" to "gamulpung" in package-lock.json and package.json.
- Updated "next" dependency version from "^14.2.25" to "^14.2.35" in both package files.
- Updated "eslint-config-next" version from "^15.1.0" to "^14.2.35" in both package files.
- Updated various other dependencies to their latest versions, improving overall project stability and security.
- Removed redundant cursor position update and ensured it is set correctly at the end of the movement animation.
- Simplified the callback execution for movement completion using optional chaining.
- Enhanced cursor movement logic by updating the cursor position during each step of the movement animation, improving responsiveness and accuracy.
- Changed the order of cursor position updates to ensure the correct position is set before invoking the goOriginTo function, improving the accuracy of cursor movement.
- This adjustment enhances the responsiveness of the cursor during movement animations.
- Removed redundant variables for base rendering coordinates, streamlining the calculation of checkerboard patterns.
- Updated the checkerBit calculation to directly use row and column values, enhancing code clarity and reducing complexity.
- Added an eslint directive to suppress warnings for dependencies in the useEffect hook.
…nvasRender components

- Removed unnecessary SendMovePayloadType import and related message sending logic in the Play component, ensuring messages are only sent when the client cursor ID is not present.
- Updated variable names for clarity, changing 'clientCursor' to 'myCursor' and 'clientPosition' to 'myPosition' to better reflect their purpose.
- Streamlined the useEffect dependencies in the Play component to improve performance.
- Enhanced cursor movement logic in the CanvasRenderComponent by directly sending the MOVE event with updated cursor positions, improving responsiveness during movement.
- Enhanced cursor position update logic by checking for the existence of the cursor before accessing its properties, preventing potential errors.
- Updated variable naming for clarity, maintaining consistency with previous refactoring efforts.
- Added a console log for debugging purposes to track the cursor ID during initialization.
- Eliminated console log statements related to cursor ID and position to enhance code cleanliness and reduce unnecessary debugging output.
- Maintained existing functionality while streamlining the code for better readability.
@kimgh06 kimgh06 merged commit ff3ecf1 into main Dec 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant