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

Unreal Engine 4 Port #9

Open
KITATUS opened this issue Nov 28, 2020 · 14 comments
Open

Unreal Engine 4 Port #9

KITATUS opened this issue Nov 28, 2020 · 14 comments
Labels
enhancement New feature or request

Comments

@KITATUS
Copy link
Contributor

KITATUS commented Nov 28, 2020

Hey all,
I've created a rudimentary port of the code to Unreal Engine 4 as a plugin. Did you want to include this in the repo somehow or would you rather I fork and place it elsewhere?

It's still a work in progress but it is functional.

@Ohjurot
Copy link
Owner

Ohjurot commented Nov 28, 2020

Hey KITATUS,
that is amazing!

I think the most clean solution would be that you create a dedicated repository maybe called DualSenseWindows_UE4 or DS5W_UE4. So you can manage and structure the repo as you desire. As soon as you get a release for a specific lib version ready you can either send me the release files and I will add them to the lib's release or you send the link to your release and I will reference to your release in my release notes (So that your Insights are right). We will of course link to each other in the repos readme so that all users can find the right version they are looking for.

Of course it would be no problem for me to integrate the plug-in completely into my repo. Tell me what you think about that.

Looking forward to see the plug-in in action!

@KITATUS
Copy link
Contributor Author

KITATUS commented Nov 29, 2020

Sure, I want to do some clean-up first to get things running a little more efficiently on the Unreal side and then I'll slap up a dedicated repository, that sounds easier to deal with hotfixes .etc should they be needed.

I almost got the raw C++ files working out of the box with Unreal but off the top of my head, there were two key changes I had to make to ensure it played nicely with Unreal.

First I had to change the <Windows.h> references to "Windows/MinWindows.h" and I had to add an Extern C wrapper to the <hidsdi.h> include. They are the only changes I can remember right now that had to happen in the base library - would it be possible to look at filtering those changes back into the main repo as long as they don't alter any functionality / break any builds?

@cooperate
Copy link

This is hype. Looking forward to the UE4 demo lol.

@Ohjurot
Copy link
Owner

Ohjurot commented Nov 30, 2020

@KITATUS The changes shouldn't be a big deal. I will try to remember to add them to my next changes on main. Currently I'm still busy on another project.

@Ohjurot Ohjurot added the enhancement New feature or request label Nov 30, 2020
@bbagwang
Copy link

@KITATUS Hello, I'm about to make it by myself on UE4 Port but I just saw this Issue.
Did you finish the porting? If so I just wait for your code!
also @Ohjurot thanks for the great work!

@KITATUS
Copy link
Contributor Author

KITATUS commented Dec 26, 2020

It's not quite ready due to some issues I've been having with inconsistent vibration. I've been working on refactoring to better follow the XINPUT representation within the engine source. Not sure if it is the best approach or if another refactor is in order. I have no problem uploading the code as-is (even with the buggy vibration) but I'm also happy for you to make your own port then we compare our ports and make a "best" version from the two codebases. Your choice I guess.

@bbagwang
Copy link

Hi, @KITATUS thanks for the fast reply :)
I'm kinda new to making ue4 plugins so I'd love to see your approach.
We can improve your codebase with the community I suppose.
If you're okay with the release, how about give it a shot first?

@Ohjurot
Copy link
Owner

Ohjurot commented Dec 26, 2020

@bbagwang no problem I hope it will be useful in your projects!
@KITATUS I got some more information about audio now! Checkout this issue where I give a little insight into the future of the project #13

@bbagwang
Copy link

bbagwang commented Jan 6, 2021

Hey guys. how's it going.
I'm trying to make UE4 Port in https://github.com/bbagwang/UE4DualSense

I just implemented very basic buttons and analog inputs for the testing. but there are some problems. T.T
Critical frame drops sometimes happen when I give more than 3~5 inputs. (maybe game thread sync issue?)

@KITATUS Can you check my code and how should I approach it more adequately?

@KITATUS
Copy link
Contributor Author

KITATUS commented Jan 6, 2021

Hey guys. how's it going.
I'm trying to make UE4 Port in https://github.com/bbagwang/UE4DualSense

I just implemented very basic buttons and analog inputs for the testing. but there are some problems. T.T
Critical frame drops sometimes happen when I give more than 3~5 inputs. (maybe game thread sync issue?)

@KITATUS Can you check my code and how should I approach it more adequately?

I've got an implementation that follows XInput (i.e what the engine expects) - I'll throw it up as an early preview on Github later and you can compare your code to mine. I also have an earlier implementation that doesn't follow XInput but has more features.

@KITATUS
Copy link
Contributor Author

KITATUS commented Jan 6, 2021

Here is the REPO, I've set it to public: https://github.com/KITATUS/DualSenseWindows_UE4

NOTE: The repo isn't ready for public consumption and is still a work in progress but my code is there for you to take a look at whilst I work on it. Some links on the read me .etc aren't final. The files uploaded are just the .uplugin files but it will help get you started.

@KITATUS
Copy link
Contributor Author

KITATUS commented Jan 6, 2021

Here's the old Non-XInput more features version:
DSWind_WORKING.zip

@bbagwang
Copy link

bbagwang commented Jan 6, 2021

@KITATUS Thank you so much! I also have thought about the Issue with Sony.. hmm should I go for it or stop?
I think Sony and Epic have their PS5 SDK Builds with Dual Sense Supports...
I should talk to them before I do more :)

@KITATUS
Copy link
Contributor Author

KITATUS commented Jan 6, 2021

@KITATUS Thank you so much! I also have thought about the Issue with Sony.. hmm should I go for it or stop?
I think Sony and Epic have their PS5 SDK Builds with Dual Sense Supports...
I should talk to them before I do more :)

If you're going to launch on PC, you need to have an agreement with Sony and use their SDK they provide. You have to be a PlayStation Partner to do that: https://partners.playstation.net/ - You should be able to develop general ideas and things with the plugin just fine.

@Ohjurot Ohjurot added this to the Greater support & Bindings milestone Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants