Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea for the Android port #575

Closed
5 of 9 tasks
BlisterB opened this issue Sep 7, 2015 · 66 comments
Closed
5 of 9 tasks

Idea for the Android port #575

BlisterB opened this issue Sep 7, 2015 · 66 comments
Labels

Comments

@BlisterB
Copy link
Member

BlisterB commented Sep 7, 2015

Hi guys !

I open this issue to centralize suggestions about how improve the Android port, don't hesitate to give me job :) !

Idea :

  • Multiple game directory
  • Hi res splash screen while game browser parses the directories (I think this one is not possible has it depend from the C++ code)
  • Thumbnail support in GameBrowser (ask to find a quick way to store title screenshot)
  • Key mapping for gamepads
  • Better configuration file for projects
  • Re do the settings activity
  • Different game displaying system depending on device screen
  • A setting button in "select game layout"
  • Ask for permission to add .nomedia in new game folder.
@Ghabry
Copy link
Member

Ghabry commented Sep 7, 2015

  • Support for multiply game directories (configurable in the settings)
    • The Game Browser itself should just merge all directories
    • Problem: How to deal with duplicates (same game in multiple directories)
    • Problem: On some Android devices (Android 4.4) the SD card is without rooting only writable by system apps (= only google)
      • Workaround: New command line option --save-path to overwrite the save directory (and save in the data directory of the apk instead). This should be transparent for the user, no interaction required.
  • Button mapping for individual games
    • Reasonable defaults for RPG2k and RPG2k3 and some popular games, e.g. Yume Nikki preset
    • Moving buttons around while ingame (with running game rendered semi-transparent in the background)
    • Resizing of buttons
  • A shiny, high-res "Easy RPG Player" splashscreen while the game browser parses the directories ;)
  • Some users asked for Thumbnail support, but that would require some LDB parsing to get the title image

I don't think that file management (delete game e.g.) is required, but maybe "open game directory" and "open save directory", which launches ES File Explorer or whatever is installed.

@BlisterB
Copy link
Member Author

BlisterB commented Sep 7, 2015

Thanks for the ideas :) ! I'll start to improve the button mapping system (the easiest xp). I think I'll switch to an xml format, that will be way more flexible for the futur.

I thought of this :

I also thought of displaying a thumbnail, that would be a big UX improvement BUT there are those .LDB parsing and folder's name thing (different depending on version/location). If I find which function are involved in the C++ code I maybe will be able to use them with JNI (after learning how to use it hahaha).

@Ghabry
Copy link
Member

Ghabry commented Sep 7, 2015

The problem here is that liblcf is not optimized for quickly extracting a single information out of the LDB-database. It always parses all of it, which is a waste of time here. The only feasible approach when using liblcf here is to cache the result... or to write a very simple parser in Java, only extracting title image and version code is simple.

@Zegeri
Copy link
Member

Zegeri commented Sep 7, 2015

It could create the thumbnail the first time you open the game.

@Ghabry Ghabry added the Android label Sep 7, 2015
@fdelapena
Copy link
Contributor

  • Fix allow horizontal screen flip preventing activity reset. Having vertical might also be worth, with relative virtual buttons positioning. This is useful for larger screens and buttons are not covering the game screen.
  • Joystick custom key mapping support, e.g. for Xperia Play, Ouya and bluetooth pads. I'd prefer this being cross platform but it's OK for now.

@BlisterB
Copy link
Member Author

BlisterB commented Sep 8, 2015

Haha I was the guy who annoyed you for Xperia Play support, but it's dead snif RIP gaming in train ;'(.
Okay so I'll deeply remake the button mapping system !

Is it a problem if I use JDOM .jar to parse xml ? It use an Apache licence, which is GPL3 compatible.
https://en.wikipedia.org/wiki/JDOM
https://en.wikipedia.org/wiki/Apache_License

@fdelapena
Copy link
Contributor

According with the license is an Apache-like license but not Apache. Apache 2.0 license is GPLv3 compatible but JDOM license clause 4 is GPL incompatible, according with a related question in debian-legal mailing list.

@BlisterB
Copy link
Member Author

BlisterB commented Sep 8, 2015

Pff those licences stuff break my balls. Thanks for the explanation !
I'll use a basic format.

@Ghabry
Copy link
Member

Ghabry commented Sep 8, 2015

Doesn't Java include a XML parser?
Did you consider using json? ;)

@BlisterB
Copy link
Member Author

BlisterB commented Sep 8, 2015

Oh nice, I didn't even known about that format, thanks Ghabry !

@Zegeri
Copy link
Member

Zegeri commented Sep 8, 2015

