Battle replay: surface new combat mechanics, fix zone alignment#147
Merged
Conversation
…play The battle replay now renders combat mechanics the gameserver already logs but the view ignored: burn damage-over-time, splash/collateral hits, remote hull repair from allied logistics, and per-shot ammo. Ship overlays show active disruption/burn/armor-melt status badges and the loaded ammo + magazine count per weapon, and ships carry status-effect indicators on the canvas. Fixes the loadout panel showing NaN% (it read a module quality field the server never sends). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZXMs46rdfWEbSHqKovo8j
… dead POI code The server lays each side out along an arbitrary axis (origin-POI direction or a battle-ID seed), but the replay drew zone bands as vertical dividers and hardcoded ship facing to horizontal, so bands, labels and ship orientation were misaligned whenever the axis wasn't horizontal. The replay now derives the battle axis from the data (side centroids, or a PCA fallback) and renders the four rings (outer/mid/inner/engaged) perpendicular to it, with ship facing following the axis. Attack events show the 0-6 separation that weapon reach maps onto. Removes the system-POI fetch scaffolding, which was never wired (the battle-log API carries no POI data) and only produced dead branches. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZXMs46rdfWEbSHqKovo8j
Completed battles never showed faction affiliation because the summary omitted it; with the gameserver now supplying a faction tag per side, the battle list displays it (preferred over the raw faction id) for both active and completed battles. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZXMs46rdfWEbSHqKovo8j
Memoizes the per-tick event feed so it isn't rebuilt on hover/mouse-move renders, adds an aria-label to the replay canvas, and explicitly resets the line dash for non-splash attack lines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZXMs46rdfWEbSHqKovo8j
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
The battle view (
/battleslist +/battles/[id]replay) was built against an older version of the gameserver battle-log API and had drifted out of sync with combat. This updates it to render the combat mechanics the server already logs, fixes a rendering bug, and corrects how the replay draws zones.NaN%— it read a module "quality" field the server never sent.User-Facing Changes