Page 1 of 2
Does Love2D support SSL/https requests?
Posted: Fri Sep 06, 2024 6:28 pm
by Gunroar:Cannon()
I wanted to do a mini-project for my CS class, and was finally doing a dreamlo (online scoreboard) implementation and successfully integrated it until I found out that Android 10 above (android being the target for my project) doesn't support opening http (non-secured?) sites.
And dreamlo uses http. So I want to find another online scoreboard API that can add and remove scores, but for now...
I heard a while back that SSL isn't supported on love2D, but I think I saw somewhere on the forums that that problem was fixed. Is this the case?
Re: Does Love2D support SSL/https requests?
Posted: Fri Sep 06, 2024 7:48 pm
by SiENcE
Hey!
You could do it in a very unusual but simple way.
When the game is over and you have the score, open a web link with “love.system.openURL”
I use this when an error occurs. I open a Love2D window and ask if the error message should be sent, and if so, the browser is opened with “love.system.openURL”.
This sends the data to
Google Forms
You can call up any URL, for example a rest service somewhere on the web. Encode your data (score + name) in the URL.
Here is my error form url example:
Code: Select all
https://docs.google.com/forms/d/e/{FORM_ID}/viewform?usp=pp_url&entry.1231186349='.. os.date('%Y-%m-%d_%H-%M-%S', os.time()) .. '&entry.192709716='.. errormessage .. '&entry.2144508734=' .. base64message
The cool thing is that Google Forms puts all this into a spreadsheet and sends you an email when someone submits a new bug. You can also connect other Google services to the analysis.
You don't have to deal with SSL/updates/certificates aso.
But there are many other free Rest DB services out there!
Hope this helps.
Cheers
Re: Does Love2D support SSL/https requests?
Posted: Fri Sep 06, 2024 7:55 pm
by slime
love 12 provides
lua-https. love 11 doesn't provide it itself but you can get or make a standalone build of it.
Re: Does Love2D support SSL/https requests?
Posted: Sat Sep 07, 2024 1:12 am
by togFox
I had the same experience as yourself 6 months ago:
https://www.love2d.org/forums/viewtopic.php?p=257794
Re: Does Love2D support SSL/https requests?
Posted: Sat Sep 07, 2024 10:33 am
by Gunroar:Cannon()
(Please note, for anyone looking, Lootlocker is a good alternative for https score keeper to dreamlo, though more complicated)
SiENcE wrote: ↑Fri Sep 06, 2024 7:48 pm
Hey!
You could do it in a very unusual but simple way.
When the game is over and you have the score, open a web link with “love.system.openURL”
I use this when an error occurs. I open a Love2D window and ask if the error message should be sent, and if so, the browser is opened with “love.system.openURL”.
This sends the data to
Google Forms
You can call up any URL, for example a rest service somewhere on the web. Encode your data (score + name) in the URL.
Here is my error form url example:
Code: Select all
https://docs.google.com/forms/d/e/{FORM_ID}/viewform?usp=pp_url&entry.1231186349='.. os.date('%Y-%m-%d_%H-%M-%S', os.time()) .. '&entry.192709716='.. errormessage .. '&entry.2144508734=' .. base64message
The cool thing is that Google Forms puts all this into a spreadsheet and sends you an email when someone submits a new bug. You can also connect other Google services to the analysis.
You don't have to deal with SSL/updates/certificates aso.
But there are many other free Rest DB services out there!
Hope this helps.
Cheers
Ha, that's a cool workaround. but I need the score to be able to change in game, and I also need json data for multiple scores to display the leaderboard in game.
slime wrote: ↑Fri Sep 06, 2024 7:55 pm
love 12 provides
lua-https. love 11 doesn't provide it itself but you can get or make a standalone build of it.
Ooh, that's nice. But it's not out yet, no?
The link is bad.
Re: Does Love2D support SSL/https requests?
Posted: Sat Sep 07, 2024 12:00 pm
by SiENcE
Gunroar:Cannon() wrote: ↑Sat Sep 07, 2024 10:33 am
Ha, that's a cool workaround. but I need the score to be able to change in game, and I also need json data for multiple scores to display the leaderboard in game.
Ha, yeah, it's better suited for bugreports.
Re: Does Love2D support SSL/https requests?
Posted: Sat Sep 07, 2024 1:38 pm
by slime
Gunroar:Cannon() wrote: ↑Sat Sep 07, 2024 10:33 am
slime wrote: ↑Fri Sep 06, 2024 7:55 pm
love 12 provides
lua-https. love 11 doesn't provide it itself but you can get or make a standalone build of it.
Ooh, that's nice. But it's not out yet, no?
You can grab a nightly build of love 12, or download or build the standalone lua-https library if you want to use love 11 with it.
Re: Does Love2D support SSL/https requests?
Posted: Sat Sep 07, 2024 1:42 pm
by zorg
Re: Does Love2D support SSL/https requests?
Posted: Sat Sep 07, 2024 2:30 pm
by Gunroar:Cannon()
Maybe I'll make a seperate topic for this later but also, on a side note, does anyone know if it's possible to compile projects online, using something like
TravisCI?
slime wrote: ↑Sat Sep 07, 2024 1:38 pm
You can grab a nightly build of love 12, or download or build the standalone lua-https library if you want to use love 11 with it.
Thank you, I was about to ask where to get a nightly build for android, but then I also saw something you said on Reddit (and also togFox's/zorg's link) and getting an apk from here should do it right?
https://github.com/love2d/love/actions/runs/10632564293
Re: Does Love2D support SSL/https requests?
Posted: Wed Sep 11, 2024 10:50 am
by Gunroar:Cannon()
Can someone please help me get the download link for the android versions. The artifacts link doesn't click no matter which browser I use.