Difference between revisions of "Love2d-android"
From Ghoulwiki
Ghoulsblade (talk | contribs) |
Ghoulsblade (talk | contribs) (→temporary debug link) |
||
(35 intermediate revisions by the same user not shown) | |||
Line 20: | Line 20: | ||
== download == | == download == | ||
− | * [http://ghoulsblade.schattenkind.net/love-android/love-android.apk love-android.apk] (apk, 280kb, | + | * [http://ghoulsblade.schattenkind.net/love-android/love-android.apk love-android.apk] (apk, 280kb, android 2.1 and later) |
− | ** | + | ** copy .love's like cloud demo to /mnt/sdcard/love/clouds.love and similar, or you'll just get an empty launcher window |
+ | |||
+ | * [http://ghoulsblade.schattenkind.net/love-android/love-android-dev.apk love-android-dev.apk] (apk, 280kb, dev-snapshot), broken/debug stuff | ||
* all versions : http://ghoulsblade.schattenkind.net/love-android/ | * all versions : http://ghoulsblade.schattenkind.net/love-android/ | ||
Line 28: | Line 30: | ||
* github : https://github.com/hagish/love-android | * github : https://github.com/hagish/love-android | ||
− | * | + | * love2d android subforum : http://love2d.org/forums/viewforum.php?f=11 |
* early youtube vid http://www.youtube.com/watch?v=tfbTX30My7o&feature=youtu.be | * early youtube vid http://www.youtube.com/watch?v=tfbTX30My7o&feature=youtu.be | ||
** orig : http://hagish.schattenkind.net/love-android/more-iyf.mpeg | ** orig : http://hagish.schattenkind.net/love-android/more-iyf.mpeg | ||
* luaj : http://sourceforge.net/projects/luaj/ | * luaj : http://sourceforge.net/projects/luaj/ | ||
+ | * android sdk http://developer.android.com/reference/packages.html | ||
+ | * openGL es http://www.khronos.org/opengles/sdk/1.1/docs/man/ | ||
== not yet working == | == not yet working == | ||
− | * | + | * loadimage during love.keypressed/mousepressed, as a workaround please load graphics only during love.load() until we can fix it. |
− | * | + | * setScissors : background clear limited by scissor area |
+ | * multitouch callback : coordinates still raw and not transformed to love coordinate system | ||
+ | * disable the poweroff if nothing is being touched (up soon) | ||
+ | * font render problems on actual device (white boxes) for non-power-of-2 textures (it works in emu, not ttf/truetype yet) | ||
* love.audio a bunch of api functions isn't implemented yet | * love.audio a bunch of api functions isn't implemented yet | ||
* love.graphics a bunch of api functions isn't implemented yet | * love.graphics a bunch of api functions isn't implemented yet | ||
− | * | + | * network / lua socket |
* ttf fonts (note: http://developer.android.com/reference/android/renderscript/Font.html) | * ttf fonts (note: http://developer.android.com/reference/android/renderscript/Font.html) | ||
− | * | + | * setBlendMode : BLEND_SUBTRACTIVE won't work correctly, since android 2.1 / OpenGL ES 1.0 doesn't seem to support the required glBlendEquation(GL_FUNC_REVERSE_SUBTRACT) (lowprio for now) |
* love.physics : box2d (note: http://code.google.com/p/androidbox2d/ ) (lowprio for now) | * love.physics : box2d (note: http://code.google.com/p/androidbox2d/ ) (lowprio for now) | ||
* love.threads (note: http://developer.android.com/reference/java/lang/Thread.html ) (lowprio for now) | * love.threads (note: http://developer.android.com/reference/java/lang/Thread.html ) (lowprio for now) | ||
Line 51: | Line 58: | ||
* love.audio .xm (tracker music) files, note: http://stackoverflow.com/questions/5597624/how-to-play-tracker-modules-on-android (lowprio for now) | * love.audio .xm (tracker music) files, note: http://stackoverflow.com/questions/5597624/how-to-play-tracker-modules-on-android (lowprio for now) | ||
* bug: game seems to restart when resolution changes (landscape) | * bug: game seems to restart when resolution changes (landscape) | ||
+ | * bug: reports of touchscreen-mouse coordinates being messed up, maybe related to "mode/context switch" | ||
+ | * bug: sinescroller font at top broken | ||
+ | * bug: love-for-zombies hero graphics weird, 3 times ? texcoord issue with anim stuff ? | ||
== done == | == done == | ||
+ | * <strike>love.graphics particleSystem drawing (just empty stubs for now to prevent crash)</strike> | ||
+ | * <strike>playing sound/music when loading from .love (see help wanted below)</strike> | ||
+ | * <strike>"mode/context switches" : leave app and come back, change resolution (landscape) or other textures aren't reloaded yet, so everything will be white boxes on black background currently.</strike> | ||
+ | * <strike>sensor and multitouch access via love.phone.* api extensions</strike> | ||
+ | * <strike>love.graphics.line,circle,quad,triangle,polygon,rectangle,point</strike> | ||
+ | * <strike>power-of-2 font images work (8,16,32,64,128,256,512...)</strike> | ||
+ | * <strike>first experimental touch and sensor access, see readme at the bottom of https://github.com/hagish/love-android</strike> | ||
+ | * <strike>basic api to run clouds demo</strike> | ||
+ | * <strike>basic api to run [http://love2d.org/wiki/In_Your_Face_City_Trains In_Your_Face_City_Trains] demo</strike> | ||
+ | * <strike>basic api to run demos : sinescroller, no, lovalanche(phys dummy), particles (just dummy to avoid crash, no particles visible yet), </strike> | ||
* <strike>love.audio basic functionality : sound+music play, .wav .ogg .mp3</strike> | * <strike>love.audio basic functionality : sound+music play, .wav .ogg .mp3</strike> | ||
* <strike>loading .love files from sd card directly without unpacking</strike> | * <strike>loading .love files from sd card directly without unpacking</strike> | ||
Line 62: | Line 82: | ||
== WE NEED HELP! == | == WE NEED HELP! == | ||
− | * playing sound/music when loading from .love, we might need help with someone very experience in android sdk | + | * playing sound/music when loading from .love currently requires unzipping to temp file on sdcard, we might need help with someone very experience in android sdk to avoid that : |
** android:MediaPlayer and SoundPool demand a file handle or filepath, they don't accept inputstream of buffered data from the zip. | ** android:MediaPlayer and SoundPool demand a file handle or filepath, they don't accept inputstream of buffered data from the zip. | ||
** i tried unpacking to temp files, but just got permission denied so far, maybe i need to specify a different folder for that | ** i tried unpacking to temp files, but just got permission denied so far, maybe i need to specify a different folder for that | ||
− | + | ** maybe android.media.AudioTrack ? lowlevel buffer-feeding | |
+ | *** http://developer.android.com/reference/android/media/AudioTrack.html | ||
+ | *** http://mindtherobot.com/blog/580/android-audio-play-a-wav-file-on-an-audiotrack/ | ||
+ | *** http://mindtherobot.com/blog/624/android-audio-play-an-mp3-file-on-an-audiotrack/ | ||
+ | *** http://mindtherobot.com/blog/555/android-audio-problems-hidden-limitations-and-opensl-es/ | ||
+ | *** Using AudioTrack to play a WAV file http://stackoverflow.com/questions/3925030/using-audiotrack-in-android-to-play-a-wav-file | ||
* <strike>luaj bug remove-from-table-during-iteration : http://sourceforge.net/tracker/?func=detail&aid=3430986&group_id=197627&atid=962226</strike> (partially solved) | * <strike>luaj bug remove-from-table-during-iteration : http://sourceforge.net/tracker/?func=detail&aid=3430986&group_id=197627&atid=962226</strike> (partially solved) | ||
** <strike>workaround added by hagish : res/raw/pairs_hack.lua : pairs() should work, but next() might still cause problems if used directly</strike> (partially solved) | ** <strike>workaround added by hagish : res/raw/pairs_hack.lua : pairs() should work, but next() might still cause problems if used directly</strike> (partially solved) | ||
* any idea for how to simplify packaging like win/linux appending a .love directly to the end of the executable to create a standalone without sd-card access ? | * any idea for how to simplify packaging like win/linux appending a .love directly to the end of the executable to create a standalone without sd-card access ? | ||
* anyone with experience using that market thing up for a chat ? me(ghoul) = total smartphone noob =) | * anyone with experience using that market thing up for a chat ? me(ghoul) = total smartphone noob =) | ||
+ | * <strike>anyone wanna help implement love.graphics particleSystem ?</strike> | ||
+ | * anyone wanna help with that box2d mapping ? | ||
+ | * anyone wanna help with extracting ttf font letters/glyphs to image so we can render them ? | ||
+ | * anyone wanne help with creating a config dialog for the launcher to map a few keyboard keys to a corner of the screen for touch-screen play ? | ||
== additional api == | == additional api == | ||
Line 79: | Line 108: | ||
* accelerometer, gravity sensor, gps | * accelerometer, gravity sensor, gps | ||
* maybe opening browser ? | * maybe opening browser ? | ||
+ | * maybe audio-recording, camera input ? | ||
+ | * see also the readme at the bottom of https://github.com/hagish/love-android | ||
+ | * see also https://github.com/hagish/love-android/blob/master/src/net/schattenkind/androidLove/luan/module/LuanPhone.java |
Latest revision as of 00:33, 24 June 2012
about
We started to port the löve api to android
- the goal is to create a launcher to run .love files from sdcard
- and to enable building standalone love games without sdcard
- to build a standalone without need to access sdcard, you might have to install android sdk (we use eclipse) and add the needed files as resources, or the .love file to be run as resource
- unless of course someone has an idea how to append a .love file to the launcher app, like it is possible on win/linux, see help wanted section
- successfully tested on android 2.1 (OpenGL ES 1.0) with apk file below
- tech : we are implementing the löve2d api in a java app made with the android sdk using luaj for lua and opengl es for rendering
- still early work in progress, a lot of the api hasn't been ported yet, and most existing löve games won't work out of the box.
- future plans : since most existing games assume keyboard, we might add an options-menu to make a few keys available in a corner of the display for touch-screen use
- future plans : we might upgrade to OpenGL ES 1.1 to use vertex buffers for better perfomance at some point, but not anytime soon
download
- love-android.apk (apk, 280kb, android 2.1 and later)
- copy .love's like cloud demo to /mnt/sdcard/love/clouds.love and similar, or you'll just get an empty launcher window
- love-android-dev.apk (apk, 280kb, dev-snapshot), broken/debug stuff
- all versions : http://ghoulsblade.schattenkind.net/love-android/
links
- github : https://github.com/hagish/love-android
- love2d android subforum : http://love2d.org/forums/viewforum.php?f=11
- early youtube vid http://www.youtube.com/watch?v=tfbTX30My7o&feature=youtu.be
- luaj : http://sourceforge.net/projects/luaj/
- android sdk http://developer.android.com/reference/packages.html
- openGL es http://www.khronos.org/opengles/sdk/1.1/docs/man/
not yet working
- loadimage during love.keypressed/mousepressed, as a workaround please load graphics only during love.load() until we can fix it.
- setScissors : background clear limited by scissor area
- multitouch callback : coordinates still raw and not transformed to love coordinate system
- disable the poweroff if nothing is being touched (up soon)
- font render problems on actual device (white boxes) for non-power-of-2 textures (it works in emu, not ttf/truetype yet)
- love.audio a bunch of api functions isn't implemented yet
- love.graphics a bunch of api functions isn't implemented yet
- network / lua socket
- ttf fonts (note: http://developer.android.com/reference/android/renderscript/Font.html)
- setBlendMode : BLEND_SUBTRACTIVE won't work correctly, since android 2.1 / OpenGL ES 1.0 doesn't seem to support the required glBlendEquation(GL_FUNC_REVERSE_SUBTRACT) (lowprio for now)
- love.physics : box2d (note: http://code.google.com/p/androidbox2d/ ) (lowprio for now)
- love.threads (note: http://developer.android.com/reference/java/lang/Thread.html ) (lowprio for now)
- love.font custom font loaders and rasterizers (lowprio for now)
- love.image custom image decoders and buffers (lowprio for now)
- love.sound custom sound decoders and buffers (lowprio for now)
- love.graphics.printf : word-wrapping currently ignores word boundaries and just wraps characters (lowprio for now)
- love.event (lowprio for now)
- love.audio .xm (tracker music) files, note: http://stackoverflow.com/questions/5597624/how-to-play-tracker-modules-on-android (lowprio for now)
- bug: game seems to restart when resolution changes (landscape)
- bug: reports of touchscreen-mouse coordinates being messed up, maybe related to "mode/context switch"
- bug: sinescroller font at top broken
- bug: love-for-zombies hero graphics weird, 3 times ? texcoord issue with anim stuff ?
done
-
love.graphics particleSystem drawing (just empty stubs for now to prevent crash) -
playing sound/music when loading from .love (see help wanted below) -
"mode/context switches" : leave app and come back, change resolution (landscape) or other textures aren't reloaded yet, so everything will be white boxes on black background currently. -
sensor and multitouch access via love.phone.* api extensions -
love.graphics.line,circle,quad,triangle,polygon,rectangle,point -
power-of-2 font images work (8,16,32,64,128,256,512...) -
first experimental touch and sensor access, see readme at the bottom of https://github.com/hagish/love-android -
basic api to run clouds demo -
basic api to run In_Your_Face_City_Trains demo -
basic api to run demos : sinescroller, no, lovalanche(phys dummy), particles (just dummy to avoid crash, no particles visible yet), -
love.audio basic functionality : sound+music play, .wav .ogg .mp3 -
loading .love files from sd card directly without unpacking -
successfully test on a 2.1 android device -
imageFont loading and printf alignments + wrapping (char-wise, currently ignores word boundaries) -
luaj modify-table-during-pairs-iteration bug workaround
WE NEED HELP!
- playing sound/music when loading from .love currently requires unzipping to temp file on sdcard, we might need help with someone very experience in android sdk to avoid that :
- android:MediaPlayer and SoundPool demand a file handle or filepath, they don't accept inputstream of buffered data from the zip.
- i tried unpacking to temp files, but just got permission denied so far, maybe i need to specify a different folder for that
- maybe android.media.AudioTrack ? lowlevel buffer-feeding
- http://developer.android.com/reference/android/media/AudioTrack.html
- http://mindtherobot.com/blog/580/android-audio-play-a-wav-file-on-an-audiotrack/
- http://mindtherobot.com/blog/624/android-audio-play-an-mp3-file-on-an-audiotrack/
- http://mindtherobot.com/blog/555/android-audio-problems-hidden-limitations-and-opensl-es/
- Using AudioTrack to play a WAV file http://stackoverflow.com/questions/3925030/using-audiotrack-in-android-to-play-a-wav-file
-
luaj bug remove-from-table-during-iteration : http://sourceforge.net/tracker/?func=detail&aid=3430986&group_id=197627&atid=962226(partially solved)-
workaround added by hagish : res/raw/pairs_hack.lua : pairs() should work, but next() might still cause problems if used directly(partially solved)
-
- any idea for how to simplify packaging like win/linux appending a .love directly to the end of the executable to create a standalone without sd-card access ?
- anyone with experience using that market thing up for a chat ? me(ghoul) = total smartphone noob =)
-
anyone wanna help implement love.graphics particleSystem ? - anyone wanna help with that box2d mapping ?
- anyone wanna help with extracting ttf font letters/glyphs to image so we can render them ?
- anyone wanne help with creating a config dialog for the launcher to map a few keyboard keys to a corner of the screen for touch-screen play ?
additional api
- phone specific stuff to be exposed via love.mobile (rather than love.android, since there's a lot of overlap)
- loading from resources embedded into the app/pack rather than from filepath on sdcard
- multi-touch screen
- accelerometer, gravity sensor, gps
- maybe opening browser ?
- maybe audio-recording, camera input ?
- see also the readme at the bottom of https://github.com/hagish/love-android
- see also https://github.com/hagish/love-android/blob/master/src/net/schattenkind/androidLove/luan/module/LuanPhone.java