-
Notifications
You must be signed in to change notification settings - Fork 158
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
Unfinished controller support, please follow comments #376
Unfinished controller support, please follow comments #376
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to do this without having a ton of gamepadX or whatever vars?
You can condense them into a few lines but you need them to use all controller buttons |
Controls recommendations: B: drop items (press to scroll between items, press and hold to actually drop) idk how this works but if you can take advantage of the mini-touchpad on ps4 and ps5 controllers for a mini cursor some ppl might like that |
how will Y for special emotes work exactly |
You hold down Y while using the D-pad. This system works similar to mobile special emotes: you toggle that cellular tower thing then select the emotes. |
Now it doesn't crash and burn when you try to start it, please follow comments
Sounds good. The primary goal is to have bindable controller buttons and working analog sticks, defaults are just a nice-to-have. We also must have a controller-navigable UI |
We should take things one at a time. Suroi for console doesn't exist yet so we don't need to worry about controller-navigable UI. I say we first add the functionality with default controls, then add the ability to customized bindings. Controller-navigable UI is something we don't have to worry about until we make Suroi for Xbox, PlayStation, Nintendo Switch, or other controller-based platform. |
this easily has to be one of the most atrocious pieces of code i've ever seen from a suroi dev how hard is it to not repeat yourself and do something like const GamepadButtonMap = ["GamepadA", ...] // truncated for demo purposes
if (event instanceof GamepadEvent) {
input = GamepadButtonMap.find((_, i) => event.gamepad.buttons[i].pressed) ?? "GamepadUnknown"
} |
} | ||
|
||
|
||
function gameLoop(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me when PIXI.Application.ticker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make this far, far more concise. Also what the hell is that gameLoop function... (see Kenos' comment)
Also please read https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/buttons as you are missing critical information lol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah by the way to anyone whos reading patch-notes channel i am homeless and also the fbi is after me
@@ -16,6 +16,92 @@ import { FIRST_EMOTE_ANGLE, FOURTH_EMOTE_ANGLE, PIXI_SCALE, SECOND_EMOTE_ANGLE, | |||
import { getTranslatedString } from "../../translations"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah by the way to anyone whos reading patch-notes channel i am homeless and also the fbi is after me
This is the guide I am using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hiiii suroi patch-notes channel I'm totally original and not copying kenos
anyways LGTM should merge asap and push to production 👍
I agree with this information |
The requested changes have been fully completed sir. also how did I wake up leia and kenos 💀 💀 |
kenos pinged me to make fun of your code |
@@ -485,7 +537,34 @@ export class InputManager { | |||
|
|||
return input as Ret; | |||
} | |||
if (event instanceof GamepadEvent) { | |||
gameLoop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill kill
i've decided you're a furry |
I already changed it why so mean 😢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're decluttering the code, pls add comments for noobs like me :)
This is the funniest PR comment section, I've ever seen so far (after the Chinese John Cena one (including the Linux PR)). |
new commit, fixed issue where the buttons just refused to register, working and tested |
note: this has only been tested on stadia controller
changes are only in client > src > scripts > managers > inputManager.ts