Better debug mouse #20

Merged
pyrex merged 2 commits from kistaro/chameleonic:better_debug_mouse into main 2023-01-02 00:31:34 +00:00
Contributor

Debug mouse is now its own module, so it can be separated from the hint system, since it is useful for more than just positioning hints. It now has the following enhancements:

  1. Clock-based table cyclng now has a helper function (cycle)
  2. Debug mouse color cycling is distinct from hint color cycling, so debug position readout remains legible
  3. Debug position readout now stays on screen even when the cursor is near or past the edges
  4. Debug cursor cycles between a mouse sprite specifically marking the exact pixel that is being sampled, an "X" for text character sizing, and a "□" for positioning the centered 3x3 characters often used as hint target markers
  5. Map cell coordinates (in square brackets) are displayed in addition to pixel coordnates (in parentheses)

Sprite 50 is now the mouse cursor. Color 15 is color cycling for debug readouts.

Debug mouse features can be disabled by commenting out add(real_modules, debugmouse).

I've done a little bit of golfing but this is stiill a token expense. I'm going to write a crappy sprintf function to save tokens everywhere we're assembling strings from their component parts.

This has a merge conflict with writing hints for the first few stages, put in whichever you prefer to put in first and let me know and I'll resolve the conflict.

Debug mouse is now its own module, so it can be separated from the hint system, since it is useful for more than just positioning hints. It now has the following enhancements: 1. Clock-based table cyclng now has a helper function (cycle) 2. Debug mouse color cycling is distinct from hint color cycling, so debug position readout remains legible 3. Debug position readout now stays on screen even when the cursor is near or past the edges 4. Debug cursor cycles between a mouse sprite specifically marking the exact pixel that is being sampled, an "X" for text character sizing, and a "□" for positioning the centered 3x3 characters often used as hint target markers 5. Map cell coordinates (in square brackets) are displayed in addition to pixel coordnates (in parentheses) Sprite 50 is now the mouse cursor. Color 15 is color cycling for debug readouts. Debug mouse features can be disabled by commenting out `add(real_modules, debugmouse)`. I've done a little bit of golfing but this is stiill a token expense. I'm going to write a crappy sprintf function to save tokens everywhere we're assembling strings from their component parts. This has a merge conflict with writing hints for the first few stages, put in whichever you prefer to put in first and let me know and I'll resolve the conflict.
kistaro added 1 commit 2023-01-01 21:34:06 +00:00
Debug mouse is now its own module, so it can be separated from the hint system, since it is useful for more than just positioning hints. It now has the following enhancements:

1. Clock-based table cyclng now has a helper function (cycle)
2. Debug mouse color cycling is distinct from hint color cycling, so debug position readout remains legible
3. Debug position readout now stays on screen even when the cursor is near or past the edges
4. Debug cursor cycles between a mouse sprite specifically marking the exact pixel that is being sampled, an "X" for text character sizing, and a "□" for positioning the centered 3x3 characters often used as hint target markers
5. Map cell coordinates (in square brackets) are displayed in addition to pixel coordnates (in parentheses)

Sprite 50 is now the mouse cursor. Color 15 is color cycling for debug readouts.

Debug mouse features can be disabled by commenting out `add(real_modules, debugmouse)`.

I've done a little bit of golfing but this is stiill a token expense. I'm going to write a crappy sprintf function to save tokens everywhere we're assembling strings from their component parts.
kistaro force-pushed better_debug_mouse from aefdfeb99c to e878717c31 2023-01-01 21:45:29 +00:00 Compare
Author
Contributor

I fixed the merge conflict.

I fixed the merge conflict.
Owner

I'm not opposed to this, but I think we're likely to be using text hints much less from here. I'm also not sure we need map cell coordinates -- can we comment those out for now to save space?

I strongly agree with making this a module.

I'm not opposed to this, but I think we're likely to be using text hints much less from here. I'm also not sure we need map cell coordinates -- can we comment those out for now to save space? I strongly agree with making this a module.
kistaro added 2 commits 2023-01-01 23:32:37 +00:00
Debug mouse is now its own module, so it can be separated from the hint system, since it is useful for more than just positioning hints. It now has the following enhancements:

1. Clock-based table cyclng now has a helper function (cycle)
2. Debug mouse color cycling is distinct from hint color cycling, so debug position readout remains legible
3. Debug position readout now stays on screen even when the cursor is near or past the edges
4. Debug cursor cycles between a mouse sprite specifically marking the exact pixel that is being sampled, an "X" for text character sizing, and a "□" for positioning the centered 3x3 characters often used as hint target markers
5. Map cell coordinates (in square brackets) are displayed in addition to pixel coordnates (in parentheses)

Sprite 50 is now the mouse cursor. Color 15 is color cycling for debug readouts.

Debug mouse features can be disabled by commenting out `add(real_modules, debugmouse)`.

I've done a little bit of golfing but this is stiill a token expense. I'm going to write a crappy sprintf function to save tokens everywhere we're assembling strings from their component parts.
Save tokens by omitting parentheses and map coordinates. Adjust location to match.

Instead of cycling between symbols, the cursor shape can be chosen by using left, right, or both mouse buttons.
Author
Contributor

I've removed the map cell coordinate display. I thought there was a point where I would have found it really useful because I was counting map cells for something and kept getting it wrong, but now I don't actually remember what that was. Maybe I was trying to line up level exits or something? In any case, I can just divide by 8 myself.

I've also removed the parentheses because those aren't necessary.

I expect to include text in hints regularly -- I think single words without specific locations, but in vaguely relevant locations, will be a useful and interesting variety of hint. But, I think the shape-cycling cursor is annoying, because it is usually not the shape I want it to be; I've changed from cycling between options to choosing a shape based on which mouse buttons (either or both) are pressed. I can also save 3 tokens by removing the not c or part of the "do we draw the arrow or a character?" logic, which means the middle mouse button (alone) would make it display [NIL] instead of any of the cursors.

I've removed the map cell coordinate display. I thought there was a point where I would have found it really useful because I was counting map cells for something and kept getting it wrong, but now I don't actually remember what that was. Maybe I was trying to line up level exits or something? In any case, I can just divide by 8 myself. I've also removed the parentheses because those aren't necessary. I expect to include text in hints regularly -- I think single words without specific locations, but in vaguely relevant locations, will be a useful and interesting variety of hint. But, I think the shape-cycling cursor is annoying, because it is usually not the shape I want it to be; I've changed from cycling between options to choosing a shape based on which mouse buttons (either or both) are pressed. I can also save 3 tokens by removing the `not c or` part of the "do we draw the arrow or a character?" logic, which means the middle mouse button (alone) would make it display `[NIL]` instead of any of the cursors.
pyrex merged commit a1a4ad4d56 into main 2023-01-02 00:31:34 +00:00
pyrex referenced this issue from a commit 2023-01-02 00:31:34 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pyrex/chameleonic#20
No description provided.