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 » Sun Jan 19, 2014 7:03 pm

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: 255
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

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

Post by master both » Mon Jan 20, 2014 1:51 am

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: 1148
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

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

Post by Davidobot » Mon Jan 20, 2014 4:45 pm

Ranguna259 wrote: What do you guys get ?
I understand how it works.
It displays numbers only when you move your phone, apparently.
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

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 » Mon Jan 20, 2014 7:03 pm

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: 4944
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes » Mon Jan 20, 2014 9:06 pm

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 » Mon Jan 20, 2014 10:23 pm

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 » Tue Jan 21, 2014 2:01 pm

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: 1333
Joined: Tue Jul 24, 2012 8:22 am

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

Post by jjmafiae » Tue Jan 21, 2014 7:30 pm

Does all android phones support shaders?

User avatar
slime
Solid Snayke
Posts: 2832
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime » Tue Jan 21, 2014 7:33 pm

All Android (and iOS) devices which can run LÖVE do support shaders and canvases, yeah.

jjmafiae
Party member
Posts: 1333
Joined: Tue Jul 24, 2012 8:22 am

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

Post by jjmafiae » Tue Jan 21, 2014 7:44 pm

YES! thanks slime, you are awesome!

Locked

Who is online

Users browsing this forum: No registered users and 3 guests