love-android-sdl2 (native, 0.9.2)

A project to port LÖVE to Android handhelds
Locked
User avatar
fysx
Citizen
Posts: 97
Joined: Mon Jan 30, 2012 8:36 pm
Contact:

love-android-sdl2 (native, 0.9.2)

Post by fysx »

Hi everyone,

as some of you may have heard I have been tinkering with an native port. It is based on slime's fantastic GLES port and uses the 0.9.1 API. As it is a native port with only little code changed pretty much everything should work. However there is no guarantee but should "just work" most of the time.

The code is available here:

http://bitbucket.org/MartinFelis/love-android-sdl2

You can get the latest Android package from:

https://bitbucket.org/MartinFelis/love- ... /downloads

Current issues:

https://bitbucket.org/MartinFelis/love- ... tatus=open

Differences to the standard LÖVE:
* It uses GLES which requires different shaders and also the graphics module has a slightly different architecture than standard LÖVE on the engine side (but not API wise!). There might linger some hidden bugs there.
* love.system.getOS() returns "Android"
* features multitouch functions love.touchpressed (id,x,y,p), love.touchreleased (id, x, y, p), love.touchmoved (id, x, y, p)
* back button is assigned to the "escape" key
* text input: use love.keyboard.setTextInput(true) or set keyboard position using love.keyboard.setTextInput(enable, x, y, width, height)

Quickstart to get your game running
* Extract your game to /sdcard/lovegame such that main.lua is located at /sdcard/lovegame/main.lua.
* Run the app

Detailed instructions on packaging can be found here: https://bitbucket.org/MartinFelis/love- ... /wiki/Home

Some limitations:
* Requires at least Android 2.3.3

Enjoy!

Changelog:

0.9.2a (2015-04-10):
- Added slime's bugfix for ParticleSystem:clone

0.9.2 (2015-04-10):
- updated API to match that of LÖVE 0.9.2
- love.window.setFullscreen can be used to switch between regular and immersive mode without status and navbar
- added loading of games by opening a main.lua file
- quitting LÖVE now conforms to the Android application lifecycle
- stop vibrator when app is paused
- fixed battery drain by properly pausing OpenAL device
- fixed printing of non-number and non-string values
- fixed compilation of Android NDK r10
- fixed compilation warnings concerning APP_PLATFORM
- old instance is shut down when opening a new game (note: it may crash when opening games at a high frequency, e.g. more than 2 per second)
- updated OpenAL-Soft to version 1.16.0
- updated to newer SDL version (f9244b2a151)

0.9.1b:
- added love.system.vibrate(seconds)
- print statements are now redirected to logcat. Output is prefixed with "[LOVE] "
- removed SDL.log()
- removed DevIL, libpng, libjpeg, libmng, and libtiff
- PNGs are loaded using lodepng and JPEGs using libturbo-jpeg
- repeatedly fixed a bug which caused Release builds to crash
- update to latest mobile-common branch

0.9.1a:
- using latest SDL_androidgl.c (fixes some random performance issues)
- using latest love-android @ changeset 8659be0e75a3 (adds support for compressed textures)

0.9.1:
- uses 0.9.1 API
- fixed crash on Moto G (and possibly other devices). This was a nasty bug that would just show a blue screen without an error message. The bug was resolved using the help of headchant
- fixed loading of jpegs (it probably hasn't worked up to now)
- fixed issues with looping over active touches. This fix was sponsored by slime!

Older changelogs can be found at https://bitbucket.org/MartinFelis/love-android-sdl2/

(edit: 2015-04-10 update for 0.9.2)
(edit: 2014-01-20 update for alpha7)
(edit: 2014-01-30 update for alpha8)
(edit: 2014-02-09 update for alpha9)
(edit: 2014-02-11 update for beta1)
(edit: 2014-02-17 post cleanup)
(edit: 2014-02-23 update for beta2)
(edit: 2014-05-12 update for 0.9.1)
(edit: 2014-07-01 update for 0.9.1a)
(edit: 2015-04-10 update for 0.9.2)
Last edited by fysx on Fri Apr 10, 2015 2:02 pm, edited 13 times in total.
Bird thing: @fysxdotorg Blog thing: fysx.org
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: love-android-sdl2 (native, 0.9.0)

Post by Karai17 »

I've been testing this a bit over the last few weeks. It works pretty damn well! Awesome work, keep it up!
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Fenrir
Party member
Posts: 222
Joined: Wed Nov 27, 2013 9:44 am
Contact:

Re: love-android-sdl2 (native, 0.9.0)

Post by Fenrir »

Great work! All modules are supposed to work ?

And how multitouch is working, did you add new callbacks ?
User avatar
fysx
Citizen
Posts: 97
Joined: Mon Jan 30, 2012 8:36 pm
Contact:

Re: love-android-sdl2 (native, 0.9.0)

Post by fysx »

Fenrir wrote:Great work! All modules are supposed to work ?
Yes.
Fenrir wrote:And how multitouch is working, did you add new callbacks ?
Yes, Pavol Rusnak added code for that. The actual code at https://bitbucket.org/MartinFelis/love- ... ter#cl-173 should get you started.

Currently slime is working on a proper touch module. I will most likely to switch to that sooner or later.
Bird thing: @fysxdotorg Blog thing: fysx.org
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: love-android-sdl2 (native, 0.9.0)

Post by jjmafiae »

So it's now possible to release games for android? :O

Good job.

All hail the mighty linux systems!
Last edited by jjmafiae on Tue Jan 14, 2014 1:58 pm, edited 1 time in total.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: love-android-sdl2 (native, 0.9.0)

Post by SiENcE »

Great! I'm looking forward to see the first love game on android store.

I hope to see it in the mainline of löve for 1.0 :).
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: love-android-sdl2 (native, 0.9.0)

Post by T-Bone »

Hole crepe, this looks great! I might actually release my game for Android too at some point now. I didn't think this day would come.

Too bad I don't use Android myself anymore though :P
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: love-android-sdl2 (native, 0.9.0)

Post by jjmafiae »

Im gonna buy a android phone now!!
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: love-android-sdl2 (native, 0.9.0)

Post by Karai17 »

STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: love-android-sdl2 (native, 0.9.0)

Post by jjmafiae »

I tested it on my little brother's adriod phone and the no game screen was fully working.

Also is love.mouse counting as the touch thing?
Locked

Who is online

Users browsing this forum: No registered users and 10 guests