As above, I can't seem to get printing to work, it instead outputs white squares. should I set a font first?
Is there a list of which parts of the love API are currently working?
Thanks for this guys, its excellent!
love-android: discussion
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: love-android
font bug on devices is known, works in emu, we're working on it.
list of supported api : no function-by-function list, but see "done" and "not yet working " sections on
http://ghoulsblade.schattenkind.net/wik ... 2d-android
print : yeah, hard without setting up the android sdk and debugging via one of the commandline things + usb cable.
maybe this thread is interesting ? didn't try it yet, but seems it shows console output stuff onscreen :
"Debug - A whole new way of debugging your game" http://love2d.org/forums/viewtopic.php?f=5&t=2473
list of supported api : no function-by-function list, but see "done" and "not yet working " sections on
http://ghoulsblade.schattenkind.net/wik ... 2d-android
print : yeah, hard without setting up the android sdk and debugging via one of the commandline things + usb cable.
maybe this thread is interesting ? didn't try it yet, but seems it shows console output stuff onscreen :
"Debug - A whole new way of debugging your game" http://love2d.org/forums/viewtopic.php?f=5&t=2473
love-android - gamejams
Re: love-android
OK, thanks for the update.ghoulsblade wrote:font bug on devices is known, works in emu, we're working on it.
I tried exactly this idea, but without working love.graphics.print() it will not work. Besides, print() is important for communication with a user - you cannot usually create an image for every message...ghoulsblade wrote: print : yeah, hard without setting up the android sdk and debugging via one of the commandline things + usb cable.
maybe this thread is interesting ? didn't try it yet, but seems it shows console output stuff onscreen :
"Debug - A whole new way of debugging your game" http://love2d.org/forums/viewtopic.php?f=5&t=2473
What about network support? Is it even considered?
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: love-android
debug/love.graphics.print : yeah, i hope i can fix it this weekend. you couuuuuuld make 26+10 small images a-z0-9 and override love.graphics.print to draw sprites if you're impatient XD
network : from what i hear internet connections on smartphones are rather unstable,
so don't count on it for "realtime" gameplay too much (turnbased/delay stuff might work),
wlan might be better tho.
it's on the todo, so considered yes, but i haven't looked at the api yet.
first some sensor stuff then the font fix i guess
network : from what i hear internet connections on smartphones are rather unstable,
so don't count on it for "realtime" gameplay too much (turnbased/delay stuff might work),
wlan might be better tho.
it's on the todo, so considered yes, but i haven't looked at the api yet.
first some sensor stuff then the font fix i guess
love-android - gamejams
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: love-android
Why not invent new callbacks for each system button?T-Bone wrote:I know it's possible for apps to overwrite the functionality of the physical buttons on Android devices. The optimal solution to this would be that love.keyboard (and of coure love.keypressed and so on) would register the keys "home", "menu", "search" and so on, and, if they're used in a game, the standard functionality of those buttons would be overwritten (but not otherwise). This is probably a pain to implement as you'd have to look through the source of the lua files in order to know if the buttons are used or not. A simpler soultion would perhaps be to have a function or a table that let's the user specify what physical buttons he or she wants love.keyboard to recognize. For example, if a table was used, it could be something like this
Re: love-android
That's a possibility. There are a few issues that might have solutions:TechnoCat wrote:Why not invent new callbacks for each system button?T-Bone wrote:I know it's possible for apps to overwrite the functionality of the physical buttons on Android devices. The optimal solution to this would be that love.keyboard (and of coure love.keypressed and so on) would register the keys "home", "menu", "search" and so on, and, if they're used in a game, the standard functionality of those buttons would be overwritten (but not otherwise). This is probably a pain to implement as you'd have to look through the source of the lua files in order to know if the buttons are used or not. A simpler soultion would perhaps be to have a function or a table that let's the user specify what physical buttons he or she wants love.keyboard to recognize. For example, if a table was used, it could be something like this
1. Inconsistent with other physical buttons
2. lots of functions (keypressed, keyreleased, and isDown for every button)
3. not trivial to check if a function has been overwritten or not in order to know if it should overwrite the standard key functionality
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
when lua code in the .love wants to override default behavior of a button it could just do "return true" in the keypressed callback i suppose =)
e.g.
i'll check this weekend if it's technically possible via android api to override / disable their default behavior.
e.g.
Code: Select all
function love.keypressed(key)
if (key == "phone_home") then
print("home pressed, overriding...")
return true
end
end
love-android - gamejams
Re: love-android
I know that it is possible, at the very least for the menu button. I'm not sure how you do it though.ghoulsblade wrote:when lua code in the .love wants to override default behavior of a button it could just do "return true" in the keypressed callback i suppose =)
e.g.i'll check this weekend if it's technically possible via android api to override / disable their default behavior.Code: Select all
function love.keypressed(key) if (key == "phone_home") then print("home pressed, overriding...") return true end end
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
devnews: http://ghoulsblade.schattenkind.net/lov ... ndroid.apk
fontfix 1, still doesn't work in "in your face city trains", but at least i get a text now when using a mini main.lua :
fontfix 1, still doesn't work in "in your face city trains", but at least i get a text now when using a mini main.lua :
Code: Select all
function love.load () end
function love.draw ()
love.graphics.print(" abcdefghijklmnopqrstuvwxyz0123456789.!'-:·",10,10)
end
function love.update () end
love-android - gamejams
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: love-android
devnews: http://ghoulsblade.schattenkind.net/lov ... ndroid.apk
changed geometry generation for font a bit to avoid reallocating the buffer and give a different size in case of spaces,
also made the default font white rather than black and power of two.
It seems to work for power-of-2 texture sizes now. see attached .love file : should display 3 lines with different font,
1) default font in white (works correctly on my milestone)
2) non-power-of-2 image font in black (316x6) (i only get white boxes on my milestone)
3) power-of-2 (512x8) image font in red (works correctly on my milestone)
4) non-power-of-2 image used for the font (316x6) (i only get a big white box on my milestone)
changed geometry generation for font a bit to avoid reallocating the buffer and give a different size in case of spaces,
also made the default font white rather than black and power of two.
It seems to work for power-of-2 texture sizes now. see attached .love file : should display 3 lines with different font,
1) default font in white (works correctly on my milestone)
2) non-power-of-2 image font in black (316x6) (i only get white boxes on my milestone)
3) power-of-2 (512x8) image font in red (works correctly on my milestone)
4) non-power-of-2 image used for the font (316x6) (i only get a big white box on my milestone)
love-android - gamejams
Who is online
Users browsing this forum: No registered users and 1 guest