Skip to content

[FEAT] Mirrored Game Mode#432

Merged
DeguShi merged 3 commits intodevfrom
feat/380/spawn-mirror-snake
Dec 13, 2025
Merged

[FEAT] Mirrored Game Mode#432
DeguShi merged 3 commits intodevfrom
feat/380/spawn-mirror-snake

Conversation

@jotaefepinho
Copy link
Collaborator

@jotaefepinho jotaefepinho commented Dec 3, 2025

This PR implements the sub-issue in #380. It's still being worked on. It implements:

  • [FEAT] Add "Mirrored" game mode option to UI
  • [FEAT] Implement collision rules for Mirrored mode
  • [FEAT] Implement mirrored growth and scoring

Copy link
Collaborator

@ghtormena ghtormena left a comment

Choose a reason for hiding this comment

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

great job! it seems pretty clear to me :)

Copy link
Collaborator

@DeguShi DeguShi left a comment

Choose a reason for hiding this comment

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

@jotaefepinho @bruno-lim4 The mirrored snakes can cross/overlap the board because there's no position mirroring, only input mirroring. Both snakes move independently using the same wrapping logic. I recommend adding actual position constraints to keep the snakes mirrored. Another thing I noticed is that the start position of the snakes is only properly mirrored when I use odd-sized grids; however, the frontal collision seems to happen before the actual collision then (might be visual lag, not sure). The screen recording below was taken from a 16×16 grid:

Screen.Recording.2025-12-04.at.10.26.32.mov

Apart from that, it would be interesting to rebase the branch, as many changes seem to have been merged into dev compared to what the branch currently has.

@jotaefepinho jotaefepinho force-pushed the feat/380/spawn-mirror-snake branch from d9ed8a4 to 588afa7 Compare December 4, 2025 15:58
Copy link
Collaborator

@LeticiaBN LeticiaBN left a comment

Choose a reason for hiding this comment

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

The game is working fine now, you fixed the bugs @DeguShi mentioned. Very good game mode!!

Please rebase the PR before I approve: there are conflicts with some files that were updated in dev

@DeguShi
Copy link
Collaborator

DeguShi commented Dec 5, 2025

Like @LeticiaBN said, as soon as the conflicts are resolved I will approve the merge. The game mode is great, good job!

@DeguShi DeguShi added this to the 1.0.0 milestone Dec 5, 2025
@DeguShi DeguShi added the enhancement New feature or request label Dec 5, 2025
@DeguShi DeguShi changed the title feat/380/spawn mirror snake [FEAT] Mirrored Game Mode Dec 5, 2025
@jotaefepinho jotaefepinho force-pushed the feat/380/spawn-mirror-snake branch from 72ed08e to 20f27fb Compare December 13, 2025 02:14
@jotaefepinho
Copy link
Collaborator Author

The code is apparently working now. Small heads-up: Mirrored mode must have an even-sized grid, otherwise some positions become unreachable.

Copy link
Collaborator

@DeguShi DeguShi left a comment

Choose a reason for hiding this comment

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

looks great! congrats

@DeguShi DeguShi dismissed LeticiaBN’s stale review December 13, 2025 03:52

He has fixed everything

@DeguShi DeguShi merged commit 76b1328 into dev Dec 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Spawn and move the Mirror Snake [FEAT] Implement "Mirrored" Game Mode

5 participants