Bug thread

A project to port LÖVE to Android handhelds
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

Re: Bug thread

Post by ghoulsblade »

new apk uploaded, love.event.push('q') should work with that,
not the other love.event things tho.
love-android - gamejams
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Bug thread

Post by T-Bone »

ghoulsblade wrote:new apk uploaded, love.event.push('q') should work with that,
not the other love.event things tho.
You're my hero <3

I wonder if it wouldn't be better if love.event.push('q') closed the app altogether (rather than returning you to the LoveAndroid app), in preparation for standalone love apps. But I guess that's still far away so it really doesn't matter yet.

Also, I want to further emphasize that love-android is still very inconsistent: This little game, written specifically for love-android, works like 1/3 of the time I try to run it. http://dl.dropbox.com/u/7572962/MILF.love (it's not the same as before)

Update! I found a workaround! According to my findings, it seems love-android has a different way to running love.draw(), love.update(dt) and the love.mousepressed() functions and such, in comparison to computer LÖVE. The crashing when changing states seems to have occured when love-android was drawing or updating while I was changing the state with a keypress. Is love-android using like separate threads or something for these things? Take a look at the standrard implementation of love.run() and make sure love-android runs similarly to improve compatability.

My conclusions are based on the fact that when I change the game to have a sort of middle phase when changing states, during which drawing and updating isn't done, the bug disappears completely. The bug could of course be something else than what I assume, I really don't know much about how love-android works.

Working MILF: http://dl.dropbox.com/u/7572962/MILF_beta.love
Also added some other awesome stuff. I'm starting to like my little game.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Bug thread

Post by T-Bone »

Just a little thing, I noticed that os.date() seems to ignore agruments. When I do os.date("%H:%M") on my Linux box it returns "16:48", but on love-android it returns "THU DEC 29 16:48:40 CET". No biggie but when love-android inevitably goes full screen, a clock is kind of nice to have in some games.
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

Re: Bug thread

Post by ghoulsblade »

yeah, i also suspect multiple threads to be the core issue of the crashes.

in java opengl the rendering is done in a separate thread, and that's where graphics accessing functions have to be made, so love.draw() and love.update() are done there, but events like keypress are sent to the main-thread.
So a mutex to avoid them interfering SHOULD avoid raceconditions, but i'm not sure if calling love-graphics accessing functions is allowed in a separate thread even if the render-thread is blocked by a mutex, so the best solution would be a mutexed message queue for event-callbacks that is handled right before love.update is called.

this shouldn't be an issue in the native-c love-android port, so i'll wait a bit longer if that becomes stable soon before spending much time on hard-to-reproduce crashes =)

os.date and the other basic lua system functions come from the luaj lib, so can't fix that, sorry.
love-android - gamejams
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Bug thread

Post by T-Bone »

That's fine, the native C version should have a fully functional os.date(), so that's fine.

One thing I noticed is that love.graphics.push()/pop() behaves differently on love-android than on my computer. Will try to make a clear example of this sometime soon.
User avatar
toaster468
Citizen
Posts: 77
Joined: Sat Nov 06, 2010 11:30 pm

Re: Bug thread

Post by toaster468 »

Is this a bug or am I doing it wrong?
When I try to play my game the sprites are squished. I made a perfect circle and it looked like an oval, I wish I could take a picture, but my phone does not support screenshots.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Bug thread

Post by T-Bone »

toaster468 wrote:Is this a bug or am I doing it wrong?
When I try to play my game the sprites are squished. I made a perfect circle and it looked like an oval, I wish I could take a picture, but my phone does not support screenshots.
Probably what is happening is that you draw a standard LÖVE window, which is 800 by 600, on a screen that is (probably) 480*800. Change the resolution to your screen's (depending on screen orientation too of course), and it will look much better.

However, the useless grey bar that says "LoveAndroid", as well as the notification bar are still there in the now old version available. They kind of ruin this. In future versions, games will at least be able to run in full screen.

It's possible to detect the screen size at runtime, in order to support all phones. Don't remember excactly how to do it at the top of my head but it's not hard at all.
Locked

Who is online

Users browsing this forum: No registered users and 49 guests