PaulsCode Forum

Mupen64Plus AE => General Discussion => Topic started by: Paul on March 04, 2013, 11:38:17 PM

Title: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 04, 2013, 11:38:17 PM
Announcing two great new features that are being added to the app!  It will be great to have lots of testers with a variety of devices to help out!

I've merged both tests into a single APK, so you won't need to install them separately.  Here's a link to the APK:

Input Plugin Test (http://www.paulscode.com/source/Mupen64Plus-AE/05MAR2013/mupen64plus-ae.apk)

NOTE: If you've installed an earlier test, you will probably need to uninstall it to avoid a signature conflict.

The first thing we need to test is the brand-new input plug-in that littleguy wrote!  This bad-boy not only cuts out most of the excess code we aren't using from input-sdl, but it also has some awesome new features like Rumble Pak emulated with the vibrator, and pak-switching.

We need to run stress tests on a variety of devices to work out any remaining kinks.  I'll be spreading the word on various other sites, and it would be great if everyone here could give it a whirl and report the results.  And besides, Diddy Kong Racing is a lot more fun with rumble working  ;D

The second thing we need to test is the new system I'm working on for the touchscreen controls.  When you're done testing the input plug-in, please run some tests with the touchscreen controls as well.  The new system does some scaling and layout management based on the screen size in pixels and inches and orientation!

I need to have this tested on a variety of screen sizes to address any problems of incorrectly sized or overlapping buttons.  Please mention your device model (and screen resolution and size if you know)

For now I'm just looking for feedback on control sizes and in particular if there is any button overlap.  Please test in both landscape and portrait modes.  Also, there is a setting to make all buttons visible, in the Touchscreen layout settings.  Please test with it as well as the normal layout (in both landscape and portrait).  Screenshots to demonstrate problems are helpful if you can provide them.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: WinSuk on March 05, 2013, 02:06:28 AM
Aria in portrait has an overlapping dpad (http://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-04-23-37-13.png)
Nexus 7 in landscape is a little close, but not overlapping (http://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-04-23-44-35.png)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 05, 2013, 07:16:32 AM
You could merge the two branches for the test build, get twice the interest ;)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 05, 2013, 01:59:37 PM
You could merge the two branches for the test build, get twice the interest ;)

Great suggestion!  I updated the first post.  ;D

I also merged in the other thread (ended up accidentally deleting WinSuk's first reply, but the useful one is still here)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 05, 2013, 03:06:19 PM
Aria in portrait has an overlapping dpad

Nexus 7 in landscape is a little close, but not overlapping

Could you give this one a try?  I have a feeling that the change is too small to make any difference, but I just want to get a fee for how much I need to adjust the numbers to get the desired results:

Touch Controls Test #2 (http://www.paulscode.com/source/Mupen64Plus-AE/05MAR2013/mupen64plus-ae_2.apk)

(You'll need to uninstall the previous test first, or it won't install due to a signature conflict)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: WinSuk on March 05, 2013, 06:32:59 PM
Could you give this one a try?  I have a feeling that the change is too small to make any difference, but I just want to get a fee for how much I need to adjust the numbers to get the desired results:

Touch Controls Test #2 (http://www.paulscode.com/source/Mupen64Plus-AE/05MAR2013/mupen64plus-ae_2.apk)

(You'll need to uninstall the previous test first, or it won't install due to a signature conflict)

Still overlaps a little. http://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-05-16-18-09.png
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 05, 2013, 08:35:28 PM
Great, getting closer.  Give this one a try:

Touch Controls Test #3 (http://www.paulscode.com/source/Mupen64Plus-AE/05MAR2013/mupen64plus-ae_3.apk)

I'm back on my home computer, so you'll first have to uninstall the last test to avoid a signature conflict.  Sorry for the hassle!
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: WinSuk on March 05, 2013, 09:08:03 PM
No problem :)

No longer overlapping: https://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-05-18-49-41.png
Really close to Z though... guess there isn't much that can be done about that

Also tested the input plugin for awhile with my 360 controller. Rumble works and I didn't have any problems :)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 05, 2013, 10:34:17 PM
So as I mentioned on github, the new version shrinks the controls on my 7" 1280x800 tablet.

Old
http://dl.dropbox.com/u/3899306/Screenshot_2013-03-05-23-23-02.png
http://dl.dropbox.com/u/3899306/Screenshot_2013-03-05-23-22-12.png

New
http://dl.dropbox.com/u/3899306/Screenshot_2013-03-05-23-10-44.png
http://dl.dropbox.com/u/3899306/Screenshot_2013-03-05-23-11-50.png

My personal preference is also to keep exactly the same size in portrait or landscape.  I know you added a 1.5x scale in the code but that's not the exact ratio.  I say just make the scale with respect to the larger of (width, height) so they are the same physical size in either orientation.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 06, 2013, 01:01:39 AM
Aha, that's a good idea.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Tom.K on March 06, 2013, 01:47:39 PM
Crashes on my X10 Mini Pro when launching emulator. Report should've been sent thru app.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 06, 2013, 01:49:17 PM
Rgr, I'll take a look
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 06, 2013, 02:05:19 PM
For some reason it isn't sending the logcat output from your device with the reports, unfortunately.  That said, it looks to be failing when it tries to set the scale for one of the numeral images (which must mean that it failed to load one or more of them for some reason).  Could you try reloading the app resources, then running with and without the FPS indicator visible?

I'll upload another test shortly that should squash the crash when a digit is null (but it won't address whatever the underlying cause for the digit being null)

