love-android-sdl2 (native, 0.9.2)

A project to port LÖVE to Android handhelds
Locked
Muris
Party member
Posts: 131
Joined: Fri May 23, 2014 9:18 am

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

Post by Muris » Sat Feb 07, 2015 1:48 pm

I was wondering what would be the best way to use google play services? Lets say for example I would want to use multiplayer games from google play store, would it even be possible? I suppose I would need to somehow make some call throughs from java to lua, would this be hard to do, assuming I ever even get the java side working for using achievements or whatever I desire to use from the google play api?

I have been thinking about using this, but I am still not sure how easy it would be to implement multiplayer, not to mention how easy the api is to work with: https://developers.google.com/games/ser ... ultiplayer

User avatar
Positive07
Party member
Posts: 999
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

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

Post by Positive07 » Sat Feb 07, 2015 7:06 pm

If I was in your place I would use the C++ backend of google play services, it's the same but in C++ and you can make it compile with the NDK. From there it should be pretty straight forward and you could even compile LÖVE AND LÖVE for Android with it... Just saying
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(Github.com/Positive07)

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 Feb 10, 2015 10:19 pm

Mermersk wrote: But what is love.o ? And how can this be fixed? What is armeabi? Remember installing it when I was selecting Android SDK plugins or something.
Try to run

Code: Select all

ndk-build clean
and then

Code: Select all

ndk-build
again.

This allows you remove old binary files.
Bird thing: @fysxdotorg Blog thing: fysx.org

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 » Sat Feb 21, 2015 11:02 pm

I'm trying to code shaders but it doesn't work, love crashes whenever I try to load code with for loops:

Code: Select all

C5013: profile does not support "for" stantements and "for" could not be unrolled.
I've tried:

Code: Select all

#pragma target 3.0
But it keeps on crashing.

Try it out with this bloom shader:

Code: Select all

#pragma target 3.0
extern vec2 size;
extern float samples;// = 5.0; // pixels per axis; higher = bigger glow, worse performance
extern float quality;// = 2.5; // lower = smaller glow, better quality
 
vec4 effect(vec4 colour, Image tex, vec2 tc, vec2 sc)
{
	vec4 source = Texel(tex, tc);
	vec4 sum = vec4(0.0);
	float diff = (samples - 1.0) / 2.0;
	vec2 sizeFactor = vec2(1.0) / size * quality;
	for (float x = -diff; x <= diff; x++)
	{
		for (float y = -diff; y <= diff; y++)
		{
			vec2 offset = vec2(x, y) * sizeFactor;
			sum += Texel(tex, tc + offset);
		}
	}
	return ((sum / (samples * samples)) + source) * colour;
} 
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
fysx
Citizen
Posts: 97
Joined: Mon Jan 30, 2012 8:36 pm
Contact:

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

Post by fysx » Wed Feb 25, 2015 1:20 pm

for loops must have a constant number of iterations on OpenGL ES on mobile. You unfortunately define the lengths using a uniform :( . See also http://stackoverflow.com/questions/1892 ... form-varia
Bird thing: @fysxdotorg Blog thing: fysx.org

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 » Thu Mar 12, 2015 11:15 am

How do I get the DPI type: ldpi, mdpi, hdpi...?
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
slime
Solid Snayke
Posts: 2763
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime » Thu Mar 12, 2015 4:40 pm

love.window.getPixelScale (or use [wiki]love.window.fromPixels[/wiki] and [wiki]love.window.toPixels[/wiki] to convert between pixels and Android's concept of density-independent pixels, i.e. use the dpi scale.)

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 » Thu Mar 12, 2015 6:15 pm

Thanks, I've searched I bit more for dpi scale factor and found how to convert the scale factor to qualifiers, link.
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
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

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

Post by TurtleP » Wed Apr 01, 2015 1:55 am

I've been wondering: why does setTextInput's keyboard translate the game's graphics upward? Is this just me, or does it happen to everyone else?

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

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

Post by slime » Wed Apr 01, 2015 2:52 am

setTextInput adjusts the game's window in order to display the on-screen keyboard while keeping the text that's written on-screen as well.

You can inform the system about where your text will display by using the optional x,y,w,h parameters of setTextInput (available in the Android and iOS versions of LÖVE.) They should be set to the location and size of where your text will be showing up on-screen.

Locked

Who is online

Users browsing this forum: Google [Bot] and 1 guest