increpare / increpare/PuzzleScript

[Player] [Mobile] Make 'Undo' a repeatable button

Open
#1,116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
185
PR merge metrics
No merged PRs in 30d

Description

Summary

Make the 'Undo' mobile button repeatable, so that you can undo several steps while keeping your finger on the button, instead of having to press-release-press-release-...

Details

In the player, while on mobile mode, there is a tab that you can open with three buttons: Undo, restart and Quit to menu:
Image

Clicking these buttons makes the corresponding action as expected.

While the restart and quit are mostly idempotent (once pressed, next presses will probably not change the game state, so you will probably click them only once each time) the undo button on the other hand may be pressed several times in quick succession if you want to go back to a previous game state.

While on keyboard (or gamepad I guess) you can keep the button down and it will keep undoing repeatedly until you unpress, on mobile however this functionality doesn't exists, which means that you need to manually press the button each time you want to undo, which is often slow and tiring.
By making the undo button repeatable, you should be able to 'keep undoing' while the button is held, and stop once released. The rate of 'undoing' should be the same as the rate of moving if you swipe+hold.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the player's mobile-mode tab and its Undo control, then compare its behavior with the keyboard/gamepad hold-to-repeat path and the swipe+hold movement rate. Done means holding Undo repeatedly undoes steps, releasing stops it, and the repeat rate matches swipe-and-hold movement.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev, mobile-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.