The Battle for Wesnoth
-
While The Battle for Wesnoth IS a Linux game there is no way that I know of to run Linux games on the EmulationStation. I could download it and run it on the RPi3, but not in conjunction with RetroPie and the EmulationStation. The Amiga version was made for AmigaOS4, which is not the same Amiga emulator that is running on RetroPie...it is a bit like comparing the Apple II emu with a modern Mac.
My goal is to use the RetroPie to run all of my games, not to dual boot with another system. So, what I am looking for is a way to run The Battle for Wesnoth using RetroPie, and more specifically EmulationStation.
-
There would be no need to dual boot to run or install a Linux game. If the game can be installed on ARM it shouldn't be hard to do at all. In Emulationstation hit F4 on a keyboard to exit to the console. Hit any key on your keyboard to prevent ES from auto restarting. Then install the game in the console using whatever method is available. This may be the part that takes the most work. Once you have the game installed in Raspbian (the Linux OS that is running under ES in Retropie all the time) you will need to add it as a PORT. It will then be able to be launched from within ES, in theory. To find out more about adding items to the PORTS menu follow the link in this post: https://retropie.org.uk/forum/topic/3094/a-question-about-custom-ports/2 . You will need a .sh script that will launch your game, that is what will show up in the PORTS menu. This will allow you to add any Linux game that can be run on the Pi to the EmulationStation PORTS menu. There are other guides in the forums about adding items to the main console list instead of using PORTS, but I have never tried those.
-
Excellent, that was exactly what I was looking for! It's a bit of work, but if I can run the game natively then it's worth the effort. I'll give it a try.
-
@jabberwock101 Please keep us posted with your results and any oddities / obstacles you have to overcome.
-
@jabberwock101
That would be fine if you can try to make BfW runable to the pi :) -
So, here is where I am: downloading was simple, Wesnoth (wesnoth-core, wesnoth-music, and wesnoth-editor) is in the repository. Moving it to a convenient folder was simple too, I just had to do some permission changes. I can easily run the program from the command line, so I know that it works. I added the .sh script to Ports with no issues, and it shows up on the Ports screen in EmulationStation. The issue comes when I try to launch it from Ports in EmulationStation. I don't know a lot about writing .sh scripts, so it may be a simple mistake, but as of now it is not working. my .sh script was pretty much just copied from the wiki (https://github.com/RetroPie/RetroPie-Setup/wiki/Ports) and is as follows:
#!/bin/bash
sudo -wesnoth-1.10 -wesnoth -basedir /opt/retropie/emulators/wesnoth/When I try to launch I get a bunch of lines of text:
sudo: invalid option -- 'w'
usage: sudo -h | -K | -k | -V
usage: sudo -v [AKnS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [AKnS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: sudo [AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-u user] [VAR=value] [-il-s] [<command>]
usage: sudo -e [AKnS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-u user] file...After the text it just takes me back to the Ports menu in EmulationStation.
I know a little bit about Linux and playing with the command line, but not enough to decipher what is not working, so any assistance would be greatly appreciated.
-
@jabberwock101 said in The Battle for Wesnoth:
sudo -wesnoth-1.10
.sh is not my primary language, but I have used sudo a bit. The first thing that jumps out at me is that you need a space in the sudo line. Like this: sudo - wesnoth-1.10
-
It may not look like it, but there is a space...unless you're saying that there should be a space between the "-" and "wesnoth-1.10"
-
@jabberwock101 yupp, that is what im saying. Sudo thinks you are passing -w
when you want to pass - wesnoth.....
-
I tried it with the spaces, but it just tells me: sudo: -: command not found
If I try it without the "-" I get: sudo: wesnoth-1.10: command not found
So, I guess I have to find some way to tell it to run the executable file. To run it in the command line I have to navigate to the folder and type: ./wesnoth-1.10 I don't usually run programs from the command line, but when I do that is how I run them. I guess I'm not sure how to properly tell the .sh to run the program.
-
@jabberwock101 i have gone back and reread this thread but just curious, did you give permissions to the folder and files for this game? I had this issue earlier today adding a game.
-
Yeah, when I moved the game files I changed the permissions of the files as well as the file locations. The files and folders are all completely open to r/w for anyone and the executable files are r/w/x for anyone.
-
@jabberwock101 Give this a try:
#!/bin/bash
sudo /opt/retropie/emulators/wesnoth/wesnoth-1.10Assuming that is the path and the executable for the game.
-
@jabberwock101
Were you able to get it?
If yes, can you please write a short step by step manual?
How did you changed the pathes?
Were you able to use controllers within the game? -
In a manner of speaking, I was able to get it working, but it is not what you might expect. The Wesnoth shell does appear on the Ports screen in EmulationStation, and it will launch from there, but it is launching using the command line. All of the complex stuff in the .sh setup that was in place in the wiki was there so that the program would launch in, more or less, the same way as any other port. The problem with using the work around that was suggested (#!/bin/bash
sudo /opt/retropie/emulators/wesnoth/wesnoth-1.9) is that it circumvents all of the special stuff used to launch it properly and instead launches the game directly via command line. It does allow me to use the game without having to exit EmulationStation, but that's about it. The controllers do not work, you can not modify frame rates or anything by pressing a button to configure things, etc., etc.In addition to the issues with properly launching the game, there are also some performance issues. The screen flickers anytime there is movement or a new menu/dialogue screen pops up, placing the cursor over anything that can be selected (like a unit or menu) causes some artifact as well as flicker, and the overall performance is slightly laggy (not enough to be too annoying, but enough to notice).
In the end, while I know that there is almost certainly a way to get this program to launch properly and probably a way to get it to perform properly, I am just not willing to put any more work into the project. After all of this, I am ok with simply playing The Battle of Wesnoth as a web app on my chromebook.
For those who are interested, go to the command line and download wesnoth-1.9 directly (sudo apt-get install wesnoth-1.9). Once it's installed, make sure that you change permissions to allow anyone to read/write the folders and the locations to which you move them (sudo chmod a+rw name_of_folder). Once the files are where you want them, navigate to their location and change the permissions of the executable file to allow anyone to execute the wesnoth game (sudo chmod a+rwx wesnoth-1.9). At this point follow the wiki to set up the .sh script and to make it so that EmulatioStation can see it. If you're ok with having it run via command line then just use the setup that was previously suggested (#!/bin/bash
sudo /file_path/wesnoth-1.9), but if you want it to work properly, then some experimentation is in order. If you figure it all out, then let me know. -
@jabberwock101
Thank you so much for your effords.
There seems to be a workaround for the flickering effect. https://www.raspberrypi.org/forums/viewtopic.php?f=53&t=30030About controller joystick support:
Can you please try this? https://forums.wesnoth.org/viewtopic.php?f=6&t=34205Get it Working Some joysticks (only older ones?) need to get calibrated before usage. Look at your device driver's or operating system's tool in order to do so. The joystick support is disabled by default. The feature was just not stable enough and it cluttered the advanced preferences too much. You can still edit the preferences file with a text editor to enable it.
-
@cyperghost Have you had any success getting these to work?
-
@wmcclelion
No I never tried to install BfW on the Pie, therefore I can't tell. I think it's possible to get the game run flawless on the Pie. But I think the control set is still best with mouse and keyboard. Controllers are only second choice :(As I read in an other forum the support for Joystick/Controllers was setted in "Option > Advanced option" but was removed later for "cosmetical reasons".
-
Update:
I tried on Windows mashine...So go to your BfW install location and open the data inside.
Go to folder "userdata" there are your savegames and map editor data stored
Theres a filepreferences
Search for joystick ... find and change entryjoystick_support_enabled=yes
Start BofW.... Now edit the file again and you will find:joystick_cursor_deadzone="" joystick_cursor_threshold="" joystick_cursor_xaxis_num="" joystick_cursor_yaxis_num="" joystick_num_cursor_xaxis="" joystick_num_cursor_yaxis="" joystick_num_scroll_xaxis="" joystick_num_scroll_yaxis="" joystick_num_thrusta_axis="" joystick_scroll_deadzone="" joystick_scroll_xaxis_num="" joystick_scroll_yaxis_num="" joystick_support_enabled=yes joystick_thrusta_axis_num="" joystick_thrusta_deadzone=""
But I haven't figured out yet :) I hope on Unix mashines it would be equal
I was able to move selection grid and 4-axis-scrolling was possible.
-
i fixed months ago the flickering if anyone is interested let me know.
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.