Irevol / minetest-citadel

A minetest game
Other
3 stars 1 forks source link

Suggestion: Improve the HUD #43

Open Wuzzy2 opened 6 months ago

Wuzzy2 commented 6 months ago

The HUD still uses the default graphics and I suggest to improve it.

I suggest to use custom images for the hotbar and maybe the crosshair, too (don't forget object_crosshair.png).

The letter HUD looks really ugly and needs fixing (is this only temporary?). The letter images shouldn't be clickable buttons and I would remove the semitransparent gray background as well (with bgcolor).

Irevol commented 6 months ago

I don't think the letter is going to be temporary, but it might be removed depending on how much of its information can be communicated in other places. The images are buttons because I wanted a way to exit the hud besides escape (which now that I think about it seems unnecessary).

Wuzzy2 commented 6 months ago

I see you want to allow an "exit click". That's valid. But then I would make the buttons invisible via styling (the formspec style[] element). Also the 1 pixel offset when you click the button can also be disabled with that. So then you would still have the functionality but the player doesn't know. ;-)

Warr1024 commented 1 month ago

Piranesi has good examples on how to do books and letters. The text is "baked" into images (and since Piranesi supports translating them, this has to be automated externally) which adds some complexity but the formspecs are pretty decent.

I had considered customizing the hotbar in Piranesi, but hotbar custom IIRC break badly when they exceed the screen width, so I would only do that for games that have a very small maximum number of slots, like the way NodeCore limits to 8 unconditionally; since Piranesi has fully dynamic slots, I couldn't do this there. I was still able to customize the selection cursor though to fit the game's theme.

Re: object_crosshair ... I think having a separate one is frankly pretty blah, and we should set it to the same as whatever we pick for the main nothing/node crosshair. Especially for a singleplayer game like this where network latency isn't so much an issue (but even with latency, it can be worth it), there are better ways you can visualize when the player has something of interest within range under their cursor, such as HUDs or even in-world particle or mesh effects, and you can detect this easily with raycasting (both Piranesi and NodeCore do this to print the names of things you're pointing at under the right circumstances).