Launching .love from dropbox on Android

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Launching .love from dropbox on Android

Post by tahoma »

Hi there,

I'm unable to launch a game on an android device.
[url = https://love2d.org/wiki/Getting_Started]This page[/url] suggests that you can simply load .love archive to a dropbox and, as long as you have LOVE for Android, you are good to go.

I get 'module 'main' not found' error. It is however right in the archive (not in a folder with the archive) and I can launch this .love on my desktop (well, laptop, but you get the idea), so it's not the you-need-to-archive-your-files-not-the-folder kind of situation.

Sorry if this question has been asked a zillion times, but I could not find anything specific enough for this approach to launch love games on android and would really love it to work, since it does seem like the most effortless one out there.

I'd greatly appreciate any help.
Thanks!
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Launching .love from dropbox on Android

Post by tahoma »

So, I figured out the issue. Stupidly, I tried to use a 7z archive instead of a zip one.

Unfortunately, Android lua is 10.2, so some of the commands are not quite compatible, and it would be an easy fix for me if not for the change in color scheme from 0-255 to 0-1 :)
While I'm changing my colors, does anyone have an idea when love2d for android might get updated to 11+?
Darlex
Party member
Posts: 128
Joined: Sun Sep 24, 2017 10:02 am
Location: Chile
Contact:

Re: Launching .love from dropbox on Android

Post by Darlex »

You can download the 11.1 version
https://bitbucket.org/rude/love/downloa ... ndroid.apk

And for the color thing...
You can do this:

Code: Select all

function rgb(r,g,b)
	return r/255,g/255,b/255
end
or use this code for HEX:

Code: Select all

function hex(hex)
    hex = hex:gsub("#","")
    return tonumber("0x"..hex:sub(1,2))/255, tonumber("0x"..hex:sub(3,4))/255, tonumber("0x"..hex:sub(5,6))/255
end
from https://gist.github.com/jasonbradley/4357406
Hi! I wish you have an amazing day!
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Launching .love from dropbox on Android

Post by tahoma »

Thanks for the apk!

I'm somewhat confused about the color thing. What exactly are you suggesting? (It's not like it matters now when I can use lua 11+ on my android, and therefore don't have to bother switching color scheme from 0-1 to 0-255 every time I transfer my code from laptop to smartphone).
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Launching .love from dropbox on Android

Post by tahoma »

Actually, the apk didn't quite work out for ms, as it gives me an odd "unsupported scheme 'content'" error. 0_o I rolled it back to the 10.2 version for now.
Darlex
Party member
Posts: 128
Joined: Sun Sep 24, 2017 10:02 am
Location: Chile
Contact:

Re: Launching .love from dropbox on Android

Post by Darlex »

tahoma wrote: Sat Apr 27, 2019 11:25 pm Actually, the apk didn't quite work out for ms, as it gives me an odd "unsupported scheme 'content'" error. 0_o I rolled it back to the 10.2 version for now.
Hmm, that's weird! You should report the error.
And for the color thing.
I suggested a function that translates the rgb colors (25,118,210) to float colors (0.09803921568, 0.46274509803, 0.82352941176)

OLD:

Code: Select all

love.graphics.setColor(25,118,210)
love.graphics.draw(reallycoolimagewithalongname,100,500)
OLD NEW:

Code: Select all

love.graphics.setColor(0.09803921568, 0.46274509803, 0.82352941176)
love.graphics.draw(reallycoolimagewithalongname,100,500)
NEW NEW:

Code: Select all

love.graphics.setColor(rgb(25,118,210))
love.graphics.draw(reallycoolimagewithalongname,100,500)
(So in that way you dont need to add a "/255" or dividing it by yourself in a calculator)

Edit:
Does https://bitbucket.org/rude/love/downloa ... ndroid.apk work for you?
Hi! I wish you have an amazing day!
tahoma
Prole
Posts: 22
Joined: Mon Apr 22, 2019 1:13 am

Re: Launching .love from dropbox on Android

Post by tahoma »

Oh, got it. Yes, it could be convenient (among other things, for switching back and forth between 10.2 and 11.2 by changing the denominator from 255 to 1 and back).

The error message I get is
"Could not load LOVE game '/filecache/...' as it uses unsupported scheme 'content'. Please contact the developer"

I'll create a separate thread for this.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 79 guests