Maybe we can start a wiki page? I downloaded it... but I am too noob to know how to go on from there. --- Found it... http://ghoulsblade.schattenkind.net/wik ... 2d-android
Soz, I am new here, but I am *specifically* interested in creating content for android (specifically a tablet) for my niece who is disabled. So my need for instructions are still very high.
My first project will be very simple.
Two buttons, each playing a sound when you touch them. The one saying "Yes" and the other saying "No". The app must also not close easily, as she can easily accidentally touch the "back" or "home" buttons.
Later I'll probably do something a little more advanced once she is can use this.
love-android: discussion
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: love-android
beware that this love-android port is still rather experimental.
the way to go for now would be get it to work on pc with mouse and without android first,
e.g. make a main.lua which overrides http://love2d.org/wiki/love.draw to draws 2 images :
a red-no on the left half of the screen,
a green-yes on the right half of the screen,
and add a http://love2d.org/wiki/love.mousepressed to play the sounds.
if x < 400 then love.audio.play(sound_no) else love.audio.play(sound_yes) end
should do the trick.
You'll need to load the images and sounds in http://love2d.org/wiki/love.load
see existing examples in the wiki.
Best make a new forum thread if you run into problems doing that on pc, since it might get cluttered in this thread.
I'm sure a bunch of people will be happy to help =)
Keep the images small, since android devices seem to have rather limited video-ram, so no screen filling 512x512 stuff yet.
128x128 should work for now, depending on the device you'll need power-of-2 image size, e.g. 16,32,64,128,256,512... so no 200x200 if possible.
Also love.graphics line / rectangle fill stuff isn't implemented in love.android yet, so you'll want to avoid those for now also.
After it works on pc, move the folder (with main.lua and sounds+images) to the sdcard, i don't have an android phone myself yet, so no idea how to do that.
The path should be /mnt/sdcard/love/yourprojectname/ or similar. (the probably without the /mnt/ if you're on windows)
Don't zip it to a .love yet, since that'll cause problems with audio in the current love-android version.
love-android generates mousepressed events for touch, so if it worked on pc, it should work here.
I think it'll close when you press the home button, not sure if it's possible to avoid that,
it might be enforced by the operating system.
Normally pressing the menu buttons shows an "exit" field at the bottom of the screen that can be used to close the app.
the way to go for now would be get it to work on pc with mouse and without android first,
e.g. make a main.lua which overrides http://love2d.org/wiki/love.draw to draws 2 images :
a red-no on the left half of the screen,
a green-yes on the right half of the screen,
and add a http://love2d.org/wiki/love.mousepressed to play the sounds.
if x < 400 then love.audio.play(sound_no) else love.audio.play(sound_yes) end
should do the trick.
You'll need to load the images and sounds in http://love2d.org/wiki/love.load
see existing examples in the wiki.
Best make a new forum thread if you run into problems doing that on pc, since it might get cluttered in this thread.
I'm sure a bunch of people will be happy to help =)
Keep the images small, since android devices seem to have rather limited video-ram, so no screen filling 512x512 stuff yet.
128x128 should work for now, depending on the device you'll need power-of-2 image size, e.g. 16,32,64,128,256,512... so no 200x200 if possible.
Also love.graphics line / rectangle fill stuff isn't implemented in love.android yet, so you'll want to avoid those for now also.
After it works on pc, move the folder (with main.lua and sounds+images) to the sdcard, i don't have an android phone myself yet, so no idea how to do that.
The path should be /mnt/sdcard/love/yourprojectname/ or similar. (the probably without the /mnt/ if you're on windows)
Don't zip it to a .love yet, since that'll cause problems with audio in the current love-android version.
love-android generates mousepressed events for touch, so if it worked on pc, it should work here.
I think it'll close when you press the home button, not sure if it's possible to avoid that,
it might be enforced by the operating system.
Normally pressing the menu buttons shows an "exit" field at the bottom of the screen that can be used to close the app.
love-android - gamejams
Re: love-android
Yeah, you guys are really handling shit on this project. I'm pretty eager to design some quick/fun games for Android.
Good luck!
Good luck!
@rynesaur
Re: love-android
I'd probably wait a little while. Love-android just got started. I'd say it will be much more usable in a few weeks.Reenen wrote:Maybe we can start a wiki page? I downloaded it... but I am too noob to know how to go on from there. --- Found it... http://ghoulsblade.schattenkind.net/wik ... 2d-android
Soz, I am new here, but I am *specifically* interested in creating content for android (specifically a tablet) for my niece who is disabled. So my need for instructions are still very high.
My first project will be very simple.
Two buttons, each playing a sound when you touch them. The one saying "Yes" and the other saying "No". The app must also not close easily, as she can easily accidentally touch the "back" or "home" buttons.
Later I'll probably do something a little more advanced once she is can use this.
Also note that the way things are now, the result won't be a single app. Currently, there's a love-android app that attempts to run love games. This is not very user friendly.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: love-android
After I successfully ran my mini project on my phone, I ran into minor problems with the tablet. My tablet does have a sd card yet, so /sdcard/love does not exist. This creates a bit of an issue, so my suggestion is to let the search button or the options button specify a default love folder.
Re: love-android
I thought android created a folder called /sdcard even if there was no physical sd-card. Did you use a file manager on your tablet to make sure there's no /sdcard folder in which to put a love folder?Reenen wrote:After I successfully ran my mini project on my phone, I ran into minor problems with the tablet. My tablet does have a sd card yet, so /sdcard/love does not exist. This creates a bit of an issue, so my suggestion is to let the search button or the options button specify a default love folder.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: love-android
i have a milestone now so i can debug fonts and other things on a device rather than emu =D
not sure how to solve the no-sdcard issue,
binaries are cryptographically signed afaik, so appending data like a .love at the end won't work directly.
You'd need to create a pc program or php script on a server to append a .love file to an unsigned base app and sign the result,
but i have no idea how to do that, help would be appreciated ! =)
One thing you can do is add the files as resources to the app, but to do that you need the full eclipse+sdk setup.
That's what i'll be doing when making love games i guess, still some api missing for that to skip the launcher and load a main.lua from ressource.
What love-android also does is list files in the "downloads" dir, which is usually on the sdcard, but might be elsewhere if there is no sdcard =)
btw from what i hear separating the launcher and the .love data on sdcard might even be userfriendly due to limited space on non-sdcard-storage.
not sure how to solve the no-sdcard issue,
binaries are cryptographically signed afaik, so appending data like a .love at the end won't work directly.
You'd need to create a pc program or php script on a server to append a .love file to an unsigned base app and sign the result,
but i have no idea how to do that, help would be appreciated ! =)
One thing you can do is add the files as resources to the app, but to do that you need the full eclipse+sdk setup.
That's what i'll be doing when making love games i guess, still some api missing for that to skip the launcher and load a main.lua from ressource.
What love-android also does is list files in the "downloads" dir, which is usually on the sdcard, but might be elsewhere if there is no sdcard =)
btw from what i hear separating the launcher and the .love data on sdcard might even be userfriendly due to limited space on non-sdcard-storage.
love-android - gamejams
Re: love-android
It is easier to test with a launcher like this. In the long run it is necessary to bundle the game with the engine to an apk packet.
We will also try a native direct port of the source soon. Just a basic prototype to evaluate which way works best. A sloution with less new code would be easier to maintain.
We will also try a native direct port of the source soon. Just a basic prototype to evaluate which way works best. A sloution with less new code would be easier to maintain.
Re: love-android
Yes, but I believe it is "linked" to the actual sdcard under /mnt/sdcard (or /dev/... in the end I guess). When i open that folder a message comes up saying that there is no SD card installed. I must admit I didn't try to actually create a folder in there. At work now, so I'll have to wait a full day before trying it though.T-Bone wrote: I thought android created a folder called /sdcard even if there was no physical sd-card. Did you use a file manager on your tablet to make sure there's no /sdcard folder in which to put a love folder?
ghoulsblade wrote:hat love-android also does is list files in the "downloads" dir, which is usually on the sdcard, but might be elsewhere if there is no sdcard =)
I have a nand/downloads and a nand/DCIM/downloads... I'll try and put them under both, and see if any works.
Re: love-android
Hi,
I tested it on android (tablet) 2.2. Results:
I tested it on android (tablet) 2.2. Results:
- .ogg sound files only plays once (on tablet), then never again, whilst wav files plays as expected.
- "multitasking" between the app causes the gfx to disappear, just a white screen. But the "game" still responds to mouse presses by playing sounds. I presume it doesn't actually redraw the screen?
- I'd love to disable screen rotating (or make it so that there is only 1 "right" way up) ie. screen must be portrait or landscape...
- Disable the home key (dunno if that is possible) so that she cannot accidentally exit it, at least "back" does nothing.
Who is online
Users browsing this forum: No registered users and 1 guest