Android / iPhone Port

Discussion about Rocks'n'Diamonds, Boulder Dash, Supaplex, Emerald Mine and any other BD hybrid.

Moderators: Flumminator, Zomis

Post Reply
HerzAusGold
Posts: 362
Joined: Sun Sep 25, 2005 4:41 pm
Location: Germany

Android / iPhone Port

Post by HerzAusGold »

Hi,
there is a iPhone/iPad port of EM available, here: http://www.lesbird.com/EmeraldMine/
But it's not very good playable on my iPone-Air (controlling is difficult).
Hope you make a better port for android and maybe for iphone.

If you need zip-support or download-support take a look to RndTest source where i have implemented this.
If I can contribute to the development, just send a mail. :wink:

Best greatings
HerzAusGold
And the answer is ... 42 !
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Android / iPhone Port

Post by Holger »

Hi HerzAusGold,

good to see you in the forum again! :-)

> there is a iPhone/iPad port of EM available, here: http://www.lesbird.com/EmeraldMine/

Yes, looks promising! Wasn't able to test it on an iOS device yet...

> But it's not very good playable on my iPone-Air (controlling is difficult).

Do you mean iPod or iPhone? I can imagine that it is not easy to implement good, usable game controls for an iPhone port, but for the iPad, something that works more or less fine should be possible, I think.

BTW: How do these controls exactly work? I've found this on the AppStore page of that game:

"Control your character by sliding your finger in the direction you want to go. Tap a nearby block to grab it. Tap and hold to plant dynamite. Many alternate control methods to choose from."

