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

[V2.4] Controls revision #2006

Merged

Conversation

Mathias-Boulay
Copy link
Contributor

@Mathias-Boulay Mathias-Boulay commented Sep 9, 2021

Control revision 2.4

While I've been busy fighting many regressions on mainline, I took the time to prepare the next revision of controls.
After all, I guess I'm the control guy now.

Better gamepad

The previous gamepad system was a bit broken, as it wasn't meant to be the centerpiece on the v2.0 update.

Device independent sensitivity

Previously the sensitivity was visually changing based upon both the MC and hardware resolution.
This is now fully fixed:

  • sensitivity in menus is visually the same, and auto computed.
  • sensitivity in game is identical regardless of the resolution.

Better compatibility

The gamepad compatibility has been extended to support gamepads with swapped axis between triggers and the right joystick
It won't fix all gamepads, but all mainstream gamepads should be supported.

Better deadzone

Some devices self calibrate OVER TIME.
The new code takes this into account when computing the deadzone, allowing it to sometimes shrink when the gamepad calibrated itself.

Did you know that I left 3 buttons for modded players out there (since v2.0)
DPAD_DOWN, LEFT and RIGHT are free to use and map.

Better Touch Controls

Is this the better update all over again ?
NO. Hell no.
Nonetheless, here are some improvements because I still find the current system Ū̸̢̃̋͘T̵̨͉̰̆̈́́̽͐̀Ṯ̷̡̬͇̆̑͐͐Ḛ̴̡̢̢̹̬̗̬͖̗̻̝̳͓̣̏̆̐͋̿R̸͇̗̭̣͇̼͎͎̦̾̔̀͛̃͝ ̶̢̢̢͚̫̰̳̺͛͜͜Ǧ̸͍͈̎̏̔̆̂͌̏̏̽̉̀͆̚A̴͓̯̘͂́́͑͠R̵̛͍̠̔̇̽̏̓̈͑̓̚͝͠͝B̴̺̖̗̯͍̬͖̻̻̀́͆͘͜À̷̛̟̩̭̀̿͜͝G̸̺̦͖̈́̀Ȩ̴̱͖̦͎̺̃̈́͗̌͘̕

Better hotbar

The hotbar long press to drop time is now fully desynced from the Gesture setting time and has been tailored for human reaction time ¹
It is also less susceptible to interfere with other buttons (Minecraft wise).

You can now drop multiple items

Just keep pressing the hotbar and more items will drop.

Quick second hand

A new beta gesture is here: double tap a slot from the hotbar to pass it to the second hand !
You can see it on my twitter

¹ Only valid for people not on drugs. Consult your doctor to know your average reaction to see if drug usage is compatible with playing on pojav.

Freeform drawers

I can feel the chaos already
So, drawers will now have a new orientation called "FREE" which basically allows to place wherever you want your subButtons.
Who wants polygons out of buttons ?
A few limitations still apply:

  • Size is still bound by the drawer size.
  • The drawer itself cannot snap nor align with its subButtons. The inverse is possible though.

Chat auto-complete/correct

People with Parkinson's disease can now type a message in chat without it looking like they smashed their keyboard.
You'll see what I mean here ;)

Optimisations

With the new freeform drawer feature, the number of buttons being instantiated are projected to be even higher than before by 20-100%
To face this rapid increase in buttons since layout v2, a few optimizations were made:

  • Instantiating a SubButton will no longer create a temporary Handler and Message objects on the UI looper.
  • Instantiating any ControlButton (including subclasses) will no longer create a temporary ExpressionBuilder and two temporary Functions objects and will rely on instances amongst shared between all buttons.²|³
  • Instantiating, moving, or placing any dynamic position for ControlButtons will no longer create 2 temporary ArrayMap objects, instead of relying on a shared instance.³

Those optimizations add up to 5 objects saved PER button. (+2 for subButtons).
On a 50 buttons layout, it means at least 250 objects less for instantiations.
It reduces memory trashing RIGHT BEFORE claiming a hefty chunk of RAM for MC.

² Sadly, reflection is used for this. It is still more performant, despite the initial CPU cost of said reflection.
WeakReferences are used for shared instances.
³ WeakReference is used for the shared instance.

Better hardware mouse

The mouse lag is finally GONE regardless of the device power.
Turns out there was a bug were is the device was too fast, the launcher wouldn't register the event.
And the advancements in optimising the launcher have made the bug much more common to many devices.

Miscellaneous

Import control files

Pojav is now able to detect control files from the file manager. Selecting your controls will open a new import screen with an auto-completed file name I promise it is better than this)

New class: DoubleTapDetector

A replacement from using a GestureDetector with a onDoubleTap listener, since it doesn't support MULTIPLE POINTERS.
Double tap area may have to be adjusted 🤔

Other

  • SubButton cloning is now properly supported
  • TouchCharInput constructor are simplified.
  • Top left of the login menu is sligthly changed for better readability
  • Fixed a bug where pressing the software keyboard sent a F25 keyEvent.
  • Surely other stuff

@SuperTopGamers
Copy link

Foi uma tentativa de consertar o mouse? Tentem colocar a configuração anterior, a antiga, da 3.3.1.1_rel_20210125 (eu acho), porquê as versões antigas funciona perfeitamente no meu android 11...

@ankur60
Copy link

ankur60 commented Sep 11, 2021

Mann now I am a fan of you you made pojav Launcher far more better then any launcher on android/iOS and the controls where we were lacking behind is now more better and good to use but can you plse make a media fire app-debug no runtime apk and send me cause git hub is not giving me to download this fantastic thing

@SuperTopGamers
Copy link

SuperTopGamers commented Sep 11, 2021 via email

@ankur60
Copy link

ankur60 commented Sep 11, 2021

Thank you! Em sáb., 11 de set. de 2021 10:24, ankur60 @.***> escreveu:

Mann now I am a fan of you you made pojav Launcher far more better then any launcher on android/iOS and the controls where we were lacking behind is now more better and good to use but can you plse make a media fire app-debug no runtime apk and send me cause git hub is not giving me to download this fantastic thing — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#2006 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT5M4DEGJASFIMPDOP5Y6VLUBNKCJANCNFSM5DYATBVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

What do you wanna say plse say in English

@SuperTopGamers
Copy link

SuperTopGamers commented Sep 11, 2021 via email

@ankur60
Copy link

ankur60 commented Sep 11, 2021

Oh!you are welcome :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants