Page 5 of 33

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

Posted: Sun Jan 19, 2014 7:03 pm
by Ranguna259
Can someone test this out on their own Android phones:

Code: Select all

function love.load()
	android=love.joystick.getJoysticks()[1]
end
	
function love.draw()
	love.graphics.print(android:getName(), 10, 10)
	for i,v in ipairs({android:getAxes()}) do
		love.graphics.print(i..': '..v,10,20 *i + 10)
	end
	
	love.graphics.print('Number of Buttons: '..android:getButtonCount(),100,100)
	love.graphics.print('Number of Axis: '..android:getAxisCount(),100,120)
	love.graphics.print('Number of Hats: '..android:getHatCount(),100,140)
	love.graphics.print('Supports Vibration: '..tostring(android:isVibrationSupported()),100,160)
end
1,2,3 Axis should be x,y,z the problem is that I get 0 on all of them exept 1, 1 flickers a lot between 0 and a random number.
What do you guys get ?

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

Posted: Mon Jan 20, 2014 1:51 am
by master both
Ranguna259 wrote:Can someone test this out on their own Android phones.
Strangely, I get the same results.

EDIT: classic copter game!
http://imgur.com/Wg0Zxdn

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

Posted: Mon Jan 20, 2014 4:45 pm
by Davidobot
Ranguna259 wrote: What do you guys get ?
I understand how it works.
It displays numbers only when you move your phone, apparently.

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

Posted: Mon Jan 20, 2014 7:03 pm
by Ranguna259
It should work like that but it isn't, I mean (0,0,0) is clearly not the current angle of my phone, the angle should be the same shown in the "Service tests"->"Accelerometer".

When my phone is on portrait and it's standing up then the coords are (0,10,0) but the SDL's Axis output is (0,0,0)

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

Posted: Mon Jan 20, 2014 9:06 pm
by bartbes
Is it not based on movement, rather than angle? If not, does it just have a different origin and/or scale?

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

Posted: Mon Jan 20, 2014 10:23 pm
by fysx
Jairo Luiz has a very good idea at https://bitbucket.org/MartinFelis/love- ... elerometer. I hope it works out.

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

Posted: Tue Jan 21, 2014 2:01 pm
by fysx
Just wanted to note that alpha7 was released yesterday. You find the download and a changelog in the first post of this thread.

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

Posted: Tue Jan 21, 2014 7:30 pm
by jjmafiae
Does all android phones support shaders?

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

Posted: Tue Jan 21, 2014 7:33 pm
by slime
All Android (and iOS) devices which can run LÖVE do support shaders and canvases, yeah.

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

Posted: Tue Jan 21, 2014 7:44 pm
by jjmafiae
YES! thanks slime, you are awesome!