If it used INI, the per-game setting could be loaded/saved from the RPG_RT.ini file. That way, if you want to distribute your game using easyrpg, you could set a recommended default buttons setting.

@fdelapena
Copy link
Contributor

+1 for .ini, you can use ini4j and eventually it could be reused later for a non-Android implementation without losing existing stored settings.

@BlisterB
Copy link
Member Author

BlisterB commented Sep 8, 2015

That's a good idea but the problem is that EasyRPG will have its own button preset list, if the user modifies one, it has to be applied to all game involved. But I can implement a way for a developper to suggest a predefined button mapping in the .ini, EasyRPG would ask the first time to the user if he want to use it.

@BlisterB
Copy link
Member Author

Hi guys.
Some news, I'm working on proportional input layout (between landscape and portrait mode)... And as I thought it's not good. To keep approximatively proportions in portrait I only consider half of the screen. But buttons become too short.
screenshot_2015-09-25-17-01-30
screenshot_2015-09-25-17-01-35

I don't really know what to do, here are some clues :

  • Use fixed sized button in portrait (with adjustment in position, aka the present situation in master branch), and resizable button only in landscape
  • Resizable buttons in portrait and landscape mode, but 200% of normal size in portrait

In both configuration there is the risk of buttons on others buttons. But I think the first one is better.

@BlisterB
Copy link
Member Author

  • Use resizable buttons in both orientation (based on fixed proportion and not screen resolution), but cheating in portrait with proportion and an horizontal gap seems to be a good choice.

@fdelapena
Copy link
Contributor

Nice, some users asked for resizable buttons for several devices, they were looking too small. What about another slider to adjust the size by the user if possible?

@BlisterB
Copy link
Member Author

:o
I was wondering how to display the resizing function for days and you unlocked it in my mind.

