shiiion / dolphin

Dolphin fork intended to give Metroid Prime Trilogy mouselook controls
Other
471 stars 44 forks source link

Can we get an option for recentering Camera? #41

Closed Desmondchaser27 closed 3 years ago

Desmondchaser27 commented 3 years ago

I'm trying to get the classic Gamecube controls (From Prime 1/2) as closely as possible for Metroid Prime 3 so I can play with a controller. The only problem left is that after I manually aim the camera will not auto-recenter. I know, for M+K this is a non-issue, but for controllers this can be a serious issue if you aren't attempting to go for a standard FPS mode. Is it possible to do this already? Or is there an input I can set to reset camera at least? I could simply make it "! Trigger R" if so and that would work as well. Thanks for any help.

SirMangler commented 3 years ago

We could add a button to recentre the pitch which you could easily set up to be held when not using the "free aim" bind. We would need to implement a system to interpolate to the centre or it will just snap in an ugly fashion.

This is a slightly ironic feature request since PrimeHack is designed to let people play the game with a different control scheme than the tank controls, but I'm alright with it being added. I can't promise this will be added soon as we currently are working on some other features.

Desmondchaser27 commented 3 years ago

I really appreciate it. And, I know it's weird. I just actually like the unique controls and always play the Gamecube versions. Love that you added back in the side jump glitch to all the games.

There is one more thing that I noticed as well that I couldn't simulate properly through Dolphin's input control functions (tried toggle() and some other combinations of functions as well). The morph ball can't have the proper control scheme automatically without just using a simple toggle() to adjust the controls. But if I do that and then the controls "work", but if you ever have a situation where you accidentally press the "X" button (on a gamecube controller) twice when trying to morph, the controls go back to "non-morphball" controls.

But if that's not feasible, I actually, I have no trouble with game hacking and programming. But I'm unfamiliar with how this works on Gamecube games (never worked on consoles or anything of the like). What debugger do you use and if so, how with Dolphin or Gamecube or whatever you're using? I don't mind attempting to implement the morph ball one myself at least.

SirMangler commented 3 years ago

We have planned a boostball button like springball to help with the different control schemes needed for boostball/springball. It's easy to do, it just needs time to bring support for all the games versions/regions/etc we support, which as of right now is 14.

Like springball, you just need to find the function call to the "charge boostball" code, and patch the check to load a value set by PrimeHack. See the SpringBall mod for info how we do it, it's pretty simple. It literally just needs someone to sit down and put the time in. Me and Shio (the creator of PrimeHack) have limited time, the time we do spend working is generally spent on frying bigger fish, like taking control over the Context Sensitive Interactable entities (motion control objects in Prime 3).

But if that's not feasible, I actually, I have no trouble with game hacking and programming. But I'm unfamiliar with how this works on Gamecube games (never worked on consoles or anything of the like).

We would love it if you wanted to lend a hand and make a PR. If you join our Discord, we can talk properly in the #developer-chat and I can help you get started.

What debugger do you use and if so, how with Dolphin or Gamecube or whatever you're using?

Dolphin has a built in debugger, it can be enabled in Config > Interface, and you can use the View dropdown in the menu bar to open a Memory View, Registers View and Code View. It is equipped with regular breakpoints and memory breakpoints. You can use the cheat search (under Cheat Manager) to find addresses/values, but it is limited in comparison to the older Ishiiruka build as it lacks previous value scanning and unknown value scanning.

You can also statically analyse the dol binaries if that's your thing.

If you have any questions, please feel free to join the Discord and ask.

Desmondchaser27 commented 3 years ago

Okay. I'll join the discord. Cool about the boost ball, too. I wasn't referring to that specifically though. Just the fact that when Samus enters morph ball, if the player has the control scheme where left/right on the stick turns her, then the morph ball controls don't let the player move left and right (strafe), because those are specifically camera left and right. So I had to implement a input function toggle("B Button" | "L Button) so that it would change to the strafe controls properly upon entering morph ball and then the L Button press is just there in case I accidentally double tap or something so I can fix it without getting out of morph ball. If any of that makes sense.

SirMangler commented 3 years ago

Another thing I was working on setup a lot of code for this feature request.

https://github.com/shiiion/dolphin/commit/5c2b9101c97293d5265e4f2425585aa8c1fe1fac

Desmondchaser27 commented 3 years ago

Oh, nice thanks for the heads up.