Author Topic: Turok 3 Mouse Input and other goodies  (Read 18585 times)

Offline Drahsid

  • Endtrail
  • ****
  • Posts: 230
  • T:REP 799
  • That I be considered worthy
    • View Profile
Turok 3 Mouse Input and other goodies
« on: February 07, 2020, 04:10:23 PM »
This has been superseded by the mod in this thread

What is this?
Knockoff Turok 3 EX?
This is NOT a PC port. This is merely a collection of memory hacks that have sprung from my reverse engineering utilizing my fork of Mupen64Plus

What does this give you?
  • Mouse input with customizable look-sensitivity
  • 60 FPS mode
  • Custom FOV

What problem does this solve?
This completely bypasses the joystick, so you are not limited to the game's interpretation of the stick input. You are not limited to the -128-127 range on either axis.
Furthermore, who doesn't want to play at 60 FPS?

Cool. How do I get it?
Download any version of Mupen64Plus that is not Mupen64Plus-nx!!
Download and extract this into the root directory of Mupen64. This should replace "mupen64plus.dll", and you should see a new folder called "scripts."
That's it, run Turok 3 in Mupen!

Note that for proper keyboard controls, you will have to configure the input of Mupen to use your desired buttons. I will not go over how to do that but do highly suggest sharing your configurations when you get something that you like.

How do I configure the options?
In the Mupen64Plus directory, navigate to ./scripts/Turok 3 - Shadow of Oblivion (U) [!]/ and edit MouseInput.wren with your text editor of choice. The options have comments describing their relevance.

Bugs
  • If you get an issue related to the input plugin, replace it with this
  • When playing at 60 fps, some levels cannot be completed due to some scaling issues.
  • Climbing ladders is inconsistent and sometimes buggy.
  • You cannot modify the FOV when running in dynarec mode

Other notes
You can press  HOME to lock/unlock the mouse
If you fancy learning a high level scripting language, you can use what I have already set up to make more memory hacks that may do a plethora of things.

Special thanks to Kaiser
« Last Edit: November 19, 2021, 12:04:56 AM by Drahsid »
Well that didn't work

Offline Nutshot

  • Iguana
  • *
  • Posts: 28
  • T:REP 109
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #1 on: February 09, 2020, 02:51:42 PM »
YES!
Thank you so much.
I will try that immediatly out now. :D
« Last Edit: February 10, 2020, 12:06:59 PM by Nutshot »

Offline Nutshot

  • Iguana
  • *
  • Posts: 28
  • T:REP 109
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #2 on: February 10, 2020, 12:07:14 PM »
Okay, so i notice a few things before i could even really try it out.
So you wrote that we should use any version of Mupen64Plus that is not Mupen64Plus-nx.

I normally use mupen64plus-gui from here:
https://github.com/m64p/mupen64plus-gui
With this one i can´t even get to the point of launching any game. Mupen gives me this error:
"Couldn´t load core library, please set the path in settings."
I have that already set, and it´s pointing at it´s dll in the correct folder, but it seems it wants to simply ignore it, which is sad cause i really want to use this Frontend.

The second i use is M64Py from:
http://m64py.sourceforge.net/
I can get it to load the Game as it should. Except nothing i change in the config (MouseInput.wren) does anything. I changed the FOV to 90, FPS to 60 or MAX. But nothing changed. I restarted the Emu and Game multiple times. I still noticed the inbuilt FPS Counter was still on 30 FPS so i think i am doing something wrong?

Offline Drahsid

  • Endtrail
  • ****
  • Posts: 230
  • T:REP 799
  • That I be considered worthy
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #3 on: February 10, 2020, 03:49:03 PM »
You cannot modify the FOV when running in dynarec mode. Possibly similar issues with fps.
Quite frankly, you shouldn't use a frontend, they all suck.
Well that didn't work

Offline Nutshot

  • Iguana
  • *
  • Posts: 28
  • T:REP 109
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #4 on: February 10, 2020, 04:02:51 PM »
Aha.
So i should only using the last Release from here is what you´re saying?
https://github.com/mupen64plus/mupen64plus-core/releases

