-
Notifications
You must be signed in to change notification settings - Fork 256
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
How could I record game from Keyboard control #56
Comments
The input plugin is how the AI controls the emulator. On each game loop the emulator asks the input plugin for the input and it makes a remote call to the AI server in order to get it. That's done in this file you linked: https://github.com/kevinhughes27/mupen64plus-input-bot/blob/master/src/controller.c. This process is not coupled to any real input device - its all virtual. The emulator already has an abstraction between what input you are using and a virtual n64 controller. You only need to modify The process will look like this:
|
Thanks a lot. |
The only other thing that I would add is that the current |
To be clear, that class is what is used to read the gamepad input. In your case, you would be providing similar functionality, but reading from the keyboard input instead. I just wanted to point out where that magic currently happens. |
Thanks a lot |
I think I should modify the utils.py to change the class XboxController to something like KeyboardController, right ?
Thanks a lot. |
Yup! |
thanks |
@frogoscar any updates pal I am stuck on same I want to use keyboard instead of gamepad I dont have gamepad need to finish this by today |
@bzier @kevinhughes27
For the moment, TensorKart records from Joystick input control when calling record.py
As I do not have a joystick, I am trying to change the code so that it can record from Keyboard input control.
I read http://mupen64plus.org/wiki/index.php?title=KeyboardSetup and when I play the MarioKart, I use Left Shift to do "Go" and Up/Left/Down/Right to control the direction.
So should I change the code in https://github.com/kevinhughes27/mupen64plus-input-bot/blob/master/src/controller.c ?
Need I also change code in https://github.com/kevinhughes27/TensorKart/blob/master/record.py ?
Is the file SDL_keysym.h http://www.libsdl.org/release/SDL-1.2.15/include/SDL_keysym.h useful ?
Thanks a lot!
The text was updated successfully, but these errors were encountered: