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

Gamepad support #943

Open
QuaiGoner opened this issue Jan 25, 2022 · 21 comments
Open

Gamepad support #943

QuaiGoner opened this issue Jan 25, 2022 · 21 comments

Comments

@QuaiGoner
Copy link

QuaiGoner commented Jan 25, 2022

That feature already have some ground work, engine does register inputs, axis included, but when we try to bind controls it maps to a keyboard and does not maps axis.
Would be great to have proper diput/xinput support in S.T.A.L.K.E.R. series before S.T.A.L.K.E.R. 2 comes out.

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Jan 25, 2022

It already maps axes in the latest dev builds :)
And you can even play with it. (but keyboard and mouse is still needed for inventory, dialogs, PDA)

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Jan 25, 2022

What is left to do:

  • UI
    • Focusing system (3d614e4)
    • Gamepad interaction with UI elements according to focusing system
    • Windows:
      • Inventory, trade and loot
      • Talk
      • PDA (mostly finished, mainly the messages is to be done)
    • Cursor behaviour:
      • Hide cursor if controller is being used
      • Show cursor anyway if mouse is being used in the middle of a controller gameplay
      • Hide it again if controller is being used again
      • Can be emulated using stick
    • Weapon selection wheel. (gamepad doesn't have much buttons, so we need something like this)
    • Input legend
      • Draw keyboard/gamepad button icons as a hint (instead of plain text)
  • Gameplay
    • Actor movement
    • Car
    • Stationary machine gun
    • Aim assist.
  • Double click support for key binding system #386
  • Various options: sticks and sensor sensitivity, axis invertion, dead zones, look intensity, etc.

@QuaiGoner
Copy link
Author

QuaiGoner commented Jan 25, 2022

It already maps axes in the latest dev builds :) And you can even play with it. (but keyboard and mouse is still needed for inventory, dialogs, PDA)

Только что скачал с Appveyor крайний билд Gold - крашится при запуске новой игры и в меню геймпад не мапится (хотя мышка двигается правым стиком) - использую DS4 + DS4Windows, может быть я не тот билд взял?
OpenXRay_error_report_220125-131518.zip
Прикладываю лог после нажатия новой игры

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Jan 25, 2022

  1. Попробуй убрать папку versions из папки с игрой.
    Произошёл прикол. Игра, похоже, начала грузить файлы ТЧ из этой папки...
  2. Биндить геймпад можно только из отдельного окошка, которое добавляется геймдатой. Она есть в December 2020 Preview, а нерелизные билды идут без геймдаты. Ну, и, я более новую геймдату не выложил даже нигде ещё. (в декабрьском релизе старая, хотя она тоже подойдёт)
    Вот новая геймдата:
    gamedata.zip
    После распаковки, в меню управления появится кнопка переключения на настройки геймпада)

@QuaiGoner
Copy link
Author

QuaiGoner commented Jan 25, 2022

Это я параллельно играюсь с version switcher, был интересно как оно работает)
Папку переименовал и добавил вашу геймдату.
Пару моментов:

  1. Имплементация левого стика - с шагом - бегом - быстрым бегом - просто гениально + сэкономлено столько кнопок
  2. Правый стик имеет дикую чувствительность - чувствительность мыши не влияет, возможно привязка к фпс ( у меня более 150)
  3. Для более-менее играбельного сотояния имхо было бы досточно навигации через D-pad в меню и инвентаре + кнопка для вызова контекстного меню в инвентаре на которое переключился бы фокус д-пада + та же история для диалогов - D-PAD + A&B
    В целом - моё почтение, очень круто получилось, спасибо за помощь

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Feb 4, 2022

References on weapon selector:
image
image
image

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Feb 13, 2022

fgsfdsfgs pushed a commit to fgsfdsfgs/xray-16 that referenced this issue Feb 18, 2022
@Xottab-DUTY Xottab-DUTY self-assigned this Mar 23, 2022
@banq007
Copy link

banq007 commented May 25, 2022

А получится ли aim-assist из уже какого-то готового проекта опенсурсного выдернуть, типа xash3d?

@QuaiGoner
Copy link
Author

Или билда одного. Но это скорее будет нарушением лицензии

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Nov 8, 2022

References on weapon selector: image image

Code references on wheel (pie) menu: ocornut/imgui#434

@Xottab-DUTY
Copy link
Member

@Xottab-DUTY
Copy link
Member

References on weapon selector: image image

It's an interesting idea to make some cells in the wheel menu bigger, so they can fit big guns better

Xottab-DUTY added a commit that referenced this issue Aug 9, 2023
Depending on the context (e.g. different UI windows) input mapping can be different.
This feature is needed for gamepads, because they have limited amount of buttons. (#943)
Xottab-DUTY added a commit that referenced this issue Aug 11, 2023
@FaV0RiT77
Copy link

Trying to use third party software for gamepad support not working. Maybe it's conflicting with current implementation. Could you pinpoint me to a config or whatever where i can find and make the engine ignore gamepad for now?

@Xottab-DUTY
Copy link
Member

@FaV0RiT77, I just added -no_gamepad command line key for this. Nightly build with this key will be available within 1-2 hours.

@Xottab-DUTY Xottab-DUTY pinned this issue Nov 7, 2023
Xottab-DUTY added a commit that referenced this issue Jan 6, 2025
Xottab-DUTY added a commit that referenced this issue Jan 9, 2025
@Xottab-DUTY Xottab-DUTY moved this from To do to In Progress in Roadmap Jan 9, 2025
Xottab-DUTY added a commit that referenced this issue Jan 15, 2025
Currently disabled due to problems when CUITabControl is being in the
CUIScrollView. CUITabControl needs its own navigation code to be
implemented too.
Navigation based on the focus system works better in this case.
Xottab-DUTY added a commit that referenced this issue Jan 17, 2025
Xottab-DUTY added a commit that referenced this issue Jan 17, 2025
Given that we can lock focus system now, this code is now obsolete.
Consider it as unsuccessful attempt
Xottab-DUTY added a commit that referenced this issue Jan 17, 2025
… input

Having accelerators set will allow us to render keybind icons, which is
really needed when gamepad is used (#943)

Also, input is always allowed now.

This commit revisits previous 2d67454
commit
Xottab-DUTY added a commit that referenced this issue Jan 18, 2025
This is huge. Mainly for the map page, ranking and log pages can be
missing something.
@Xottab-DUTY
Copy link
Member

My estimation is that we now passed at least 60% (maybe about 70%) of work needed to be done.
The input system works in main menu, settings, load/save menus and both in inventory and PDA.
We are missing weapon selection wheel and have some defects to fix.

But it is already usable and somewhat playable! You can test it and leave your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

6 participants