But then it seems also the "Download any version of Mupen64Plus" is missleading, i guess... (no offense).
But... i don´t know any other. What are you using?
« Last Edit: February 10, 2020, 04:05:25 PM by Nutshot »

Offline Nutshot

  • Iguana
  • *
  • Posts: 28
  • T:REP 109
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #5 on: February 12, 2020, 10:32:09 AM »
So i tested out yesterday this thing and it does indeed works with some Mupen Frontends too.
But every single Frontend has a flaw that other don´t have and vice versa.
So i ended up using just the standalone Mupen64 with some Command Lines.
All in all, it´s running superb. The only thing yet i have problems are the controls themselfes.
Editing the "mupen64plus.cfg" here is necessary.
I also used this site as a reference:
http://en.qi-hardware.com/wiki/Key_codes

So far i got "Escape" To Menu, the usual WASD to the C Buttons, Q and E are B and E, Space is "Jump".
Now here is what i don´t get.
Other keys such as "Left Ctrl" for "Control Pad Down" isn´t working.
I´m not really sure what is causing this. Left Ctrl should be "305". Yet it still wouldn´t work for that key. It just baffles me that i "somehow" got the other Keys working so far. I have no clue what is preventing this now. Other sites claim it should be "17" and not "305". Still wouldn´t work either.

Edit:
I got it to Shift (304) instead of Ctrl, which isn´t the way i want but at least it´s working.
Still doesn´t explain why Ctrl isn´t working.
Now does anybody have an idea how the Mouse Buttons are called?
It seems to be the only thing left and i could share my config for the controls.
« Last Edit: February 12, 2020, 12:36:43 PM by Nutshot »

Offline Drahsid

  • Endtrail
  • ****
  • Posts: 230
  • T:REP 799
  • That I be considered worthy
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #6 on: February 12, 2020, 08:09:29 PM »
Editing the "mupen64plus.cfg" here is necessary.
I also used this site as a reference:
http://en.qi-hardware.com/wiki/Key_codes

So far i got "Escape" To Menu, the usual WASD to the C Buttons, Q and E are B and E, Space is "Jump".
Now here is what i don´t get.
Other keys such as "Left Ctrl" for "Control Pad Down" isn´t working.
I´m not really sure what is causing this. Left Ctrl should be "305". Yet it still wouldn´t work for that key. It just baffles me that i "somehow" got the other Keys working so far. I have no clue what is preventing this now. Other sites claim it should be "17" and not "305". Still wouldn´t work either.
Edit:
I got it to Shift (304) instead of Ctrl, which isn´t the way i want but at least it´s working.
Still doesn´t explain why Ctrl isn´t working.
Now does anybody have an idea how the Mouse Buttons are called?
It seems to be the only thing left and i could share my config for the controls.
Yes, I highly suggest everyone to share their input configs because it's not entirely seamless.
Not sure what does and doesn't work, but you might want to consider using device = -2 and name = "Keyboard"
Well that didn't work

Offline Kil3r

  • Iguana
  • *
  • Posts: 6
  • T:REP 28
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #7 on: April 13, 2020, 05:01:35 AM »
Is this program like the mouse input injector from Carnivorous (Goldeneye)?  In other words, is it as close to native mouse support that we can get in Turok 3?

EDIT: Yes it is.

Firstly, I like it! Secondly, i'm having issues. The camera is always jiggling. Its almost as if the camera is fighting back against the mouse or perhaps its not super smooth. Furthermore, unrelated to this mouse script, my sound is always out of sync. Another thing. Is there anywhere to unbind the number keys from choosing save states. I like to use 1 and 2 as my change weapon buttons.

Here's some gameplay: https://youtu.be/a__BK2yWF5k

I believe this project deserves so much more attention. Its unlikely that we will get a port for T3 and I can imagine that this project must of took alot of time and effort.

My setup is this:
Quote
Latest Mupen64Plus + Mupen64PlusQT launcher + GlideN64 + Input Plugin from this thread's OP(in the bug list).

