Skip to content

BEYONDWORM-115 서버, worm-died에 death reason추가하기#58

Merged
konempty merged 5 commits intofeature/BEYONDWORM-124from
feature/BEYONDWORM-115
Mar 7, 2026
Merged

BEYONDWORM-115 서버, worm-died에 death reason추가하기#58
konempty merged 5 commits intofeature/BEYONDWORM-124from
feature/BEYONDWORM-115

Conversation

@konempty
Copy link
Copy Markdown
Contributor

스크린샷 2026-02-25 오후 5 37 28 스크린샷 2026-02-25 오후 5 37 38

죽은 이유 출력되도록 수정

@konempty konempty self-assigned this Feb 25, 2026
@notion-workspace
Copy link
Copy Markdown

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @konempty, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 게임 내 지렁이 사망 시 플레이어에게 더 명확하고 상세한 피드백을 제공하기 위해 구현되었습니다. 기존에는 단순히 지렁이가 죽었다는 사실만 알렸지만, 이제는 맵 경계 초과나 다른 지렁이와의 충돌 등 구체적인 사망 원인과 가해자의 닉네임까지 표시하여 플레이어 경험을 향상시킵니다. 이는 서버와 클라이언트 양쪽의 worm-died 이벤트 처리 로직 및 사망 화면 UI 변경을 통해 이루어졌습니다.

Highlights

  • 사망 원인 정보 추가: 서버에서 worm-died 이벤트 발생 시, 지렁이 사망 원인(deathReason)과 살해한 지렁이의 닉네임(killerNickname) 정보를 추가하여 클라이언트로 전송하도록 변경되었습니다.
  • 사망 화면 UI 개선: 클라이언트의 사망 화면(DeathScene)에서 지렁이가 죽은 구체적인 이유를 표시할 수 있도록 UI가 업데이트되었으며, 관련 텍스트가 한국어로 번역되었습니다.
  • 클라이언트 로직 업데이트: 클라이언트(GameClient, GameScene)는 서버로부터 받은 사망 원인 정보를 파싱하여 사용자에게 친숙한 메시지로 변환하고, 이를 사망 화면에 전달하여 표시합니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • game-server/src/index.ts
    • worm-died 이벤트에 deathReasonkillerNickname 필드를 추가했습니다.
    • 맵 경계 초과로 인한 사망 시 deathReason을 'map_boundary'로 설정했습니다.
    • 지렁이 충돌로 인한 사망 시 deathReason을 'worm_collision'으로 설정하고, 살해한 지렁이의 닉네임을 포함했습니다.
  • game-server/src/socket/handlers.ts
    • handleCollisionReport 함수에서 worm-died 이벤트 발생 시 deathReason을 'worm_collision'으로 설정하고, 살해한 지렁이의 닉네임을 추가했습니다.
  • web-io-game/src/DeathScene.ts
    • createrenderUI 메서드에 reasonMessage 파라미터를 추가하여 사망 원인 메시지를 받을 수 있도록 했습니다.
    • 사망 원인 메시지를 표시하는 새로운 텍스트 요소를 추가했습니다.
    • 기존 UI 요소들의 수직 위치를 조정하여 사망 원인 메시지 공간을 확보했습니다.
    • 일부 UI 텍스트('FINAL SCORE', 'BEST')를 한국어('최종 점수', '최고 기록')로 변경했습니다.
  • web-io-game/src/GameClient.ts
    • WormDeathData 타입 정의에 deathReasonkillerNickname 필드를 추가했습니다.
    • worm-died 이벤트 핸들러에서 수신하는 데이터 타입을 업데이트했습니다.
    • 플레이어 사망 시 deathReasonkillerNickname을 기반으로 사용자에게 표시할 reasonMessage를 생성하고, 이를 showDeathScreen 메서드에 전달하도록 수정했습니다.
  • web-io-game/src/GameScene.ts
    • handleWormDiedFromServer 메서드의 data 타입에 deathReasonkillerNickname 필드를 추가했습니다.
    • showDeathScreen 메서드에 reasonMessage 파라미터를 추가했습니다.
    • DeathScene을 시작할 때 reasonMessage를 함께 전달하도록 수정했습니다.
Activity
  • 이 PR에는 아직 활동이 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 지렁이가 죽었을 때 그 이유를 worm-died 이벤트에 포함하여 클라이언트에 전달하고, 클라이언트에서 사망 원인을 표시하도록 수정하는 내용입니다. 전반적으로 기능 구현은 잘 되었으나, 몇 가지 개선점을 제안합니다.
주요 피드백 내용은 다음과 같습니다:

  • 클라이언트와 서버가 공유하는 WormDeathData 타입을 shared 패키지로 옮겨 중복을 제거하고 타입 안정성을 높이는 것을 제안합니다.
  • 서버 코드에서 worm-died 이벤트 페이로드를 생성하는 로직이 중복되므로, 헬퍼 함수로 추출하여 코드의 일관성과 유지보수성을 개선할 수 있습니다.
  • 클라이언트의 DeathScene에서 버튼을 그리는 UI 로직이 중복되어 있어, 이를 함수로 만들어 코드를 더 간결하게 만들 것을 제안합니다.

Comment thread web-io-game/src/GameClient.ts Outdated
Comment thread game-server/src/socket/handlers.ts Outdated
Comment thread web-io-game/src/DeathScene.ts Outdated
Copy link
Copy Markdown
Collaborator

@gangjung gangjung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

크으~ 고생하셨습니다~! 乃乃乃

@konempty konempty merged commit 18fcd96 into feature/BEYONDWORM-124 Mar 7, 2026
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.

2 participants