This sounds like a reasonable well-working game control for this kind of game. (And the "many alternate controls" suggests that there's something that works for mostly everybody.)

I'm asking because I'm just facing the exact same problem. My Android port of R'n'D already works quite fine (although it still needs an alternative default artwork set that fits the game to the small screen), but I'm indeed having problems with non-frustrating game controls at the moment. I've played around with both standard "emulated buttons" controls (which always tend to suck IMHO, because there's no feedback if you hit the right part of the touch screen) and "sliding finger" controls (which works quite fine on the touch pad of a MacBook Air, but currently doesn't on the touch screen of an S4 mini).

So maybe you can shed some light on those "alternate controls" and how they exactly work, and which of the available controls work best (or worst) in your opinion, and why?

> Hope you make a better port for android and maybe for iphone.

I'll try my best -- I think the following challenges are the most critical parts to get it working reasonably well:

The Screen Size

Although the game as we know it might work more or less fine on a tablet, the menu and the game is too small when played on a phone device. Therefore, it needs an alternative artwork set that makes it usable with normally sized fingers and normally sharp vision. The main problem is that standard R'n'D menus won't fit on the screen without scrolling anymore, but this can be fixed by adding scrollbars (and hopefully menu screens that can be scrolled by swiping gestures).

The Game Controls

See above! This is probably the most critical part of the port of R'n'D to mobile devices. For a long time, I have seen a (digital, that means "Amiga style") joystick as the gaming device best suited for playing R'n'D and similar games. Although owning a "Competition Pro" joystick with USB connector and having it used to play R'n'D, I've got used to using the keyboard for many years now, and it works as least as good as a joystick, I think. On a phone or a tablet, you (usually) have neither of them, which raises the question what might be the best way to play a game like R'n'D on a device like a smart phone (or if this kind of game is just not suited well enough for touch devices). I'm still trying to find game controls that do not suck too hard...

The Level Archive

While it was never trivial for beginners to add levels to R'n'D, most people get it to work once they know what to do (extract a zip archive into the right directory on the computer). On a mobile device, things may get a bit more complicated. The most similar method may be something like this: "Mount the SD card (if you have one, and if you know how to do that) from your mobile device on your laptop or desktop PC (if you have one) and extract (or copy) a zip archive into the right directory on that SD card." While this would probably work (not implemented yet), it's probably even less comfortable than adding levels to the desktop version of R'n'D. Solution: Use an online R'n'D level archive that can be browsed from within the game. This will most probably be the way to go for mobile R'n'D (and then also desktop R'n'D, of course).

> If you need zip-support or download-support take a look to RndTest source where i have implemented this.

I know well, and I'm very happy that you once already did that work! Even though this code never found its way into the "official" source tree of R'n'D, I still have all versions of the RndTest source code you once made available to me, and I will definitely use them to add the new "level archive" feature described above.

> If I can contribute to the development, just send a mail. :wink:

I will contact you regarding the above, and I'm also happy that you may be able to help with experience regarding game controls on touch devices for R'n'D style games!
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Android / iPhone Port

Post by Holger »

BTW:

> and maybe for iphone

At the moment I'm only working on an Android port, but this is not necessarily a problem regarding a port for iOS devices: To port R'n'D to Android, I have first ported it from SDL to SDL2 (which has support for both Android and iOS), so the final version with Android support should (theoretically) be easily adjustable (or even compilable) for iOS devices, too.

The main problem I can see at the moment is that it seems to be that iOS support without releasing the game in the AppStore (or is it called iTunes Store?) is simply not possible. Am I right here? Or did I just understand something totally wrong?

As I'm quite sure that I do not want to release the mobile version of R'n'D in the Google Play Store or in the Apple App Store, this may be an important issue regarding the iOS version. Regarding the Android version, this is quite simple both in developing and releasing it: I can just type "make android" here to compile the code and automatically upload and install it on my Android phone without any further keypress or other action, and I can release the final game as an APK file on the R'n'D download site, which I can simply touch in my mobile browser, press another button "yes, I want to install an APK not signed by Google" and there you are.

Does anybody know if something similar is possible for iOS, too? I would be happy to hear that this works similarly well.
HerzAusGold
Posts: 362
Joined: Sun Sep 25, 2005 4:41 pm
Location: Germany

Re: Android / iPhone Port

Post by HerzAusGold »

Does anybody know if something similar is possible for iOS, too? I would be happy to hear that this works similarly well.
I think there is no way without paying to apple a developer fee.
On android its easy put the .apk to the SD. Tried with AROS for Android.
Do you mean iPod or iPhone?
I mean a iPad-Air.
There are several controls which i can't test because it seems that it's need extra hardware.
- Slide - player follow the finger (like mouse support in rndTest) but snap is difficult because you have to tap near the place you are (not very much place for two fingers)
- Dpad - a cursor field on the screen (need more concentration)
- Touch - up/down field on the left // left/right on the right // snap in the middle
- Joypad - need extra hardware i think
- Arcade - dont know
- Gamepad - via bluetooth i think
Sensitivity for all modes avail but not much different.
everywhere player runs mostly more than one field.
game is a little bit too fast.

Hmm, Slide is the best. I would prefer snap with some hardware switches.
Or some special gestures. I don't know.

Touch should be: up/left on left side down/right on the right. Or configurable.

Hmm, sliding in an extra area (on a pad) should be the best (with buttons for snap/dynamite for the left hand)
because sliding on the play area mostly hide the player.
The Level Archive
like i have done with zomis archive, all archives (in zip or .level) format can be downloaded via menu.

you may be able to help with experience regarding game controls on touch devices for R'n'D style games!
I'm not very good reference, may be you can ask in lesbird's forum.


best wish
And the answer is ... 42 !
lesbird
Posts: 12
Joined: Wed Feb 03, 2016 2:29 am

Re: Android / iPhone Port

Post by lesbird »

I can explain how these work:

There are several controls which i can't test because it seems that it's need extra hardware.
- Slide - player follow the finger (like mouse support in rndTest) but snap is difficult because you have to tap near the place you are (not very much place for two fingers)
- Dpad - a cursor field on the screen (need more concentration)
- Touch - up/down field on the left // left/right on the right // snap in the middle
- Joypad - need extra hardware i think
- Arcade - dont know
- Gamepad - via bluetooth i think

Slide - swipe your finger in the direction you want to move. This is by far the best control method for touch screen devices.
Dpad - this overlays the game area with soft touchscreen buttons. I agree with Holger in that soft virtual buttons are terrible. You can't feel them and therefore can never tell if you are touching them. I added virtual buttons to Emerald Mine for iOS because people were asking for them.
Touch - again, virtual buttons but arranged on the side of the screen (left side has up/down, right side has left/right)
Joypad - this is a 3rd party bluetooth? controller. i don't remember if it was any good or not.
Arcade - this is the iCade arcade stick. It's a mini-arcade cabinet that you put your iPad in and it has an arcade stick and several arcade quality buttons. It works by sending keystrokes to the iPad so it's like connecting a bluetooth keyboard to your device.
Gamepad - bluetooth. If I recall this one emulated the iCade but was in handheld gamepad form factor.

- Les
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: Android / iPhone Port

Post by filbo »

The Screen Size

Although the game as we know it might work more or less fine on a tablet, the menu and the game is too small when played on a phone device. Therefore, it needs an alternative artwork set that makes it usable with normally sized fingers and normally sharp vision. The main problem is that standard R'n'D menus won't fit on the screen without scrolling anymore, but this can be fixed by adding scrollbars (and hopefully menu screens that can be scrolled by swiping gestures).
Which menus are too big? I looked around: it seemed like maybe main menu, plus various setup screens.

Main menu:

I think most of the main menu can be converted to icons and "intuitive actions".

"Setup" can be one of the various icons people use for "Options".
"Name" can be an option under Setup / Options.

You display a current-level preview. Lots of actions can be associated with or clustered around that:

Near (above or below) the preview, display a box with these controls:

[Levelset name] -- clicking it goes to levelset selector (including download actions)
[(?) icon] (one of those circles with a ? in it) -- click to go to "Info screen"
[Level #] -- touch and drag left/right can spin it like a wheel, so doesn't need left/right arrows; can have a "temperature" bar behind the number, so doesn't need numeric range. Touch and hold can pop up the selector menu, if that's still helpful.
[High score] -- just show the level's top score here with some sort of visual styling to make it apparent that it's a high score. Clicking it goes to "hall of fame" page.

Touch the preview to play that level. (Possibly shadow-overlay a "play" button somewhere to make this more obvious.)

Next to preview, one of those "tools" widgets (hammer + screwdriver??) means "edit this level" == "Level creator".

"X" icon or power-button for quit.

There -- I think I've destroyed all the elements of the main menu! ;-}

Setup can be broken into more smaller areas or more nested submenus...
The Level Archive

While it was never trivial for beginners to add levels to R'n'D, most people get it to work once they know what to do (extract a zip archive into the right directory on the computer). On a mobile device, things may get a bit more complicated. The most similar method may be something like this: "Mount the SD card (if you have one, and if you know how to do that) from your mobile device on your laptop or desktop PC (if you have one) and extract (or copy) a zip archive into the right directory on that SD card." While this would probably work (not implemented yet), it's probably even less comfortable than adding levels to the desktop version of R'n'D. Solution: Use an online R'n'D level archive that can be browsed from within the game. This will most probably be the way to go for mobile R'n'D (and then also desktop R'n'D, of course).
I'm in support of integration between the game-in-hand (on mobile or desktop) + online level (and high score & tape) archives. OTOH, I'm not sure how necessary it is, at least for levelsets.

I have just about every level I could find(*) installed below my /usr/share/games/rocksndiamonds/... (mostly levels/...). This adds up to around 450 megabytes. But if I make a single archive of it all with `7-zip`, I can get it down to ~70MB. That still sounds kind of big, but -- my Android phone frequently wants to update components like Hangouts or Maps, downloading more than that. It just isn't that big in the modern world. (*)Actually I've collected several archives over the last few years that I haven't actually busted out into the hierarchy yet, but AFAICR they collectively add up to almost no storage.

Maybe the way to do it would be: include a nice subset in the main game archive -- enough to play for weeks, yet only add a few MB to the download. Provide everything else in a single add-on archive which can be downloaded from the levelsets menu ("Get additional levels (60MB download)"). Which is actually fairly similar to the way you currently do it for desktop; just a bit more integrated and (I propose) more globbed together since the overall size isn't that scary. ... Could be broken up further, e.g. if you must reach out to certain 3rd party sites to maintain proper handling of copyright of other people's levelsets.
As I'm quite sure that I do not want to release the mobile version of R'n'D in the Google Play Store or in the Apple App Store
Could you revisit (I mean "retell us") your reasoning for this? Both "stores" allow free items. There's probably some small cost associated with getting in, but (A) it's small, (B) it might be possible to get it waived for something that's going to be free + no in-game revenue model + classic open source historic object. There are also rules about things you can't do, but those are either about safety of the user's device & private information (which I hope you are completely following whether or not they order you to), or about not drawing revenue outside their store models (which you're certainly following!)
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Android / iPhone Port

Post by Holger »

Hi filbo,

first of all, I have to say that I really like the fresh ideas and thinking you bring to various R'n'D topics! Apparently I do not see some obvious solutions for some problems and questions anymore after working for over 20 years on R'n'D now! :-D
Which menus are too big? I looked around: it seemed like maybe main menu, plus various setup screens.
As phones tend to grow larger and larger, this is less of a problem anymore I think. Since I wrote about that, I've changed the setup menues to dynamically add a scrollbar if the screen height gets to narrow. And about the main screen, it can now be customized to an extend that it should be possible to resize it in a way that it will still be usable nicely.
I think most of the main menu can be converted to icons and "intuitive actions". [...] There -- I think I've destroyed all the elements of the main menu! ;-}
These are all great ideas! I think I will make a test levelset to see how this would look like and how it would work! :-)