BTW, I like the value in android.os.Build.MANUFACTURER (http://developer.android.com/reference/android/os/Build.html#MANUFACTURER) for the X10 Mini Pro (especially since I work for Ericsson ;D)
Spoiler: Build.MANUFACTURER • show
Sh!tEricsson
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 06, 2013, 02:29:05 PM
Ok, this one should (hopefully) not crash.  If it does, I'll take a look at the crash report.  You'll have to uninstall the previous test, since it has a different digital signature

Numeral Crash Test #1 (http://www.paulscode.com/source/Mupen64Plus-AE/06MAR2013/mupen64plus-ae.apk)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Tom.K on March 06, 2013, 03:33:44 PM
For some reason it isn't sending the logcat output from your device with the reports, unfortunately.  That said, it looks to be failing when it tries to set the scale for one of the numeral images (which must mean that it failed to load one or more of them for some reason).  Could you try reloading the app resources, then running with and without the FPS indicator visible?

I'll upload another test shortly that should squash the crash when a digit is null (but it won't address whatever the underlying cause for the digit being null)

BTW, I like the value in android.os.Build.MANUFACTURER (http://developer.android.com/reference/android/os/Build.html#MANUFACTURER) for the X10 Mini Pro (especially since I work for Ericsson ;D)
Spoiler: Build.MANUFACTURER • show
Sh!tEricsson


Sorry about that,  it's Custom ROM GingerDX, developed by djnilse and eagleeyetom (< How ironic, that's not me.)
Luckily, I've saved this logcat when it did happen, if it helps: http://pastebin.com/B448xzSU

About further results and testing, you'll have to wait until weekend comes (or when I stop studying).
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 06, 2013, 03:43:12 PM
Nothing too out of the ordinary in the logcat.  Do you remember whether you had the fps indicator enabled or disabled for that test?
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Tom.K on March 07, 2013, 08:37:27 AM
FPS indicator was disabled by default. Even if enabled it didn't work.

After running Numeral Crash Test #1, emulation works, but gamepad is completely gone (not drawn on screen, tapping anywhere where are controls are supposed to be are not doing anything.)

Hardware keyboard mapping still works, though.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 07, 2013, 08:42:20 AM
Interesting.  I'll have to look at it some more to figure out what is going on, from a synchronization perspective.  I might need to post a verbose build to figure out where the resize calculations are breaking down.  I have a feeling that it somehow calculated a scale of 0 (that would make everything invisible).
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 08, 2013, 07:30:48 PM
Ok, next test (this one won't fix your problem, Tom.K - I haven't had a chance to look at it yet)

