Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaws in mouse cursor control in FixedRoom2D #255

Open
MarkOates opened this issue Mar 31, 2023 · 0 comments
Open

Flaws in mouse cursor control in FixedRoom2D #255

MarkOates opened this issue Mar 31, 2023 · 0 comments

Comments

@MarkOates
Copy link
Collaborator

MarkOates commented Mar 31, 2023

FixedRoom2D has mouse support, however, it includes the following design flaws:

  1. Mouse cursor movement speed is not the same as the normal system mouse speed. E.g. the native AllegroFlare display is 1920x1080, but on a display that is 4k the mouse will appear to move much faster, as it's speed is at 4k values. Solution might be to translate the world projection dimensions to the physical dimensions of the display, and scale those dimensions proportionally. What I really don't want is a "mouse sensitivity" option in the settings, ugh. The mouse movement and speed should be identical to how it feels on the OS.
  2. FixedRoom2D/Screen takes raw allegro mouse events. There should probably be some kind of virtual controller fed to FixedRoom2D/Screen. The mouse, keyboard, and joystick could then be mapped to the controller.
  3. Each FixedRoom2D/Room has a cursor. This seems a bit odd and the cursor should be more of a global object that doesn't do things like change to a new position each time you go in that room.
  4. Cursor does not detect or 'hover' over an object when first entering a room. To detect, the cursor must be moved first.
  5. Mouse is incompatible with the inventory screen.
  6. It's unclear if the dimensionality of the room should be involved in the clamping of the mouse cursor position. More likely, it should be clamped to the dimensions of the screen.
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

No branches or pull requests

1 participant