Repository navigation
UI improvements: grounding and shadows, two-weapon swings, water falls, bottom panel, XP bar - #104
Merged
Merged
Conversation
Two new shim notifications for the interface's animations: - shim_hero_blow (known_hitum): every melee blow the hero strikes, with the square struck, the hand it came from (the second blow of two-weapon combat or a double punch is the off hand) and whether it connected. - shim_water_fall: the hero falling into water (drown()) or a monster the hero sees drowning (minliquid_core()). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tom panel; add an XP bar - Grounding: each frame, sprites are posed by moving their anchor (never their position, so movement transitions are unaffected). The hero floats and bobs while levitating or flying, sinks into pits, lava and water, dips under and climbs out after a fall into water, and sits on a steed while riding. In high-resolution tile mode each kind of sprite casts its own shadow (feet, hover, silhouette or none, from grounding-profiles.ts), shaped from the alpha of its picture; floating monsters hover above it. - Water splashes where the hero or a seen monster falls in, and drips where the hero climbs out. - Weapon swings come from the core's per-blow reports instead of combat messages, so both hands of a two-weapon attack swing. A landed blow stops at the impact; a miss carries through and the hero stumbles. Only a swing at thin air still comes from its message. - The player position (without "- Polypiled") shares one bottom-center panel with the terrain and trap here; an engraving and the objects here stack above it. - The status bar shows experience as a number and a progress bar towards the next level (curve mirrored from exper.c and checked by a test). HP, Pw and Exp bars mark losses, flash gains, and roll over on a level up. - docs: shadows in hires-tiles.md, the new core reports in rule-candidates.md, and the kept bottom-panel click idea in ui-candidates.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
public/nethack-5.js and public/nethack-5.wasm are the game-core-wasm artifact of Build game core (WASM) run 45856537672 for 715fdfb. The glyph catalog changes only in the recorded hashes. Saves load in both directions between this core and the one on main (scripts/wasm/save-compat-core.mjs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A click cannot carry the 'm' prefix that lets a keyboard player step into
water the hero has seen, so a click on adjacent water was always refused
("You avoid stepping into the water."). A step chosen by a map click now
asks "Really step into the water?" and wades in on yes. Identified water
walking still needs no question, and lava and water walls are refused as
before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The animation of the hero's step waited at its destination until the game confirmed the hero there. When the hero ended up elsewhere (fell into water and crawled out onto the bank) or the step was refused, that confirmation never came and a copy of the hero stayed on the square for good. A confirmed square next to where the animation ends now becomes its next stop, so the walk carries on there; a hold that is not confirmed within 1.2 s goes to the hero's real square or ends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Sprites face the camera and lean back as it looks down, so their feet showed on the floor away from the square and the shadows came loose. Each frame every sprite now slides (by its anchor) so that its feet land a quarter square towards the viewer from the square's centre, or a lying object's middle on the centre, at any camera pitch, and the shadow goes on that floor point. A lying object's shadow is its own outline dropped a little down and to the right. - A fall into water goes under where the hero fell in: a stand-in sinks there while the hero waits hidden on the bank it crawled out onto, then hops up there, dripping. No copy walks from the water to the bank. - Sinking masks the picture below the floor line (a clipping plane), for the water fall and for a pit, lava and being underwater. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…277) public/nethack-5.js and public/nethack-5.wasm are the game-core-wasm artifact of Build game core (WASM) run 45898256277 for 8709cde. The glyph catalog changes only in the recorded hashes. Saves load in both directions between this core and the one on main (scripts/wasm/save-compat-core.mjs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
grounding-profiles.ts): a contact shadow at the feet, a small soft shadow under floating monsters (which hover and bob), an object's own outline dropped slightly down-right, or none for things that shine. Other tile modes keep the round blob, now under the feet.shim_hero_blow: hand and hit), so both hands swing; a hit stops at the impact, a miss carries through and the hero stumbles.shim_water_fall); a stand-in goes under where the hero fell in while the hero waits hidden on the bank, then hops up there dripping. Seen monsters drowning splash too. The hero's move animation no longer strands a copy on a square the hero never reached.mprefix); identified water walking needs no question.exper.c, checked by a test). HP, Pw and Exp bars mark losses, flash gains and roll over on a level up.Core artifacts are the CI builds (runs 45856537672 and 45898256277); saves load both ways between this core and main's.
Test plan
npx tsc --noEmit,npx vitest run(2163 passed),vite build🤖 Generated with Claude Code