Skip to content

Route creatures through usable gaps around room furniture - #179

Open
Rokk001 wants to merge 74 commits into
tomluchowski:shaders-improvementfrom
Rokk001:pr/room-object-navigation-2026-09
Open

Rokk001 wants to merge 74 commits into
tomluchowski:shaders-improvementfrom
Rokk001:pr/room-object-navigation-2026-09

Conversation

@Rokk001

@Rokk001 Rokk001 commented Sep 27, 2026 •

Copy link
Copy Markdown

Route creatures through usable gaps around solid room furniture, fit beds to seventy percent of their corner allocation, visibly traverse eligible low nests and bound failed work/food searches; preserve speed and avoid treating creatures as route blockers.

Prerequisites: #178, #174. The current GitHub comparison is cumulative (62 commits); this outcome adds 1 focused commit(s). Merge prerequisites separately and recheck the remaining diff.

Contribution-only comparison.

Validation: Fresh isolated MSVC syntax/type checks pass for all 21 changed translation units; object bounds, path geometry, action retries, object scale and map-version tests pass 1,636, 7,277, 24, 7 and 24 checks. The user accepted navigation in the complete fork, whose Release build passes.

Limits: No new full-game, multiplayer or Linux run is claimed; historic dense-layout diagnostics are not claimed as universally passing or as a new acceptance gate.

Issue coverage: No matching narrow open issue; this contributes to general movement presentation within #8 without closing it.

README describes furniture routing. Per-object placement/scale extends the object format and moves the application/network version to 0.7.3; 0.7.1/0.7.2 maps remain loadable, and network endpoints must match.


Supersedes #127, closed and force-pushed by mistake; recreated with the same content and cleaned-up commit trailers.

Rokk001 and others added 30 commits September 7, 2026 00:29
Embed per-monitor DPI awareness and maintain the verified OGRE 13.6.5 renderer patch required for context-safe window replacement, runtime GL options and correct fullscreen client geometry.

Validation: clean Release build, DPI and 3440x1440 fullscreen probes, three GL3Plus variants and the patch reverse check passed; version 0.7.1 remains unchanged because this is unreleased work and the project has no changelog.
Apply display, input, audio, gameplay, minimap, shadow and negotiated nickname changes to the running session while preserving rollback for failed window or input transitions and keeping the 3440x1440 navigation visible.

Validation: clean Release and Debug builds, packet tests, DPI, layout and GL3Plus probes passed; the user confirmed the reported resolution, fullscreen, cursor, flicker and navigation failures are fixed. Version 0.7.1 remains unchanged because this is unreleased work and the project has no changelog.
The spells tab put its ten buttons in a single row of 60 pixel squares running
out to x=700. The pane they live in is the window width minus the 200 pixels of
minimap, so at the 800 wide minimum window it is 600 pixels across, and the last
two spells, Weakness and the Eye of Evil, hung past its right edge where they
could be neither seen nor clicked. Only a window at least 900 wide showed the
whole row, and nothing said so.

The rooms tab solved the same problem long ago: two rows of 40 pixel buttons.
The spells tab now uses the same shape, five spells to a row, ending at x=300
with room to spare at any size the game accepts. The cooldown bar inside each
button now covers exactly its button too, instead of overhanging 20 pixels on
both sides, which with narrower buttons would have bled half way across the
neighbours.

The rooms tab had the tail of the same bug: the temple and portal buttons the
editor uses sat at x=570 to 690, past the same edge. They join the end of the
second row instead.

