love-android-sdl2 (native, 0.9.2)

A project to port LÖVE to Android handhelds
Locked
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post 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 ?
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

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

Post 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
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

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

Post by Davidobot »

Ranguna259 wrote: What do you guys get ?
I understand how it works.
It displays numbers only when you move your phone, apparently.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post 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)
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes »

Is it not based on movement, rather than angle? If not, does it just have a different origin and/or scale?
User avatar
fysx
Citizen
Posts: 97
Joined: Mon Jan 30, 2012 8:36 pm
Contact:

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

Post by fysx »

Jairo Luiz has a very good idea at https://bitbucket.org/MartinFelis/love- ... elerometer. I hope it works out.
Bird thing: @fysxdotorg Blog thing: fysx.org
User avatar
fysx
Citizen
Posts: 97
Joined: Mon Jan 30, 2012 8:36 pm
Contact:

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

Post 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.
Bird thing: @fysxdotorg Blog thing: fysx.org
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

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

Post by jjmafiae »

Does all android phones support shaders?
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime »

All Android (and iOS) devices which can run LÖVE do support shaders and canvases, yeah.
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

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

Post by jjmafiae »

YES! thanks slime, you are awesome!
Locked

Who is online

Users browsing this forum: No registered users and 3 guests