Does Love2D support SSL/https requests?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Gunroar:Cannon()
Party member
Posts: 1141
Joined: Thu Dec 10, 2020 1:57 am

Does Love2D support SSL/https requests?

Post 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?
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
SiENcE
Party member
Posts: 805
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Does Love2D support SSL/https requests?

Post 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
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Does Love2D support SSL/https requests?

Post 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.
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Does Love2D support SSL/https requests?

Post by togFox »

I had the same experience as yourself 6 months ago:

https://www.love2d.org/forums/viewtopic.php?p=257794
Last edited by togFox on Sun Sep 08, 2024 8:11 am, edited 2 times in total.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
User avatar
Gunroar:Cannon()
Party member
Posts: 1141
Joined: Thu Dec 10, 2020 1:57 am

Re: Does Love2D support SSL/https requests?

Post 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? :(
togFox wrote: Sat Sep 07, 2024 1:12 am I had the same experience as yourself 6 months ago. Solution here:

https://www.love2d.org/forums/viewtopic ... ps#p257794
The link is bad.
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
SiENcE
Party member
Posts: 805
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Does Love2D support SSL/https requests?

Post 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.
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Does Love2D support SSL/https requests?

Post 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.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Does Love2D support SSL/https requests?

Post by zorg »

togFox wrote: Sat Sep 07, 2024 1:12 am I had the same experience as yourself 6 months ago. Solution here:

https://www.love2d.org/forums/viewtopic ... ps#p257794
functional link
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Gunroar:Cannon()
Party member
Posts: 1141
Joined: Thu Dec 10, 2020 1:57 am

Re: Does Love2D support SSL/https requests?

Post 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
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
User avatar
Gunroar:Cannon()
Party member
Posts: 1141
Joined: Thu Dec 10, 2020 1:57 am

Re: Does Love2D support SSL/https requests?

Post 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.
Attachments
IMG_20240911_114636.jpg
IMG_20240911_114636.jpg (73.62 KiB) Viewed 12511 times
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests