In a nutshell, what's not working actually ?

A project to port LÖVE to Android handhelds
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: In a nutshell, what's not working actually ?

Post by T-Bone »

So... Is love-native-android dead, or is it just a summer break? :crazy:
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: In a nutshell, what's not working actually ?

Post by Moe »

It's just summer break. I think we need to arrange another Löve-Hacking-Day, that's always ending with some cool new things.
Today, I also discovered, that this project will need the upcoming domain android.love ;)
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: In a nutshell, what's not working actually ?

Post by T-Bone »

Come on guys :neko: I've started the development of my game again, I need multitouch!
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: In a nutshell, what's not working actually ?

Post by Moe »

I am sorry, we did not expect anymore that there will be one sunny and warm weekend this year...

What kind of multi-touch do you need? Only n input events? That should be a quick thing to add.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: In a nutshell, what's not working actually ?

Post by T-Bone »

Moe wrote:I am sorry, we did not expect anymore that there will be one sunny and warm weekend this year...

What kind of multi-touch do you need? Only n input events? That should be a quick thing to add.
That would be great. I really only need dual-touch for my game, but allowing an unlimited amount of touch points would make sense. A callback function similar to love.mousepressed and love.mousereleased, as well as something like love.mouse.isDown, would allow all sorts of functionality. It could look something like this:

Code: Select all

love.multitouchpressed(x1,y1,x2,y2) --I'm only interested in the first two fingers
	if x1 and y1 then
		print("First finger pressed at x="..x1..", y="..y1)
	end
	if x2 and y2 then
		print("Second finger pressed at x="..x2..", y="..y2)
	end
end

love.multitouchreleased(x1,y1,x2,y2) 
	--the same basically
end

function love.update(dt)
	local x1,y1 = love.multitouch.isDown(1) --both are nil if no first finger is pressed
	local x2,y2 = love.multitouch.isDown(2)
	if x1 and y1 then
		print("First finger: x="..x1..", y="..y1)
	end
	if x2 and y2 then
		print("Second finger: x="..x2..", y="..y2)
	end
end
zapaman
Prole
Posts: 13
Joined: Sat Aug 25, 2012 5:54 pm
Location: Romania | Bucharest
Contact:

Re: In a nutshell, what's not working actually ?

Post by zapaman »

Any way to pack to .love file with the apk and run it on start?
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: In a nutshell, what's not working actually ?

Post by T-Bone »

zapaman wrote:Any way to pack to .love file with the apk and run it on start?
Yes, if you compile it yourself. Just include it in the Android package, and modify like two lines in the Java code. If I remember correctly, the code is already there, but commented. I can't quite remember where in the project you should put the .love file though...

This also allows you to change other stuff, for example forcing landscape orientation, which you can do in the Android Manifest for the app.
zapaman
Prole
Posts: 13
Joined: Sat Aug 25, 2012 5:54 pm
Location: Romania | Bucharest
Contact:

Re: In a nutshell, what's not working actually ?

Post by zapaman »

From what I read, I have to put the .love file in assets folder and access it like this "file:///android_assets/filename.love"! Now, I changed all the variables that point to a file on the sd card with "file:///android_assets/filename.love" and even changed

Code: Select all

LoveJNI.init(width, height, /*loveFile*/"file:///android_asset/game.love");
. I saw that when pressing the "Start No-Game Screen", it access "Launch default view". From there, the LoveNative class is initialised, which calls

Code: Select all

        LoveJNI.setActivity(this);
        mGLView = new LoveRenderView(this,"file:///android_asset/game.love");
        setContentView(mGLView);
When I press the "Start No-Game Screen" button, love acts like no file has been passed as an argument!
f I remember correctly, the code is already there,
There was a bit of code that was checking if "IYFCT" was on the SD card, but nothing reffering to the asset folder. Just to be sure, I changed the path to the yer-overused "file//etc" thingy. Still, to no avail.

Any ideas?

Edit: Where does the "file" argument get passed to the engine?
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: In a nutshell, what's not working actually ?

Post by Moe »

T-Bone wrote:
Moe wrote:I am sorry, we did not expect anymore that there will be one sunny and warm weekend this year...

What kind of multi-touch do you need? Only n input events? That should be a quick thing to add.
That would be great. I really only need dual-touch for my game, but allowing an unlimited amount of touch points would make sense. A callback function similar to love.mousepressed and love.mousereleased, as well as something like love.mouse.isDown, would allow all sorts of functionality.
Implemented. Well, you cannot poll the status yet. See API thread for details, but it is more awesome than you suggested, you get all fingers. :cool:
I replaced the apk with the new version. :joker:

I did only quick testing, might still be buggy - for example the index of the "causing finger ID" seems not to work on my device.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: In a nutshell, what's not working actually ?

Post by T-Bone »

Moe wrote:
T-Bone wrote:
Moe wrote:I am sorry, we did not expect anymore that there will be one sunny and warm weekend this year...

What kind of multi-touch do you need? Only n input events? That should be a quick thing to add.
That would be great. I really only need dual-touch for my game, but allowing an unlimited amount of touch points would make sense. A callback function similar to love.mousepressed and love.mousereleased, as well as something like love.mouse.isDown, would allow all sorts of functionality.
Implemented. Well, you cannot poll the status yet. See API thread for details, but it is more awesome than you suggested, you get all fingers. :cool:
I replaced the apk with the new version. :joker:

I did only quick testing, might still be buggy - for example the index of the "causing finger ID" seems not to work on my device.
This is awesome! WIll test it as soon as I have time.

With this, love-native-android has taken a large step closer to actually being usable for real Android games. All we need now is some stability (being able to leave the app and come back), as well as love.filesystem.

Keep up the awesome work! :neko:
Locked

Who is online

Users browsing this forum: No registered users and 1 guest