Hello!
I plan on building a game for mobile and would like to use LOVE. I plan on using the APK tool here https://love2d.org/wiki/Game_Distribution/APKTool
I am struggling to find any relevant documentation on building games in LOVE for mobile and have some questions.
1. What LOVE APIs should be used for mobile specific features (e.g. Touch APIs)
2. What LOVE APIs should be avoided/don't work well with Mobile?
3. What are the common gotchas/pitfalls with LOVE for Mobile?
Thanks
Love for Android
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Love for Android
1. The only mobile-specific API is love.window.getSafeArea. It's used to retrieve areas which aren't obstructed by cutout. love.touch, love.touchpressed, and love.touchreleased aren't mobile-specific as it also work in Windows with multitouch-capable monitor.
2. Resizing window is not really possible in LOVE, but changing the screen orientation to portrait is possible by specifying portrait resolution (i.e. 9:16) and landscape orientation with landscape resolution (i.e. 16:9)
3. Android-specific: Canvas appear too big or image appear too big. This is because LOVE Android always have highdpi enabled and LOVE enables DPI scaling by default, which causes resolution returned by love.graphics.getDimensions() smaller than resolution returned by love.window.getMode(). You can workaround it by setting t.window.usedpiscale, but I personally prefer working with DPI-scaled units.
2. Resizing window is not really possible in LOVE, but changing the screen orientation to portrait is possible by specifying portrait resolution (i.e. 9:16) and landscape orientation with landscape resolution (i.e. 16:9)
3. Android-specific: Canvas appear too big or image appear too big. This is because LOVE Android always have highdpi enabled and LOVE enables DPI scaling by default, which causes resolution returned by love.graphics.getDimensions() smaller than resolution returned by love.window.getMode(). You can workaround it by setting t.window.usedpiscale, but I personally prefer working with DPI-scaled units.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Who is online
Users browsing this forum: Ahrefs [Bot] and 15 guests