LÖVE Android Development from MacOS

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm
Location: Finland

LÖVE Android Development from MacOS

Post by KallioSanteri »

Hi!

I have a MacBook Pro which I use for coding. I develop Android apps, but there is one problem. Data communication between MacOS and Android has always been difficult, and still is. I would like to use a physical device for testing the apps, and not only for testing once in a while but to be constantly connected to the code and to test even the smallest changes. I did that on my previous Linux laptop, by simply having my phone plugged into the laptop and editing inside the "lovegame" folder on my phone. Right now I'm using Android File Transfer to transfer the files to my phone every time I want to make a change, but that is so frustrating. AFT doesn't support editing files straight off the phone. Does anyone have a suggestion on how to simplify this process of file transferring every minute or so, or to edit straight off the phone, or to get LÖVE to read files from elsewhere. The last one is probably possible, but the problem is that my laptop doesn't obviously show up as a storage device on my phone. Maybe an external hard drive that could be connected to multiple devices at once (?).
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm
Location: Finland

Re: LÖVE Android Development from MacOS

Post by KallioSanteri »

For someone reading this at some point; how I ended up doing it was hosting an FTP server on my phone and installing an FTP add-on to Sublime Text so that I can edit files directly off the "lovegame" folder from the FTP. I used this (https://medium.com/@softxide/installing ... da27f2a98a) article as a baseline, but the difference was that I got package manager installed directly from Sublime Text.
User avatar
Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

Re: LÖVE Android Development from MacOS

Post by Ulydev »

You could take a look at adb push https://adbshell.com/commands/adb-push
It should work like

Code: Select all

adb push --sync /path/to/src /mobile/path/to/love/game
And then within your game you can use a library to detect changes and restart: https://github.com/anton-kl/lua-hot-reload
Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests