Page 20 of 33

Re: love-android-sdl2 (native, 0.9.0)

Posted: Sat Apr 05, 2014 2:15 pm
by Sind
Apparently it's caused by delays causing the number of touches to change while in the loop.

so, something like this would cause the error easily, if you are tapping several places repeatedly:

Code: Select all

function love.update(dt)
	for i = 1,love.touch.getTouchCount() do
		id, x, y, pressure = love.touch.getTouch(i)
		sleep(.1) -- wait a tenth of a second
	end
end

local clock = os.clock
function sleep(n) 
  local t0 = clock()
  while clock() - t0 <= n do end
end
Of course, the code I used didn't take even close to that much time, but apparently it was enough to cause this to happen sometimes.

Re: love-android-sdl2 (native, 0.9.0)

Posted: Sun Apr 06, 2014 5:40 pm
by fysx
Thanks for the script! I can now reproduce the problem. Also I have created an issue here: https://bitbucket.org/MartinFelis/love- ... ouch-index. Feel free to watch it to get first-hand updates on it.

Re: love-android-sdl2 (native, 0.9.0)

Posted: Thu May 01, 2014 12:29 am
by Foxcraft
Thank you for the port. I've just started working with it.

This helped me set up the SDK and things on my Ubuntu-based distro: http://askubuntu.com/questions/375128/a ... 13-10?rq=1
clofresh wrote:Yay, I'm so glad this is moving forward! I've tested it with my puzzle fighter clone on the ouya and it works great! Had to explicitly define the ouya controller though since the gamepad api wasn't pick it up.
That is very good to hear. I am very interested in making a game on OUYA. Could you point me in the right direction for explicitly defining controllers?

Also, I was wondering if after sideloading on the OUYA, if it shows up under Make>Software? Sideloaded apps are supposed to show up there, but my test with love-android-sdl2 did not. Currently, to test, I must install/reinstall the apk and choose the Open option in the dialog that appears afterward. Can't run it any other way. I was wondering if that was happening to others? I'm using the 0.9.1 RC1 version though.

Re: love-android-sdl2 (native, 0.9.0)

Posted: Thu May 01, 2014 4:00 am
by bobbyjones
It shows up under play. I think the manifest file has something in it so it could show in the launcher.

Re: love-android-sdl2 (native, 0.9.0)

Posted: Thu May 01, 2014 1:52 pm
by Tanner
Foxcraft wrote:That is very good to hear. I am very interested in making a game on OUYA. Could you point me in the right direction for explicitly defining controllers?
josefnpat has a great resource in the dong2 lib: https://github.com/josefnpat/dong2/blob ... ndroid.lua

The buttons on the OUYA aren't 1 to 1 with the Xbox controller so it will require a little imagination but here's an example of me using love.joystick.setGamepadMapping to work with the OUYA controller: https://github.com/TannerRogalsky/Frien ... me.lua#L10

Re: love-android-sdl2 (native, 0.9.0)

Posted: Fri May 02, 2014 12:53 am
by Foxcraft
Thank you very much! I finally found it under Play (last in my long list) and it works fine from there. And those links are really helpful.

I just thought to ask about saving. Where does love-android-sdl2 setup the save directory on Android devices? Also, is that left alone when the apk is uninstalled?

Re: love-android-sdl2 (native, 0.9.0)

Posted: Sat May 03, 2014 10:14 am
by fysx
Foxcraft wrote:I just thought to ask about saving. Where does love-android-sdl2 setup the save directory on Android devices? Also, is that left alone when the apk is uninstalled?
At the moment everything is saved in the internal storage which also gets cleared once the app is removed. There should be nothing left on the device if it was uninstalled. I do plan to add an option that lets you save to the external storage however haven't gotten to it yet (see https://bitbucket.org/MartinFelis/love- ... ether-save).

Re: love-android-sdl2 (native, 0.9.0)

Posted: Sat May 03, 2014 8:02 pm
by piernov
Hey, if someone is interested, I made an attempt to bind Android NSD to love-android-sdl2.
But since I'm not a good programmer (never done anything in Java, poor experience in C) it must be very dirty.
Some might still be interested : https://bitbucket.org/piernov/love-andr ... ndroid-nsd

Sadly we are affected by Android's issue 55913 : https://code.google.com/p/android/issue ... l?id=55913 . It's workarounded using str:gsub(gsub("\\032", " ")) for spaces.

Here is an example, look at what's inside `if love.system.getOS() == "Android"` : http://git.piernov.org/Mastermind/tree/ ... 4b2e75f2e0

PS: Would love a Bonjour binding if someone has this…

Re: love-android-sdl2 (native, 0.9.0)

Posted: Sun May 04, 2014 2:16 pm
by Foxcraft
fysx wrote:
Foxcraft wrote:I just thought to ask about saving. Where does love-android-sdl2 setup the save directory on Android devices? Also, is that left alone when the apk is uninstalled?
At the moment everything is saved in the internal storage which also gets cleared once the app is removed. There should be nothing left on the device if it was uninstalled. I do plan to add an option that lets you save to the external storage however haven't gotten to it yet (see https://bitbucket.org/MartinFelis/love- ... ether-save).
Thank you for your answer. I suppose that the external storage is what I am wanting then. I look forward to when the option is implemented.

piernov wrote:Hey, if someone is interested, I made an attempt to bind Android NSD to love-android-sdl2.
But since I'm not a good programmer (never done anything in Java, poor experience in C) it must be very dirty.
That is very cool, piernov. I also find it motivating for some attempts at the code I've been thinking of making. Thanks!

Re: love-android-sdl2 (native, 0.9.0)

Posted: Mon May 12, 2014 8:51 pm
by fysx
piernov wrote:Hey, if someone is interested, I made an attempt to bind Android NSD to love-android-sdl2...
Hi piernov. I have no idea what NSD actually is but from a quick glance it seems to be something really awesome. Can you mabe create a new post where you give a bit more details what it is and what one can do with it? I fear this is too cool to get lost in a long thread such as this.