So, I've been doing a little testing, and it seems like it's not actually terribly difficult to get most variants to compile and work on Android using Termux.
Basically, you can get enough of a compilation environment running on Android natively with it (You can just install the right tools and libraries with apt) that, with a few tweaks, I've found that mostly any variant is possible while following the building instructions for Linux.
So far I've had success with frogcomposband, Zangband, and Sil, but I bet most others will work too.
The cool things about this are:
For example, here's Sil:
Some of the tweaks that I had to do to make it more playable include:
One hurdle when compiling most of these is that there is a list of system calls that Android will cause the kernel to outright kill -9 some games, which are listed here. But those aren't too difficult to discover and bypass if you just try to compile normally, and run the game through strace if it dies. (Eg "strace ./frogcomposband")
That lets you basically just grep the code for that syscall so you can replace it with nothing. (Most of them don't do anything in the single-user/single-group CLI that Android has anyway)
I know there are versions of the main game on the Play Store, and I think that's super-neat, but I figured I'd just throw out what I've been doing recently in case someone else wanted to play a variant of their choice on the go, and didn't realize this was an option without making a full-blown app!
Thoughts? Ideas? And has anyone else done something like this?
Basically, you can get enough of a compilation environment running on Android natively with it (You can just install the right tools and libraries with apt) that, with a few tweaks, I've found that mostly any variant is possible while following the building instructions for Linux.
So far I've had success with frogcomposband, Zangband, and Sil, but I bet most others will work too.
The cool things about this are:
- More roguelikes are playable anywhere!
- They take up basically no battery when playing, and if you put your phone in power saving mode, you can play on most phones for a really, really long time
- Termux lets you create custom key layouts, so they are actually surprisingly easy to control if you are fine with the screen size in portrait mode
For example, here's Sil:
Some of the tweaks that I had to do to make it more playable include:
- The custom keys along the top, which you can find here. (You can put that in termux.properties)
- Use the "roguelike keyset" in the games played to keep things consistent
- Keymap the arrow keys with hjkl directions in my keymaps (Arrows in Termux auto-repeat if you hold them down, and arrows are sometimes bound to "run a direction")
One hurdle when compiling most of these is that there is a list of system calls that Android will cause the kernel to outright kill -9 some games, which are listed here. But those aren't too difficult to discover and bypass if you just try to compile normally, and run the game through strace if it dies. (Eg "strace ./frogcomposband")
That lets you basically just grep the code for that syscall so you can replace it with nothing. (Most of them don't do anything in the single-user/single-group CLI that Android has anyway)
I know there are versions of the main game on the Play Store, and I think that's super-neat, but I figured I'd just throw out what I've been doing recently in case someone else wanted to play a variant of their choice on the go, and didn't realize this was an option without making a full-blown app!
Thoughts? Ideas? And has anyone else done something like this?
Comment