Wolfenstein3d (Wolf4sdl) remapping?
-
Edit: I tried with or without " " it stays the same here is a full log of what's happening: http://pastebin.com/CSZRsCdw
Makefile:101: recipe for target 'wl_play.o' failed
make: *** [wl_play.o] Error 1
make: *** Waiting for unfinished jobs....
mv: cannot stat ‘wolf3d’: No such file or directory
/home/pi/RetroPie-Setup
Could not successfully build wolf4sdl - Wolf4SDL - port of Wolfenstein 3D / Spear of Destiny engine (bin/wolf4sdl-sw-v14 not found). -
@denisuu The button numbers in the tutorial are there for guidance and shouldn't be included in the amended code.
The code to be changed is an array where button 0 on your controller is mapped to the first action
bt_attack
, button 1 tobt_strafe
, button 2 tobt_use
and so on.Using your suggested configuration above, you can try the following:
#else bt_attack bt_use bt_nobutton bt_run bt_nextweapon bt_nobutton bt_strafeleft bt_straferight bt_nobutton bt_nobutton bt_pause bt_esc bt_nobutton bt_nobutton bt_nobutton bt_nobutton
-
Sorry I didn't respond for a while, I don't get any error's anymore but changing those lines doen't change anything to the controls :( I put them exactly like you told me. I even tried changing changing line 63 to 66. It stays the same.
Also for some reason as soon as the gamecon driver (for the SNESpad) are installed it only accepts the SNES controller and not my wireless 8bitdo SFC30. Is there a way to make it accept all controllers?
-
@denisuu Sorry, my mistake - there should be commas between each action. Also, the array may need to be over 2 lines, each containing 8 actions.
Could you try the following:
#else bt_attack, bt_use, bt_nobutton, bt_run, bt_nextweapon, bt_nobutton, bt_strafeleft, bt_straferight, bt_nobutton, bt_nobutton, bt_pause, bt_esc, bt_nobutton, bt_nobutton, bt_nobutton, bt_nobutton,
-
@dudleydes I already did it like that, this is how it looks. If I do it without comma's it doesn't even want to build :)
Just to be sure, I just do install from binary then follow all your steps and try by launching from emulationstation right?
-
-
@mediamogul Wow that's looks like a lot of work, but in the end I can use that for Quake I & III , Duke3d and other keyboard games without too much hassle right?
I actually hooked up a xbox 360 controller on to Wolf3d and saw all buttons are pressent, just not on the right possition.
-
@denisuu said in Wolfenstein3d (Wolf4sdl) remapping?:
in the end I can use that for Quake I & III , Duke3d and other keyboard games without too much hassle right?
Sure. I use it for all those games. There's admittedly a learning curve involved, but once you've made a few maps, it gets to be routine. Plus, you can recycle maps as beginning points for new ones so that you're not starting from scratch all the time.
-
@denisuu said in Wolfenstein3d (Wolf4sdl) remapping?:
Just to be sure, I just do install from binary then follow all your steps and try by launching from emulationstation right?
No, everything should be done the command line using the
retropie_packages.sh
script detailed in my earlier post.Installing from binary will install the pre-built binary with the default mappings. What we are trying to do is amend the source code and then build Wolf4SDL from source.
-
I followed those instructions but I only end up with files in "/opt/retropie/ports/wolf4sdl" but there is no wolf4sdl folder under: "/home/pi/RetroPie/roms/ports"
That's why I asked if I should install though the retro pie setup first . I just tried removing everything again and follow your instructions but again the actual game is missing.
-
@denisuu Apologies, I'm getting my wires crossed.
If you haven't already installed Wolf4SDL from binary, then you can set up the launch script and create a folder for game data with the command:
sudo ./retropie_packages.sh wolf4sdl configure
-
I followed all your steps and now the game builds, installs and creates the files.
When I boot it up the game controls haven't changed at all :( Maybe I should look into the advanced remapping posted by Mediamongul.
-
@dudleydes Hi
I'm trying to follow your steps but I'm ending up with same result as OP, key mapping didn't changed. Sorry for reviving old topick. I really want to correct that as on 8bitdo sf30 pro, use function is under little home button. I followed your instructions and all worked no error but key binding didn't changed. Would you mind helping me? Thanks -
@blackegg13 tbh I cannot recall hearing of any other user who has managed to get this remapping process for Wolf4SDL to work. I may have just been lucky with my PS3 controller.
To remap my controller for the other ports (Doom, Duke Nukem, Quake), I use xboxdrv. I suggest you take a look at doing likewise. More info can be found at: https://retropie.org.uk/docs/Universal-Controller-Calibration-&-Mapping-Using-xboxdrv/
If it's helpful, here is my xboxdrv config file for the Rise of the Triad port.
-
@dudleydes ok, I will give it a try, thanks for responding!
-
I know this topic is incredibly old, but I just wanted to report back that @dudleydes's instructions do indeed work, but you must delete the
~/.wolf4sdl/config.wl*
config file(s) after you rebuild for your changes to take effect. This is because as the contents ofbuttonjoy
are read in from the config file inside ofInitGame()
when the game is launched.So the complete solution is as follows:
cd RetroPie-Setup/ sudo ./retropie_packages.sh wolf4sdl depends sudo ./retropie_packages.sh wolf4sdl sources
Edit
wl_play.cpp
as described above to correspond to your joystick's buttons:sudo nano tmp/build/wolf4sdl/wl_play.cpp
Then, build/install/configure and nuke the config files:
sudo ./retropie_packages.sh wolf4sdl get_opts sudo ./retropie_packages.sh wolf4sdl get_bins sudo ./retropie_packages.sh wolf4sdl build sudo ./retropie_packages.sh wolf4sdl install sudo ./retropie_packages.sh wolf4sdl configure rm ~/.wolf4sdl/config.wl*
On the next launch, you'll be set with the right bindings!
-
I got a bit carried away and decided to implement modern FPS-style controls for Wolfenstein, allowing you to strafe and turn with the thumbsticks on your controller instead of using buttons.
You can give it a try by running this instead of editing
wl_play.cpp
:cd ~/RetroPie-Setup/tmp/build/wolf4sdl/ sudo su git remote add lazd "https://github.com/lazd/wolf4sdl.git" git fetch lazd git checkout sdl2remap
Then, continue with the rest of the instructions.
On this branch, movement, aiming, and strafing are all controlled by joystick axes so they're smooth and granular, unlike the existing jerky d-pad like feeling. Now you can creep up slow, aim precisely, and literally run circles around those Nazis.
On the XBox One (or similar controller), you'll get the following mapping:
- Left stick X axis: Strafe
- Left stick Y axis: Move forward/back
- Right stick X axis: Turn
- Left stick button: Run
- Right stick button: Run
- Left bumper: Previous weapon
- Right bumper: Next weapon
- Left trigger: Use
- Right trigger: Fire
- Select: Pause
- Start: Escape
Try running by pressing in the right or left stick button, just like you would in modern console FPS games.
Run affects turning rates too, so try doing an "about-face" (180°) by pressing the right stick button as you yank the right stick left or right.
This also fixes the mapping of the select/back buttons in the menu, which was driving me insane.
If that mapping isn't conducive to your controller, go ahead and remap it as described in this thread.
-
The bug that was causing @Blackegg13 and @denisuu's mappings to not take effect actually means we can share our controller mappings by simply copying one another's
config.wl6
.If you happen to have an XBox One, 8BitDo N30 Pro, or Logitech Dual Action controller, you can use my
config.wl6
files from this repository to get your controls mapped nicely without having to build from source: https://github.com/lazd/wolf4sdl-controller-mappingsIf you have a controller mapping for another controller that matches the control scheme I've outlined, feel free to send a pull request or just post it on this thread!
-
I got a little carried away (again), and with SDL2 and the GameController API, plus the publicly curated GameController_DB, I've implemented what I think is full game controller support for Wolf, including the ability to remap all controls within Wolf's UI:
As well as the ability to adjust turn speed:
I also implemented a workaround for RetroPie's nasty xmod patch that forces
triggers_as_buttons
and confuses SDL's mapping for XBox controllers (this doesn't fix other controllers with analog triggers, you'll have to edit/etc/modprobe.d/xpad.conf
and settriggers_to_buttons=0
for those).You can try it by doing the following:
cd /home/pi/RetroPie-Setup/ sudo apt-get install libsdl2-dev libsdl2-mixer-dev sudo ./retropie_packages.sh wolf4sdl depends sudo ./retropie_packages.sh wolf4sdl sources sudo chown -R pi:pi /home/pi/RetroPie-Setup/tmp/build/wolf4sdl/ cd ~/RetroPie-Setup/tmp/build/wolf4sdl/ git remote add lazd "https://github.com/lazd/wolf4sdl.git" git fetch lazd git checkout sdl2remap git submodule init git submodule update cd ~/RetroPie-Setup/ sudo ./retropie_packages.sh wolf4sdl get_opts sudo ./retropie_packages.sh wolf4sdl get_bins sudo ./retropie_packages.sh wolf4sdl build sudo ./retropie_packages.sh wolf4sdl install sudo ./retropie_packages.sh wolf4sdl configure rm ~/.wolf4sdl/config.wl*
Tested and working on RetroPie 4.4 with an XBox One controller, Logitech Dual Action, and 8BitDo N30 Pro, as well as macOS with an XBox One controller and keyboard/mouse controls (just to make sure they still work!).
Please let me know if this works for your gamepad of choice, and report back any issues!
Source code is available here: https://github.com/lazd/wolf4sdl/tree/sdl2remap
-
Thanks @lazd it works like a charm!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.