Skip to content

Show creature health, needs, experience and attack recovery - #108

Closed
Rokk001 wants to merge 3932 commits into
tomluchowski:shaders-improvementfrom
Rokk001:pr/creature-health-and-needs
Closed

Rokk001 wants to merge 3932 commits into
tomluchowski:shaders-improvementfrom
Rokk001:pr/creature-health-and-needs

Conversation

@Rokk001

@Rokk001 Rokk001 commented Sep 8, 2026 •

Copy link
Copy Markdown

Show visible creatures' owner-coloured segmented health rings and alternating level and needs display. Indicators are enabled by default; Alt toggles the chosen state, zoom enlarges the overlay, and depleted segments disappear without obscuring creature details.

The overlay now also shows experience toward the next level and attack-recovery progress. Capability negotiation keeps mismatched clients and servers from reading unsupported progress fields.

Depends on #93 for synchronized creature data. Review the progress follow-up.

Validation: progress and packet checks pass 377 assertions, level-caption rendering passes 557, and Alt handling passes 130. No new full-game, multiplayer or other-platform run is claimed; matching endpoints are required for the new optional fields.

Related to #84 and #6 without claiming either broader issue is fully resolved.

tomluchowski and others added 30 commits February 1, 2023 18:41
New TileVisual types for all the rooms, and tileset.cfg modifed to allow proper config of neighbouring tiles, for example for TileVisual::hatcheryRoom the code shall compute the neighbouring index e.g. 1010 and give an appropriate tile
Minor bug not allowing the destruction of rooms also fixed
Missing room meshes added, treasury tiles should now display ok
TileVisuals can now impose setting the position ofa creature diffrent than z=0
Now all ground tiles meshes should use Room.mesh
…k around celler or fight there when they are being dropped there
CMakeList.txt modfied due to paroj fixtures, all tests are now passed
tile info for debugging information -- seat, position, visualTileType, tileType, floodFillValue, floodfill bug introduced at 5409832
Rename to OpenDungeonsPlus in readme
@Rokk001 Rokk001 changed the title Show persistent creature health and needs Toggle creature health and needs with Alt Sep 19, 2026
@Rokk001

Rokk001 commented Sep 19, 2026

Copy link
Copy Markdown
Author

Alt now toggles the indicators on/off with each press, rather than requiring it to be held: 92c4e5c; the accepted health-petal transparency stays unchanged.

Remove depleted fills and borders while preserving surviving health segments and the centre. Update player guidance and add the 200-check texture regression. No release version or protocol change is needed; the existing PR documents this unreleased feature correction.
@Rokk001

Rokk001 commented Sep 20, 2026

Copy link
Copy Markdown
Author

Fixed in 8fcbbf2d: empty health segments and their dark borders are now fully transparent, leaving creature details visible; filled segments and the centre stay unchanged. Visually tested and accepted.

@Rokk001 Rokk001 changed the title Toggle creature health and needs with Alt Show creature health, needs, experience and attack recovery Sep 21, 2026
@Rokk001

Rokk001 commented Sep 21, 2026

Copy link
Copy Markdown
Author

Added in c255fbc6: indicators start visible, scale with zoom, and show experience plus attack recovery; the earlier Alt and empty-segment fixes remain intact.

# Conflicts:
#	source/entities/Creature.cpp
Style reference: materials/textures/portrait-Goblin.mesh.png.
Output: materials/textures/portrait-Monk.mesh.png.

Create ONE original painted 2D creature portrait in a narrow vertical exactly 1:2 aspect ratio. Image 1 is the existing project's model, which strictly controls species, anatomy, colors, clothing and identity. Image 2 is a new goblin illustration used ONLY for painterly style, composition, and opaque dark navy backdrop. Expressive hand-painted late-1990s dark-fantasy strategy-game art, humorous sinister personality where anatomy permits, bold brush-shaped shadows and highlights readable at 50x100 pixels, clearly illustrated not photoreal or a 3D render. Keep the whole head within frame in upper half, neck/upper body below, subtle three-quarter pose, no UI border, text, count, added gear, humanization of animals, or extra characters. The subject is the stocky human monk from image 1: light skin, short brown bowl-cut hair with high forehead, clean-shaven round face, plain loose rust-brown robe with modest cowl neckline and simple ochre rope belt only if visible. An amusingly nervous but kindly half-smile, head and upper torso portrait, no weapon, no cross or newly invented emblem.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ha ha, where did you get those instructions for portrait generator ?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ehem I am just courius, indeed they are up to the point.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I used Astral for that.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What are ps1 one files ? Seems they automate a lots of job with MSVC.
How do I use them under MVSC ?
Ehem task root is hardcoded for $taskRoot = 'C:\Users\mario\od-deps' shouldn't that be more flexible design ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch, thanks. These are PowerShell scripts that build the Windows dependencies (Boost, OGRE, CEGUI, etc.) with MSVC and set up the dev environment.

Fixed in be70eeb: the paths now come from scripts/win32/windows-paths.ps1, defaulting to %USERPROFILE%\od-deps, Python 3.10 under %LOCALAPPDATA% and VS 2022 Build Tools. You can override them with OD_DEPS_ROOT, OD_PYTHON_ROOT and OD_VS_PATH.

Usage: run the install-*-prereq.ps1 scripts once, then configure-windows-prereqs.ps1, then cmake --build build\windows --config Release. For VS Community, set $env:OD_VS_PATH = 'C:\Program Files\Microsoft Visual Studio\2022\Community' first.

if (config.immutable || config.possibleValues.empty())
continue;

// OGRE may repeat colour depths for different fullscreen refresh rates.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

It has never appeared to me for ODP to list twice the same resolution, but let stay with this step.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's the colour depth, not the resolution. OGRE's GL render system adds the bit depth once per refresh rate in fullscreen and only deduplicates before that loop (OgreGLRenderSystemCommon.cpp), so a monitor with 60/120/144 Hz shows "32" three times. The change just deduplicates the list before display.

@tomluchowski

tomluchowski commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
I didn't know that the DPI ( dots per inch) of modern display has changed so much , and that could cause havoc when rendering ..... Would like to have a clean info among this patch what is DPI awareness and why care at all.
Strange OGRE 13 does not support this by default.

Replace the hardcoded dependency, Python and Visual Studio locations in the
Windows scripts with a shared windows-paths.ps1. The defaults derive from the
current user profile and can be overridden with OD_DEPS_ROOT, OD_PYTHON_ROOT
and OD_VS_PATH.
@Rokk001

Rokk001 commented Sep 24, 2026

Copy link
Copy Markdown
Author

DPI awareness tells Windows the game handles display scaling itself. Without it, at >100% scaling Windows reports a smaller resolution and upscales the rendered image, so the game looks blurry and the mouse is offset. OGRE leaves this to the application, so the patch declares it in the game's manifest (dist/opendungeons.manifest).

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.
throw std::runtime_error("invalid video mode: " + selectedVideoOptions[Config::VIDEO_MODE]);

const uint32_t width = static_cast<uint32_t>(Helper::toInt(resolution[0]));
const uint32_t height = static_cast<uint32_t>(Helper::toInt(resolution[1]));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Intresting Claude builds in the language of functions which are already there, doesn't define new ones. In this case I mean "toInt" .....

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Reusing what is already there is the goal: Helper::split and Helper::toInt already parse the WIDTHxHEIGHT video mode string, so no new helper was needed for it.

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.

6 participants