Page 1 of 2

LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Tue Oct 22, 2013 6:46 pm
by Eamonn
I heard a while back that there were problems with SDL on OS X Mavericks, and then when Apple announced Mavericks and the developer builds came out, people were having trouble with Mavericks and LÖVE. Mavericks is a huge (and free) update to OS X, but if I update now, will everything with LÖVE and SDL and stuff still work OK? Are there any work arounds?

Secondly, I want to ask about Geometry. As you may know, to update the viewport of a quad all you have to do is "Quad:setViewport(x, y, w, h)", but I can't see any way to do this with Geometry. In my case, I have a background, and I want to make the background image fill the background. I could have easily done this with quads, and the dynamic resizing would be really easy as well... if you changed it to a pre-set resolution inside the game. But, how can I do this in 0.9.0 using geometries? Is there no current way to do this? I'm trying to optimise my project for 0.9.0 as I'm developing it, so I don't have to do it later. If you don't know what I mean, here is an example:

Code: Select all

-- Let's pretend I have a quad already made called "bg".

lk = love.keyboard

function love.update(dt)
    if lk.isDown("a") then
        love.graphics.setMode(1280, 800)

        bg:setViewport(0, 0, love.graphics.getWidth(), love.graphics.getHeight()) -- This resets the viewport to fill the new screen dimensions.
    end
end
If you need me to clarify any more I'd be more than happy too :-)

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Tue Oct 22, 2013 8:07 pm
by slime
LÖVE 0.8.0 does not work properly on Mac OS 10.9, unless you use a fixed version (which also fixes some other OS X-specific bugs in LÖVE, so I highly recommend it.)

You can download it here: https://dl.dropboxusercontent.com/u/421 ... -fixed.zip

The Mavericks-specific bug with 0.8.0 is that .love files can't be properly opened by double-clicking them or dragging them onto the application.


Geometry no longer exists in [wiki]0.9.0[/wiki]. If you have a build of 0.9.0 with Geometry, get a more recent one. :)

Here is a link to an up-to-date Mac build of 0.9.0: https://bitbucket.org/slime73/love_macbin/get/tip.zip
Here are up-to-date Windows builds: 64 bit and 32 bit.

Quads are no longer removed, so in your case you can continue using Quads like you would have done in 0.8.0. [wiki]Mesh[/wiki] objects cover the new functionality Geometry objects would have added (and more.)

If for some reason you have a 4-vertex Mesh and want to do something like Quad:setViewport on it (even though you can directly use Quads instead), you could port this code snippet for use with Meshes: https://love2d.org/w/index.php?title=Ge ... 3#Examples
But there's no need since you can use Quad objects instead.

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Tue Oct 22, 2013 9:29 pm
by Eamonn
Thanks so much slime! I was a little worried about Mavericks, but thanks for helping me!

I guess I did have an outdated version of 0.9.0. I got mine from projecthawkthorne or something. It was in a thread from June, and I thought the version was being updated. I heard it was on bitbucket but I couldn't find a link. Thanks :-)

These meshes look interesting. I'll have to look into it! :D

Thanks again! :ultraglee:

EDIT: What happened to love.filesystem.enumerate? It says it doesn't exist when I try to run it. Is it replaced with anything, or is this a bug?

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Fri Oct 25, 2013 7:00 pm
by tavuntu
love.filesyste.enumerate was replaced by love.filesystem.getDirectoryItems in 0.9.0 :)

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Fri Oct 25, 2013 8:45 pm
by jjmafiae
tavuntu wrote:love.filesyste.enumerate was replaced by love.filesystem.getDirectoryItems in 0.9.0 :)
have they only renamed it?

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Fri Oct 25, 2013 9:13 pm
by slime
Indeed, its functionality hasn't changed: https://bitbucket.org/rude/love/commits/312f789

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Fri Oct 25, 2013 10:37 pm
by Eamonn
Thank Goodness! :D Thanks for the help everyone! :-)

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Sat Oct 26, 2013 9:40 am
by jjmafiae
we get wrapping images in 0.9.0?

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Sat Oct 26, 2013 12:12 pm
by Nixola
Wrapping images?

Re: LÖVE + Mavericks and Geometry Viewports? [0.9.0]

Posted: Sat Oct 26, 2013 1:25 pm
by jjmafiae
Nixola wrote:Wrapping images?
something like love.graphics.setBackgroundImage(image)