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 »

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: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

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

Post by Positive07 »

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/pablomayobre)
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 »

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 »

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 »

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 »

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: 3129
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime »

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 »

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 »

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: 3129
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime »

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: No registered users and 5 guests