The button scaling is now based on the longest side (rather than scaling up from the shortest side in portrait).  This will make the controls a consistent size in both orientations.  However, I noticed the controls in portrait were actually a tad larger on my phone, so I'm worried about overlap being a bigger problem this way (it will depend on the aspect ratio though).  I moved the L and Z buttons up 2% to make room for the D-Pad on the "Both" layout.  Let me know how it looks in portrait mode on various devices:

Touch Controls Test #4 (http://www.paulscode.com/source/Mupen64Plus-AE/08MAR2013/mupen64plus-ae.apk)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: WinSuk on March 08, 2013, 08:32:42 PM
Ok, next test (this one won't fix your problem, Tom.K - I haven't had a chance to look at it yet)

The button scaling is now based on the longest side (rather than scaling up from the shortest side in portrait).  This will make the controls a consistent size in both orientations.  However, I noticed the controls in portrait were actually a tad larger on my phone, so I'm worried about overlap being a bigger problem this way (it will depend on the aspect ratio though).  I moved the L and Z buttons up 2% to make room for the D-Pad on the "Both" layout.  Let me know how it looks in portrait mode on various devices:

Touch Controls Test #4 (http://www.paulscode.com/source/Mupen64Plus-AE/08MAR2013/mupen64plus-ae.apk)

Looking good here :) (Aria)
http://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-08-18-16-14.png

(I'm assuming screenshots of my other 2 devices aren't needed as their screens are pretty common and it looks fine. Let me know if you still want them)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: xperia64 on March 08, 2013, 08:45:41 PM
Works perfect on my s2
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 08, 2013, 09:02:13 PM
Hey, I just updated the test (same link above) with a change in the SDL header that could potentially have a fairly wide-reaching impact on the app (or maybe not - need to test).  If everyone has a chance, please try out a few games to see if compatibility or speed is affected in any way by this change.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: WinSuk on March 09, 2013, 07:40:30 PM
Hey, I just updated the test (same link above) with a change in the SDL header that could potentially have a fairly wide-reaching impact on the app (or maybe not - need to test).  If everyone has a chance, please try out a few games to see if compatibility or speed is affected in any way by this change.

I don't notice anything different/better... I don't have that many games to test with though.

And I've found a bug with joystick animation enabled:
It starts out centered, but once it's moved it resets to center wrong (and in different places on each device)
https://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-09-17-23-41.png
https://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-09-17-24-46.png
https://dl.dropbox.com/u/1077120/mupentesting/Screenshot_2013-03-09-17-36-26.png
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: xperia64 on March 09, 2013, 08:02:49 PM
Changing touchscreen control size seems to be broken (at least from normal to small) And the buttons are a little bit close to my capacitive home/back/menu/search buttons at the bottom
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 09, 2013, 08:47:14 PM
Touchscreen controls size option will be removed (size will be based on the device rather than selected).
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 17, 2013, 02:36:07 PM
FPS indicator was disabled by default. Even if enabled it didn't work.

After running Numeral Crash Test #1, emulation works, but gamepad is completely gone (not drawn on screen, tapping anywhere where are controls are supposed to be are not doing anything.)

Hardware keyboard mapping still works, though.

Sorry for the delay.  I finally got around to writing the verbose test.  Please uninstall the previous test before installing this one (to make sure the current resources get loaded).  Just start a game so it loads the touch map, then grab the logcat and either post it here or email it to me.

