NBlood icon indicating copy to clipboard operation
NBlood copied to clipboard

Controller support for menus

Open Jan200101 opened this issue 5 years ago • 12 comments

gamepads can't be used in menus at all

Jan200101 avatar Mar 25 '19 20:03 Jan200101

Gamepad support is broken atm

nukeykt avatar Mar 25 '19 20:03 nukeykt

Controller support works out-of-the-box in eduke32 now. The changes were added somewhere between the 2019-04-08 and 2019-08-20 versions.

My Xinput device (GPD Win 2) has default bindings that work in menus and game. Perhaps rebasing nblood from upstream eduke32 would magically add support.

nvllsvm avatar Aug 27 '19 04:08 nvllsvm

How can you select 12 different weapons with a controller?

CommonLoon102 avatar Aug 27 '19 04:08 CommonLoon102

@CommonLoon102 usually by cycling through them with the L and R buttons. Similar to using the mouse wheel in modern games.

nvllsvm avatar Aug 27 '19 05:08 nvllsvm

Rebasing to the latest eduke32 is not enough (mapedit branch already rebased to recent revision with controller support). Some additional coding on my side is required as well (update input code, add controller to the menu, etc)

nukeykt avatar Aug 27 '19 05:08 nukeykt

@nvllsvm That must be very slow. There should be a smart solution, a weapon wheel or something. Not the one which is in Fresh Supply, that is lame and also slow. But something like the buy menu in CSGO.

CommonLoon102 avatar Aug 27 '19 06:08 CommonLoon102

@CommonLoon102 should probably open a separate issue. We've gone off topic here.

nvllsvm avatar Aug 27 '19 12:08 nvllsvm

I've actually implemented partial controller support in my NBlood fork NXBlood Its not kept as up to date as it probably should have duo to me wanting to rework it after the merge of mapedit into master

ignore the bottom most change it was an attempt at fixing something with limited knowledge of the codebase

Jan200101 avatar Sep 06 '19 17:09 Jan200101

Just out of curiosity, how did you solve going back one level in the menu? NBlood doesn't have a back button like EDuke32 does (in the top left corner). You can use Esc or right mouse button, but what do you use in case of the controller to go back?

CommonLoon102 avatar Sep 07 '19 19:09 CommonLoon102

just like the right mouse button I just set the Escape event

    else if (JOYSTICK_GetButtons()&SWITCH_BUTTON_B)
    {
        event.at0 = kMenuEventEscape;
        JOYSTICK_ClearButton(SWITCH_BUTTON_B);
    }

reference

Jan200101 avatar Sep 08 '19 12:09 Jan200101

I've actually implemented partial controller support in my NBlood fork NXBlood 1 Its not kept as up to date as it probably should have duo to me wanting to rework it after the merge of mapedit into master

ignore the bottom most change it was an attempt at fixing something with limited knowledge of the codebase

The linked repo is down. Do you still have these changes available in a place that we could view? I'm attempting to get NBlood (all engines) running on a similarly embedded device which only uses a gamepad as primary input.

SeongGino avatar Dec 04 '20 22:12 SeongGino

The linked repo is down. Do you still have these changes available in a place that we could view? I'm attempting to get NBlood (all engines) running on a similarly embedded device which only uses a gamepad as primary input.

yeah sorry for that I haven't had time to maintain the Switch port for Blood and because it was seemingly unmaintainable from my perspective I deleted the repo

In a previous comment

just like the right mouse button I just set the Escape event

    else if (JOYSTICK_GetButtons()&SWITCH_BUTTON_B)
    {
        event.at0 = kMenuEventEscape;
        JOYSTICK_ClearButton(SWITCH_BUTTON_B);
    }

reference

I have talked about the exact actions I took to achieve gamepad support in menus SWITCH_BUTTON_B in this case is an macro to the bit that signifies if the buttoin is pressed.

Jan200101 avatar Dec 05 '20 13:12 Jan200101

This has been fixed since https://github.com/nukeykt/NBlood/pull/642

tmyqlfpir avatar Mar 12 '24 22:03 tmyqlfpir