Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old May 9, 2020, 20:23   #1
Archenoth
Scout
 
Archenoth's Avatar
 
Join Date: May 2020
Posts: 26
Archenoth is on a distinguished road
Variants on Android

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:
  1. More roguelikes are playable anywhere!
  2. 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
  3. 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?
Archenoth is offline   Reply With Quote
Old May 9, 2020, 23:33   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 58
Posts: 9,565
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
That's great. I'm now considering getting an Android tablet just for this
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 10, 2020, 00:53   #3
Diego Gonzalez
Adept
 
Join Date: May 2007
Posts: 170
Diego Gonzalez is on a distinguished road
Nice! Improving the android app is quite a task, and having the chance to play variants without too many changes is great!
Diego Gonzalez is offline   Reply With Quote
Old May 10, 2020, 02:19   #4
Archenoth
Scout
 
Archenoth's Avatar
 
Join Date: May 2020
Posts: 26
Archenoth is on a distinguished road
Quote:
Originally Posted by Nick View Post
That's great. I'm now considering getting an Android tablet just for this
I find that, surprisingly enough, tablets seem to play less nicely than normal phones do. This is mostly because the size of the screen makes it hard to hit the keys comfortably. (Since you have to move your hands to hit a lot of them as opposed to being able to use them all with one hand)

Phones are weird because the size of them means that hitting any key on the keyboard isn't actually that difficult. (Like, it's about the same difference as typing on a phone instead of a computer; which people do a lot) So if you can get the directions and some of the more commonly-used special characters on the screen in a place where it's as easy to press as the keyboard keys, I find that it's surprisingly usable.

I tried on a tablet too, but all the extra distance my hands had to move to do things like movement and the fact that there wasn't a consistent way to hold it to do that means that an external keyboard was significantly more comfortable in my case.
Archenoth is offline   Reply With Quote
Old August 25, 2020, 20:01   #5
Archenoth
Scout
 
Archenoth's Avatar
 
Join Date: May 2020
Posts: 26
Archenoth is on a distinguished road
Heck yeah! Some of the stuff in my post got compiled into a package, so now if anyone wants to play frogcomposband in Termux, it's just a matter of running "apt install frogcomposband"~

Sil and ToME 2 will probably be next. ^^
Archenoth is offline   Reply With Quote
Old February 7, 2021, 07:37   #6
KesTheHammer
Apprentice
 
Join Date: Feb 2021
Posts: 50
KesTheHammer is on a distinguished road
I'm no Linux expert. So I installed Termux from the play store, and typed in "apt install frogcompsband" and it said unable to locate package frogcompsband
KesTheHammer is offline   Reply With Quote
Old February 7, 2021, 10:42   #7
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
Pete Mack will become famous soon enough
@Nick--
The android port for Angband is better still.
Pete Mack is offline   Reply With Quote
Old March 19, 2021, 18:27   #8
Archenoth
Scout
 
Archenoth's Avatar
 
Join Date: May 2020
Posts: 26
Archenoth is on a distinguished road
Quote:
Originally Posted by KesTheHammer View Post
I'm no Linux expert. So I installed Termux from the play store, and typed in "apt install frogcompsband" and it said unable to locate package frogcompsband
Oh! That should be frogcomposband

You can tab complete it pretty early into the name to avoid needing to type the whole thing too~
Archenoth is offline   Reply With Quote
Old March 20, 2021, 01:18   #9
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
Pete Mack will become famous soon enough
@Archenoth--
I tried playing in Termux at one point, but I couldn't get around the soft keyboard. It doesn't have a raw mode, as angband requires. (It also mucks up the command line.)
Pete Mack is offline   Reply With Quote
Old March 24, 2021, 07:15   #10
Archenoth
Scout
 
Archenoth's Avatar
 
Join Date: May 2020
Posts: 26
Archenoth is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
@Archenoth--
I tried playing in Termux at one point, but I couldn't get around the soft keyboard. It doesn't have a raw mode, as angband requires.
Yeaaah, that's why I usually ended up adding the layer of custom keys into Termux to play. Doing it with just the keyboard on its own would be pretty tricky.
The custom key row allows for key repeats and other fancy things to be put wherever you like, though it does require some setup. (That's actually why I mentioned this if you wanted to use my key setup instead of making your own from scratch.)

Quote:
Originally Posted by Pete Mack View Post
(It also mucks up the command line.)
Oh? It really shouldn't act differently than running it in a normal terminal.

If you have more information, maybe I can find out what's happening here.
Archenoth is offline   Reply With Quote
Reply

Tags
android


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
(Poschengband or Variants) Is there a way to play any of them on Android phones? adan464 Variants 2 December 22, 2018 06:08
Sil and Angband variants available on Android half Sil 37 November 11, 2016 01:19
[Android] New Variants on my phone? why not... Doc_cheilvenerdi.org Variants 3 July 4, 2015 10:36
Angband variants for android-device Angrist Variants 0 June 26, 2015 17:50
3.5.1 for Android? Klavain Vanilla 4 January 5, 2015 12:41


All times are GMT +1. The time now is 09:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.