Again, I feel that I'm quite stuck with the classic Emerald Mine style layout and appearance of the R'n'D main menu screen in a way that nearly makes it impossible (or at least very hard) for me to think into a completely other direction. Your suggestions are so obvious now that I've read them!

The cool thing about it is that most of it can already be achieved simply by using the already existing custom artwork configuration possibilities! All those menu texts can already be replaced by icons (also see the "R'n'D jue" level sets for an example). The only things and functionalities still missing are:

- clicking the preview area starts the game with that level => very easy to add
- move "name" to setup menu => not so easy, but possible
- clicking level set name to go to level sets selection screen => very easy to add
- level number selection => a little bit too "touch specific", not totally sure about it yet
- clicking on a high score to get to "hall of fame" => new main menu element, but should be easy to add

Everything else should already be there for a customized mobile version of the game.
I'm in support of integration between the game-in-hand (on mobile or desktop) + online level (and high score & tape) archives. OTOH, I'm not sure how necessary it is, at least for levelsets.
Again, I'm sometimes losing sight of how things have changed in the last 20 years. ;-D You are of course perfecly right that there is no law that the R'n'D download archive shouldn't be larger than a few megabytes. Times have changed since 1995! ;-)

Same is true for the level archives, of course. Maybe I should just offer an additional, large, but 7-zip compressed "contains all you want" archive file that contains all and everthing R'n'D. And yes, you're right that it would probably still be smaller than most of the operating system updates we get from time to time... :-o
Could you revisit (I mean "retell us") your reasoning for this? Both "stores" allow free items.
Oh, well, that's already two years ago that I wrote that... :-o ;-)

Hm, I think my objections against using the official app stores maybe have changed a bit... I won't go into detail here, but it also has something to do with R'n'D using quite a lot of things and stuff from the "abandonware" department, as we all know. And I do not always know where level and artwork creators take their graphics, sounds and music from. So it could be an advantage to fly a bit below the radar, to reduce the possibility of being forced to remove parts of the game. (Just think of the music loops of older versions of the game, although these were removed in advance before somebody complained about it (not to speak of demand for compensation of using them) at a time where people got sued for uploading music etc.) These could all be reasons not to use third-party services that maintain download counters etc. ... There probably are various solutions to such potential problems, like removing problematic things, if requested, or stripping off potentially problematic parts. These are some of my thoughts against using these official app stores for R'n'D. On the other hand, if, well, somebody else would prepare and package R'n'D for the app stores, I couldn't do much about it, as it's all GPL'ed software, and additional stuff is freely available...

I think, further thoughts on the last topic may probably better be discussed by mail. :-)
Post Reply