new apk uploaded, love.event.push('q') should work with that,
not the other love.event things tho.
Bug thread
- ghoulsblade
- Party member
- Posts: 111
- Joined: Sun Oct 31, 2010 6:11 pm
Re: Bug thread
love-android - gamejams
Re: Bug thread
You're my hero <3ghoulsblade wrote:new apk uploaded, love.event.push('q') should work with that,
not the other love.event things tho.
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.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: Bug thread
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.
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: Bug thread
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.
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
Re: Bug thread
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.
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.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- toaster468
- Citizen
- Posts: 77
- Joined: Sat Nov 06, 2010 11:30 pm
Re: Bug thread
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.
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.
Re: Bug thread
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.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.
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.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: No registered users and 2 guests