Verbose Test (http://www.paulscode.com/source/Mupen64Plus-AE/17MAR2013/mupen64plus-ae.apk)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Tom.K on March 17, 2013, 04:42:44 PM
Looks like I was actually wrong a bit. Gamepad touchscreen is drawn, but only on Normal and Tablet (and ridiciously shrunk): http://i.imgur.com/NvCzZHP.png
This is a screenshot of gamepad when it's on Normal in that version. Usually, buttons on Normal on my phone would fill all over my screen.

Small and Tiny layouts can't be seen on screen still. I guess that you only need to re-align them to fit as usual to QVGA.

If it helps, here is the logcat, but not sure is it useful at all, can't clean it up at the moment: http://pastebin.com/v9uFLs7a
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 17, 2013, 06:05:59 PM
That is the intended behavior.  There won't be "tiny" and "small" layouts any more - just one size that rescales to fit the screen dimensions.  Obviously it makes it hard to play on tiny screens, but I've had as many people complain about the buttons filling up the entire screen (so can't please everyone - better to standardize and leave customization as an option).

If you need help writing a custom layout that fits your needs better, let me know.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 17, 2013, 06:11:20 PM
I'm going to add a scaling factor preference (slide bar I think, like the speed selector), which will let folks scale up or down to a certain degree.  Maybe have the best of both worlds.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 17, 2013, 06:13:18 PM
Yeah, I think that would be wise.  I'm afraid without something like that, people are going to be pissed for taking something away for no apparent reason.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 17, 2013, 08:14:09 PM
Here is a test with the scaling factor option (in the Touchscreen preferences section).  It lets you go from half the calculated scale to double with a granularity of 1%.  Should give a nice range of possible scales:

Touchscreen Scaling Factor Test (http://www.paulscode.com/source/Mupen64Plus-AE/17MAR2013/mupen64plus-ae_w.apk)
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 17, 2013, 09:06:10 PM
I just built directly from the source, and it works great on my xperia play.  Nice!

However, nothing is showing up on my Nexus 7 (touching doesn't do anything either).  Perhaps the 0% scale issue.  I'll dig into it some more and throw in some logging to see what's going on and get back to you.  Let me know if the code in github isn't up to date with the APK you just posted here.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 17, 2013, 09:40:31 PM
Ok, I completely reinstalled the app on my Nexus7 and now my controls are visible and usable.  Must be something related to the user preference files, not the assets, because I did load the assets fresh before.  So we'll have to check out what's going on there.

I've seen this kind of thing before with the preference files and it usually has to do with the stored value in a preference no longer being valid.  Like if the input plugin was 'input-sdl' and the new version replaces input-sdl with 'input-android'.  There's already some safety net code (https://github.com/paulscode/mupen64plus-ae/commit/61483f8427539499f8e4b541bfd4d92d222eeccb) to handle that kind of thing for list preferences, so it must have something to do with another kind of preference.

Edit: scratch that, the safety net must be applied manually in MenuActivity (doesn't apply automatically to all ListPreferences).  I did switch the layout a few times, though, so I would have fixed the stale preference if the problem related to the Layout option.  Head scratcher...
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 17, 2013, 10:05:47 PM
It could be related to the size option.  I'll do some tests to see if I can reproduce it when upgrading from a different version.  Will probably just take adding some sanity checks into the code that decides which layout to use based on the various preferences, size, and orientation.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 17, 2013, 10:30:08 PM
Sounds good.

On a side note, setting the scale to 150% made the old and new touchscreen skins identical to within a pixel or two on my Nexus 7.  Seems like a pretty round number, so I don't know if it's a coincidence or what.  Anyhow, if folks complain that their controls shrunk, 150% might be a good starting suggestion.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 18, 2013, 12:16:17 PM
I made some auto-hold overlays for the stock skins.  Need to test them on some other devices this evening, but if you are fine with the auto-hold ini format, I can post them tonight.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: Paul on March 18, 2013, 12:59:36 PM
Sure, that will be good.  I forgot about auto-hold entirely actually - need to make sure the scaling part is working for it as well.  The last bug left to fix besides that is the analog stick image position when it is released (it's not correctly taking scale into account).  After that should be able to have some folks test to verify it is working, then ready to publish.
Title: Re: Testers needed! (input plug-in, touchscreen controls)
Post by: littleguy on March 18, 2013, 01:02:07 PM
Cool, will do.  The auto-hold images were indeed correctly scaled.  It even worked with a custom skin that Gilles had created for testing auto-hold.  It Just Worked. :)

I tried all the tablet layouts and just need to test the phone layouts this evening to confirm I don't have any typos/bugs.