arianne / stendhal

Stendhal is a fun friendly and free multiplayer online adventure game with an old school feel.
https://arianne-project.org
GNU General Public License v2.0
599 stars 201 forks source link

Entity Hints for Devices Without Mouse/Cursor Support #618

Closed AntumDeluge closed 8 months ago

AntumDeluge commented 11 months ago

💡 Describe your idea

Traditionally, for desktop systems employing mice, the cursor is updated when hovering over certain entities to inform the player they can interact with it. For devices that do not use a mouse/cursor for input, such as a moible touch enabled devices, such entities may not be clear.

One example is the note in the apothecary cabin. It is a reader/sign to hint at Traps for Klaas quest:

1000004735-01

🛠️ Suggested fixes

We could use icons over the entity, similar to an icon shown for status effects or when an NPC has an idea, to notify player it is interactive.

It could also be used for corpses that aren't empty.

AntumDeluge commented 10 months ago

Added indicator for non-empty corpses: 61199a54110de4fc1009aaa8712a1e93ad7ead70

stendhal-2024 01 26-19 11 16

AntumDeluge commented 8 months ago

Added support for displaying indicator on sign entities: 7925376b2e26e2c98a76069ddfb85daf10b9ccdb

Example usage from data/conf/zones/semos.xml:

        <!-- Note on table -->
        <entity x="12" y="8">
            <implementation class-name="games.stendhal.server.entity.mapstuff.sign.Sign"/>
            <attribute name="text">Dear Klaas,

Unfortunately I will not be able to visit Athor this year. I have run into a bit of bad luck. Perhaps when times get better we'll be able to chat once again.</attribute>
            <attribute name="class">transparent</attribute>
            <attribute name="activity-indicator"/> <!-- display indicator -->
        </entity>