Draft
Conversation
- improve room and corridor positions - add corridors - improve pathfinding throught corridors - fix steps not being displayed properly
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Fix missing comma
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a Marauders Map feature to the application by adding new modules for types, time handling, scheduling, character motion (including pathfinding), and a UI page to render the live map.
- Added TypeScript type definitions for game entities and utility types.
- Implemented scheduling, pathfinding, and character update logic for dynamic map behavior.
- Developed a client-side React component to render and animate the Marauders Map using SVG.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/fun/marauders-map/types.ts | New type definitions for time blocks, characters, rooms, and related data structures. |
| app/fun/marauders-map/time.ts | Utility function to map game time to a time block, including a dual night block handling. |
| app/fun/marauders-map/schedule.ts | Scheduling, character movement, and footstep creation logic for dynamic behavior. |
| app/fun/marauders-map/pathfinding.ts | A* pathfinding implementation with grid creation and corridor integration. |
| app/fun/marauders-map/page.tsx | A React component rendering the Marauders Map UI, character movements, and debug overlays. |
| app/fun/marauders-map/constants.ts | Constants for layout, timing, paths, and room data used throughout the feature. |
Comments suppressed due to low confidence (2)
app/fun/marauders-map/page.tsx:45
- The 'updateCharacter' function is called using a 'gameTime' value from the closure, which may be stale after 'setGameTime' is updated. Consider computing the new 'gameTime' and passing that value to ensure the character updates are synchronized with the latest time.
prevCharacters.map(char => updateCharacter(char, currentTime, gameTime, gridRef.current))
app/fun/marauders-map/time.ts:5
- The logic for night time blocks splits the night into two values ('NIGHT1' for hours >= 22 and 'NIGHT2' for hours < 6) even though both cover the same overall range. Verify whether this split is intentional or if adjustments to the conditions are needed.
if (hour >= 22 || hour < 6) {return hour >= 22 ? 'NIGHT1' : 'NIGHT2';}
…racter movement handling
Owner
Author
|
@copilot update this branch and resolve merge conflicts if they occure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.