(cherry picked from commit 10db1cb)
The README documents progression; the application/network version changes to 0.7.2 and both endpoints must match; 0.7.1 saved maps remain loadable, while older network replays are incompatible.
Include the upstream community panel and worker effect; retain the existing non-overlapping HUD grid and bounded spell progress bars.
XML structure, geometry and changed C++ syntax/type checks pass.
No additional version or README change is required.
Include the upstream community panel and worker effect; retain the existing non-overlapping HUD grid and bounded spell progress bars.
XML structure, geometry and changed C++ syntax/type checks pass.
No additional version or README change is required.
Replace the auto declarations introduced by this branch with explicit types,
as requested in issue tomluchowski#42 and required by CLAUDE.md. No behavioural change.
Rokk001 added a commit to Rokk001/OpenDungeonsPlus that referenced this pull request Sep 29, 2026
The merge commits c58f317 (in tomluchowski#184) and 6c919da (in tomluchowski#173), both named
"Replace creature indicator prerequisite with corrected assembly"
(2026-09-21), replace source/entities/Creature.cpp in their PR branches
with an assembled version and thereby drop code of other features. Like
the trim commit c28f93d of tomluchowski#218 they only cut the pull request to size
and are not content decisions, so their deletions are not taken over.
When tomluchowski#173 (step 63) and tomluchowski#184 (step 64) were merged, Git applied these
deletions without a conflict.

Restored in source/entities/Creature.cpp, in the version of
full-build-h1-h7, which matches the PR branches that still contain it
(e.g. tomluchowski#176, tomluchowski#177, tomluchowski#179, tomluchowski#203):
- exportToStream()/doUpkeep(): only creature particle effects are saved,
  timed non-creature effects expire (upstream 00011b8 "Add worker
  creation effect", PR tomluchowski#109)
- addParticleEffect() (same origin)
- doUpkeep(): get-up animation after knock-out (tomluchowski#171, 6c2ec11)
- useAttack(): face creature targets, ranged and melee attack animations
  (tomluchowski#176, 80c42b2)
- fireCombatImpact() (tomluchowski#176, 80c42b2) and fireChickenFeeding() (tomluchowski#177,
  7efafff)
- setDestination() and checkWalkPathValid(bool) with the room object
  check, plus the RoomObjectNavigation include (tomluchowski#179, 8c48b90)

Without these definitions Creature.h declared functions that
Creature.cpp no longer defined.
Rokk001 added a commit to Rokk001/OpenDungeonsPlus that referenced this pull request Sep 29, 2026
Follow-up to 307358c: the assembly merges c58f317 (tomluchowski#184) and 6c919da
(tomluchowski#173) also reverted these lines in source/entities/Creature.cpp. They
are restored in the version of full-build-h1-h7, which matches the PR
branches that still contain them:
- handleIdleAction(): a failed wander is retried next turn instead of
  repeatedly in the same upkeep (tomluchowski#179, 8c48b90)
- useAttack(): comment on the ranged attack animation (tomluchowski#176, 80c42b2)
Rokk001 added 11 commits October 3, 2026 09:25
…path length code and document the navigation interface
The Windows scripts read the dependency, Visual Studio and Python locations
from one shared script, now named windows-paths.ps1 with the variables
taskDependencyRoot and taskPythonCmakeRoot. The locations can still be set
with OD_DEPS_ROOT, OD_PYTHON_ROOT and OD_VS_PATH.
…body below their top

Measure the walking envelope of every creature below each bed top, add the missing bed heights and the adventurer bed bounds, and read the step height limit from BedStepMaxHeight.
A creature whose body below the bed top fits the lane between two beds still walks through it. Update the navigation checks that asserted the old blocking.
setDestination failed whenever the refinement around room objects removed the
whole walk path (for example when the destination tile centre is covered by an
object), which made carry and wall claim actions log an error. The existing
tile path is now walked unrefined in that case; a real missing path still fails.
…finement

Cause of the carry/claim path error (traced in the source):
- Creature::setDestination (source/entities/Creature.cpp:4467) builds the tile
  path via GameMap::path and tileToVector2 (4479) and calls setWalkPath (4481).
- MovableGameEntity::setWalkPath (MovableGameEntity.cpp:88-97) passes the path to
  RoomObjectNavigation::refine for server-side creatures when
  pathAlreadyRefined is false (setDestination passes false).
- refine (RoomObjectNavigation.cpp:277) clears the whole path and returns true
  in two cases: (a) the path end has no clear standing point among the 8x8
  sample points of its tile (standingPosition, 255-275, called at 301-304) and
  (b) no route around the room objects is found (402-406).
- setWalkPath then fills mWalkQueue from the empty path (MovableGameEntity.cpp
  ~100-106), so isMoving() (MovableGameEntity.cpp:50, mWalkQueue not empty) is
  false although the tile path was valid.
- The old setDestination (origin/integration/all, Creature.cpp:4481-4482)
  treated "not moving and not already on the tile" as failure and returned
  false. The callers log the error and drop the action:
  CreatureActionCarryEntity.cpp:95-97 and CreatureActionClaimWallTile.cpp:89-91.
- It only happens by chance because it depends on the room object layout
  (rooms, object positions, rotation, scale) around the destination tile and
  on the creature (mesh walking radius, level, heading), i.e. on which tile the
  carry/claim target happens to be. The same call succeeds when the target tile
  has a free spot or a route exists.

The fix walks the unrefined tile path and only fails when the tile path itself
is empty. The check is a source structure check of setDestination; it fails on
origin/integration/all (pass its Creature.cpp as argument) and passes with the
fix. It cannot run the pathfinding; reproducing a real layout needs a build
and a running game.
Take over the shared script locations so the Windows scripts no longer contain a personal home folder path: the dependency, Visual Studio and Python locations are read from windows-paths.ps1.

This branch has not been deployed

No deployments
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