Difference between revisions of "Love2d-android"

From Ghoulwiki
Jump to: navigation, search
(about)
Line 15: Line 15:
 
* 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.
 
* 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 ==
+
* 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
* 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
 
* we might upgrade to OpenGL ES 1.1 to use vertex buffers for better perfomance at some point, but not anytime soon
 
  
 
== download ==  
 
== download ==  

Revision as of 00:40, 13 November 2011

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, 2011-11-12 android 2.1 and later)
    • unzip .love's like cloud demo to /mnt/sdcard/love/clouds/ and similar, or you'll just get an empty launcher window

links

not yet working

  • loading .love files from sd card directly without unpacking (up soon)
  • playing sound/music when loading from .love (see help wanted below)
  • love.audio a bunch of api functions isn't implemented yet
  • love.graphics a bunch of api functions isn't implemented yet
  • font render problems on actual device, it works in emu
  • ttf fonts (note: http://developer.android.com/reference/android/renderscript/Font.html)
  • leave app and come back, change resolution (landscape) or other "context switches" : textures aren't reloaded yet, so everything will be white boxes on black background currently.
  • 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)

done

  • 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, we might need help with someone very experience in android sdk here :
    • 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
  • 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 =)

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 ?