Page 7 of 13

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Wed Nov 26, 2014 2:42 am
by slime
kneeko wrote:I just got a game on the App Store using this port, so it's production-ready enough!
And the game is fun and polished too! A double-success. :D
kneeko wrote:Fonts don't seem to get loaded into memory until they are first drawn or evaluated with getWidth/getHeight. For large fonts this can cause a hiccup during runtime. My workaround was to call getWidth on all of the characters I would be using right after loading them.
Yeah, that's an annoyance. LÖVE can't really preload the glyphs since it doesn't know which glyphs will be used (and the font file might have hundreds.) First-time runtime hitches like that are also a problem at a lower level (inside the graphics driver) when drawing things using different states (blend modes, shaders, etc.) as well on mobile, but it's less of an issue than the image uploading that LÖVE does I think.

Also, did you use the new iOS 8 Storyboard/xib Launch Screen file, or just the static launch images? The app's description in the App Store says it's "Optimized for iPhone 6 and 6 plus" which I thought only appeared if the Launch Screen was used, but it would be good to know if the regular device-specific Launch Images trigger that as well.

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Wed Nov 26, 2014 4:55 am
by kneeko
undef wrote:That does look like a lot of fun, why don't you present it in the Projects & Demos section :)
I'll do that very soon! Thanks for the suggestion. ^^
slime wrote:Also, did you use the new iOS 8 Storyboard/xib Launch Screen file, or just the static launch images? The app's description in the App Store says it's "Optimized for iPhone 6 and 6 plus" which I thought only appeared if the Launch Screen was used, but it would be good to know if the regular device-specific Launch Images trigger that as well.
I used regular (black) Launch Images, but I was also under the impression that you had to use a Storyboard to get that label. I suppose not! Which reminds me, I also had to use black Launch Images because there's a moment of black while LÖVE loads the game.

By the way, starting Feb 1st, Apple will be requiring everything submitted to be 64-bit. I fiddled with trying to get it to build with arm64, but I have absolutely zero experience with iOS development so I didn't make very much progress. Do you know if there are any major roadblocks in making that change? If so, I'll have to get my updates out before then! ;)

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Wed Nov 26, 2014 5:31 am
by slime
kneeko wrote:I also had to use black Launch Images because there's a moment of black while LÖVE loads the game.
I'll see if there's anything I can do to fix that issue.
kneeko wrote:By the way, starting Feb 1st, Apple will be requiring everything submitted to be 64-bit. I fiddled with trying to get it to build with arm64, but I have absolutely zero experience with iOS development so I didn't make very much progress. Do you know if there are any major roadblocks in making that change? If so, I'll have to get my updates out before then! ;)
The big thing preventing LÖVE from supporting 64 bit ARM right now is LuaJIT. It doesn't have the code necessary to work on that architecture yet, although someone is working on it. If that's not done by February then LÖVE for iOS will have to use regular Lua 5.1 in the meantime, since that works on 64 bit ARM out of the box.

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Wed Nov 26, 2014 7:11 am
by xpol
Smooth points are not supported - rough points will always be used.
I do needs smooth lines in my app.

Is it possible to make smooth lines?

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Wed Nov 26, 2014 7:20 am
by slime
They should be supported, yeah – smooth points are a feature of older desktop OpenGL versions and they aren't available on OpenGL ES (mobile), whereas LÖVE has its own code for smooth lines so they should work everywhere.


EDIT:
kneeko wrote:I also had to use black Launch Images because there's a moment of black while LÖVE loads the game.
I made a little test, and I believe the moment of black will occur while things in love.load are executed, as long as takes enough time to notice. I don't think there's much that can be done inside LÖVE – it's up to your game's code.

You could draw some quick placeholder stuff before loading the majority of the game's content, maybe. You can use [wiki]love.graphics.clear[/wiki] / love.graphics.draw / etc. and [wiki]love.graphics.present[/wiki] inside love.load to do that.

Something as simple as this might be a bit of help:

Code: Select all

function love.load()
    local initialcolor = {0, 64, 192} -- or whatever the main color of your game's initial screen is.
    love.graphics.setBackgroundColor(initialcolor)
    love.graphics.clear()
    love.graphics.present()

    -- Load the game as normal.
end
EDIT 2: I have a (somewhat hacky) idea for keeping the launch image/screen around for longer. I'll see if it works out tomorrow, maybe.

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Wed Nov 26, 2014 11:10 am
by bartbes
kneeko wrote: • Fonts don't seem to get loaded into memory until they are first drawn or evaluated with getWidth/getHeight. For large fonts this can cause a hiccup during runtime. My workaround was to call getWidth on all of the characters I would be using right after loading them.
That is correct (and the behaviour of the "normal" love as well), this is mostly to deal with unicode and the large amounts of probably unused glyphs that might entail.
It is of course an option to render the ASCII characters on load, but this would still have performance dips when you happen to load a character not already loaded, I'm not sure there's a clean solution.

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Sat Nov 29, 2014 12:12 am
by gianmichele
This really has come a long way. I guess it's time for me to test properly!

Any chance you'll integrate iAds or Game Center Leaderboards? Or a guide that shows how to do it?

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Tue Dec 02, 2014 9:20 am
by slime
gianmichele wrote:Any chance you'll integrate iAds or Game Center Leaderboards? Or a guide that shows how to do it?
I haven't looked into either one of those yet, but there might be existing Lua bindings out there that you'd be able to use with LÖVE. If not, I could probably create something like that – for Game Center at least. I'm not really interested in working with iAds myself.

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Tue Dec 02, 2014 7:53 pm
by gianmichele
I guess that probably a small guide on how to integrate those services could open the door to people integrating a few :D

Re: Experimental iOS port (LÖVE 0.9.x)

Posted: Thu Dec 04, 2014 8:30 pm
by gianmichele
Another small question: how do you guys handle multi resolution and loading of retina assets?

Thanks,
Gianmichele