Sooooo. 2 options :

  • In ButtonMapping system, display a slider under the last moved button, to resize it in real time (I'll learn one or more thing hihi).
  • In Settings Activity, displaying a resize option for every button of every inputLayout (one slider to rule them all)
    OR
  • Doing the 2 things, BUT with a checkbox in settings, to bypass inputLayout resize configuration (look the best to me).

@Ghabry
Copy link
Member

Ghabry commented Sep 26, 2015

How about activating a button by touching it (color changes) and then you can resize it by making a zoom gesture (moving two fingers)

@BlisterB
Copy link
Member Author

API 10 my friend :p
But there will be a thing to show that the button is selected and a another to show the possibility to resize it, which is not the case for two fingered movements.

@BlisterB
Copy link
Member Author

Soooo. Here are the Adventures of BlisterB in an Android World™.

To have a clean and an understandable GUI, use discrete sliders is a good idea (better than implement an ugly thing with a textfield actualized in real time).
Good news, Android Visual GuideLine are talking of discrete sliders, they looks awesome :
https://www.google.com/design/spec/components/sliders.html#sliders-discrete-slider

That's wonderful, this will provide us a wonderful GUI.
Guess what, those slider doesn't exist.. Nowhere, not in a single API's version.
(That's not a joke XD).

The only solution (like everytime in android) is to use a library that solve the problem:
https://github.com/AnderWeb/discreteSeekBar

By chance, this one use a true Apache V2 licence. So we can include it in EasyRPG :
http://www.apache.org/licenses/GPL-compatibility.html

Does it poses a problem if I use it ?

@BlisterB
Copy link
Member Author

(Of course I can do the textfield thing)

@Ghabry
Copy link
Member

Ghabry commented Sep 27, 2015

Sure if you think that external libs are useful add them.
What is the problem with your current slider solution? For me it works fine ^^

@BlisterB
Copy link
Member Author

Yep I finally did the other solution and it's not so bad. Sometimes you just go nuts when you see the difference between what they say you can do and what you really can do lol.
I'll remember the libs thing for later, thanks Ghabry !

Btw the Android port really starts to being cool ^^. But the Google Play (in french) highlights just comments talking about past problems.. What a shame ! Is there a way to hide them ? (As they are solved for a long time).

@BlisterB
Copy link
Member Author

BlisterB commented Oct 1, 2015

Another thing to do :
Fix the standalone mode.

@Ghabry
Copy link
Member

Ghabry commented Oct 1, 2015

The standalone mode has one gigantic problem: It wastes twice the space because the game must be extracted out of the assets.
Maybe it should be considered to download the game over the internet on startup instead.
Any other suggestions?

The more complex solution would be to work with Streams in the FileFinder API and not with Filenames... then we could open streams to the files in the asset part of the APK.

And no we can't hide anything in the Store. Imo it is really stupid, that all rating are weighted the same way. Older ratings should be downweighted to make it possible to get a better rating over time.

@BlisterB
Copy link
Member Author

BlisterB commented Oct 1, 2015

Yeah that sucks ! Some bad comments from frenchies comes from people which seems to have no idea of what is RPG Maker ^^".

I fixed the standalone mode, I saw the problem of copy folders. Why is there a copy ? Because application cannot write file in asset folder ? For the moment it's not a big deal, but we can find solution such as copying file in external storage or use a different folder for save/log/etc.
A good thing to implement is the possibility for the maker to indicate preferences (button mapping, screen filter etc.) in a file. It would be loaded in standalone (in game browser mode, a dialog box would ask the first time if the user wants to use the maker's preferences, or user's preferences).

@Ghabry
Copy link
Member

Ghabry commented Oct 1, 2015

The problem is that the Assets are in in an archive, so you can't get a handle to them from the native code.

This could be worked around by adding extra code to the following FileFinder functions (native code):

fopenUTF8 
IsDirectory 
Exists
GetDirectoryMembers

Then it should be possible to use the asset dir directly.

https://stackoverflow.com/questions/13317387/how-to-get-file-in-assets-from-android-ndk

Should be easily possible to get a FILE* handle by using AAsset_openFileDescriptor and then open this descriptor using fdopen. Will check this during the weekend :)

@Ghabry
Copy link
Member

Ghabry commented Oct 5, 2015

Maybe this could be clarified by changing the text in the "Add button" dialog (the user should see this dialog because he searches ESC).
And changing the text of "B" to: "B (Equal to keys ESC and X)"
(and while doing this "A (Equal to keys ENTER/RETURN and Y)")

@BlisterB
Copy link
Member Author

BlisterB commented Oct 5, 2015

It sounds to be an excellent compromise
Le 5 oct. 2015 10:53 AM, "Ghabry" notifications@github.com a écrit :

Maybe this could be clarified by changing the text in the "Add button"
dialog (the user should see this dialog because he searches ESC).
And changing the text of "B" to: "B (Equal to keys ESC and X)"
(and while doing this "A (Equal to keys ENTER/RETURN and Y)")


Reply to this email directly or view it on GitHub
#575 (comment).

@Ghabry
Copy link
Member

Ghabry commented Jan 1, 2016

There are 3 minor (?) (well it's Android, maybe they are tricky :D) improvements that would be useful:
[ ] Force Orientation (*) Landscape ( ) Orientation in settings
[ Edit ] Button in the "Choose Layout" dialog because the users are too stupid to open the settings

In Game:
[ Settings ] to open the settings
[ Edit Layout ] to edit the current used layout

@BlisterB
Copy link
Member Author

BlisterB commented Jan 1, 2016

[ ] Force Orientation (*) Landscape ( ) Orientation in settings
[ Edit ] Button in the "Choose Layout" dialog because the users are too stupid to open the settings

Good ideas, my 2 friends will be available for working on the port in few weeks, this will be a great start for them to understand the project !
Also the Settings Activity start to be quite bulky, dividing option by section will be nice.

[ Settings ] to open the settings

We can use a "menu" button in game, the app "My Boy!" use this features and I find it usefull.

[ Edit Layout ] to edit the current used layout

Edit the layout in game would be a good improvement but, Android lolilol => will probably kill the game session while the user edit the layout in another activity x).

@Ghabry
Copy link
Member

Ghabry commented Jan 1, 2016

I wanted to write the "Force Orientation" on my own. But I gave up after 30min. because I had no idea how to do this. Not even breakpoints worked, the breakpoint is triggered but the activity rotates and native code continues m(
Yeah so I will forward it to your friends :D

@BlisterB
Copy link
Member Author

BlisterB commented Jan 1, 2016

Haha don't worry this is their problem now xp.
Screen orientation is a classic exemple of problems with Android : instead of providing a function doing it, we have to overwrite the function onConfigurationChanged(Configuration newConfig) and call it manually (and praying to not have complains from Samsung's users). This is counter the logic of the architecture, but well...

Even the SettingsActivity itself. Android provide an Activity helping changing preferences, but it's so limited that I was forced to code it like a normal activity x) (this is why the SettingsActivity is so bulky).

@Ghabry
Copy link
Member

Ghabry commented Mar 14, 2016

Maybe we should consider switching to API14 (4.0.4).

The amount of people running under 2.3.3 is currently less then 2% (200 devices) and the daily install rate of people with 2.3.3 is 1% (~3 devices).

@BlisterB
Copy link
Member Author

How do we do the thumb up icon, I need a lot of them

EDIT : 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍

@BlisterB
Copy link
Member Author

But more seriously, we should try to use the Android Support Library before switching to another API.
The problem is always the same : a lot of thing are not supported by native older api, even the API 14 and 15.

@BlisterB
Copy link
Member Author

(But Android Studio propose some really nice and intuitive Activity with API >= 15)

@Ghabry
Copy link
Member

Ghabry commented Mar 14, 2016

And have to correct myself: API 15 is 4.0.3 👍

@BlisterB
Copy link
Member Author

What do you think about keeping the minimum API to 10, but changing the target to 15?
Of course, only when somebody will have to implement something using the target 15.

@Ghabry
Copy link
Member

Ghabry commented Mar 14, 2016

Do what you want. I don't maintain the Android port 💃

@fdelapena
Copy link
Contributor

Interesting article about the API target concept: http://simonvt.net/2012/02/07/what-api-level-should-i-target/

@Ghabry
Copy link
Member

Ghabry commented Mar 17, 2016

A user suggested an option to disable the music because he prefers listening to his own ;).
Completely disabling is currently possible via "--disable-audio", better control is suggested in #794

@BlisterB
Copy link
Member Author

I was thinking about this and I suggested it to one of the french invaders.
--disable-audio is cool, but it works just at the game launch, right ?

They will try to find a way to modulate the app volume.

@Ghabry
Copy link
Member

Ghabry commented Mar 17, 2016

I don't want an Android only solution for modulating app volume and there is no obvious reason why you should use platform specific code for this. This is also useful for other ports (a friend already complained about the loudness of emscripten)

@BlisterB
Copy link
Member Author

Okay, but the user should be able to modulate the volume in app during a game. No ?

So if I follow you, we should be able from the android app to call a native function (which act as a callback design pattern on the C++ code?) during a game.
If we have such a function, it would be easy to implement the thing from the Android code (a call to changeVolume(value) in onResume( ) and onRestart()).

@BlisterB
Copy link
Member Author

Of course, we could assume that the user has to go in the settings to modify the volume (so stop the game). It makes sense in the actual form of the app, but we won't be able to add a features such as "modify the volume" in the menu of EasyRpgActivityPlayer.
But honestly your solution is fine (it's not a big thing to stop the game), but it would be nice to use a flag with a value, such as --volume 90. To use a spinbar in the settings (I assume some people like me want to hear a podcast, but also have a little volume of the game).

(Of course, we can just have a checkbox to enable/disable volume in Setting, it will be easier to implement - Captain Bash, if your reading that).

@Ghabry
Copy link
Member

Ghabry commented Mar 17, 2016

See #794 (comment)

So a "Open Settings" option in the EasyRpgPlayerActivity to trigger Scene_Options (which doesn't exist yet) is good enough

@BachirAmiri
Copy link

  • Captain Bash reporting on duty !

I'll try adding the volume checkbox :)

(btw it's kael from the forum, nickname already taken on git )

@BlisterB
Copy link
Member Author

@Souigetsu Thanks Captain, this will be cool waiting the feature of Ghabry.

@Ghabry Are you talking of a doing a menu similar to your gamebrowser ?
This will be cool. Maybe a little confusing with the Android GUI but it's not a big thing, we will fing a good compromise when Scene_Options will be ready :).

@sushi24
Copy link
Contributor

sushi24 commented Mar 17, 2016

I'll try to help captain on this duty! ;)

@BlisterB
Copy link
Member Author

Don't worry it's pretty simple.
If you have time for another feature, you can do the "Force orientation Auto/Portrait/Landscape", it will be pretty the same as for the Volume features : an option in PreferencesActivity, some condition to add in EasyRpgActivity.

@Ghabry
Copy link
Member

Ghabry commented Mar 17, 2016

Edit the layout in game would be a good improvement but, Android lolilol => will
probably kill the game session while the user edit the layout in another activity x).

Actually I have this problem with "FB Lite" (FB App replacement): Attaching an image is impossible because it opens an indent e.g. file browser or camera. After selecting an image it returns, and the app restarts, because the system doesn't have enough RAM m(

@Ghabry
Copy link
Member

Ghabry commented Apr 12, 2016

@BlisterBoy another useful feature would be a language select in the settings. If somebody hates our translation ;)
or to force english.... most of the time app translations are bad or wrong

@Ghabry
Copy link
Member

Ghabry commented Oct 4, 2016

@BlisterB can we close this meta-issue?

@BlisterB
Copy link
Member Author

BlisterB commented Oct 4, 2016

Of course :)

Le 4 oct. 2016 5:59 PM, "Ghabry" notifications@github.com a écrit :

@BlisterB https://github.com/BlisterB can we close this meta-issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#575 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACRuE0YwhQ4rXZdymQL3gUXNL5U18nsYks5qwnf1gaJpZM4F47bB
.

@Ghabry Ghabry closed this as completed Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

7 participants