DPad R = "mouse(2)"
DPad L = ""
DPad D = "key(306)"
DPad U = ""
Start = "key(8)"
Z Trig = "mouse(1)"
B Button = "key(50)"
A Button = "key(49)"
C Button R = "key(100)"
C Button L = "key(97)"
C Button D = "key(115)"
C Button U = "key(119)"
R Trig = "key(32)"
L Trig = "key(120)"
Mempak switch = "key(44)"
Rumblepak switch = "key(46)"
Quote
Controls:
Left Mouse: Fire
Right Mouse: Sniper Zoom
1: Change Weapon\A Button
2: Change Weapon\Activate Gadget\B button
Spacebar: Jump
Ctrl: Crouch
WASD: Move
Backspace: Pause
« Last Edit: April 13, 2020, 08:54:44 AM by Kil3r »

Offline Drahsid

  • Endtrail
  • ****
  • Posts: 230
  • T:REP 799
  • That I be considered worthy
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #8 on: April 13, 2020, 10:32:30 AM »
Secondly, i'm having issues. The camera is always jiggling. Its almost as if the camera is fighting back against the mouse or perhaps its not super smooth.
I can't reproduce this myself. It is possibly related to the QT launcher, or perhaps you have the joystick set to the mouse in Mupens config (DONT DO THIS, the mouse input is not linked to the joystick)

Furthermore, unrelated to this mouse script, my sound is always out of sync.
That's a Mupen issue, I think changing the sound-sync type might have better potential results.

Another thing. Is there anywhere to unbind the number keys from choosing save states. I like to use 1 and 2 as my change weapon buttons.
afaik these are near the top of Mupen64plus.cfg

Here's some gameplay: https://youtu.be/a__BK2yWF5k
I believe this project deserves so much more attention. Its unlikely that we will get a port for T3 and I can imagine that this project must of took alot of time and effort.
Thanks for the support. I dunno if I'll update this in particular, but I am doing a lot of reverse engineering on Turok 3 itself. In the future, I'm sure an official Turok 3 port is possible.
Well that didn't work

Offline Kil3r

  • Iguana
  • *
  • Posts: 6
  • T:REP 28
    • View Profile
Re: Turok 3 Mouse Input and other goodies
« Reply #9 on: April 13, 2020, 04:08:03 PM »
Quote
I can't reproduce this myself. It is possibly related to the QT launcher, or perhaps you have the joystick set to the mouse in Mupens config (DONT DO THIS, the mouse input is not linked to the joystick)
Thanks! Your second point was the reason behind the issue.  For anyone having the same issue, make sure "mouse = False" in mupen's cfg.

Quote
That's a Mupen issue, I think changing the sound-sync type might have better potential results.
Sounds good i'll be tinkering with that.

Quote
afaik these are near the top of Mupen64plus.cfg
I looked the the entire cfg and couldn't find it :(. It doesn't seem like you can customize that anywhere. For now I will map the buttons to Q and E. https://mupen64plus.org/wiki/index.php?title=Mupen64Plus_Core_Parameters

Quote
Thanks for the support. I dunno if I'll update this in particular, but I am doing a lot of reverse engineering on Turok 3 itself. In the future, I'm sure an official Turok 3 port is possible.

Are your intentions to create a port? As a undergrad CS major, being able to create a port using the resources you have is mindblowing. Your work deserves more support, especially on these forums. Infact, I think your script would bring more attention to the game and therefore would increase the speed of us getting a official port. Maybe https://www.youtube.com/user/Gggmanlives would be interested in visiting T3 again with the script as he talked about Goldeneye's mouse injector in his review. As someone who started Turok on PC, playing Turok 3 with a controller is just not an option haha. I'm sure other people feel the same way.

IIRC, Kaiser (Turok Remastered) had access to very little official code when he was first making his port. T3 unofficial port should be fairly possible right?

EDIT: Is there anyway to reduce the input lag? Furthermore, i've still had no luck with solving the audio delay. What is your audio setup?
« Last Edit: April 13, 2020, 06:01:16 PM by Kil3r »

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal