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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

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

Post 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 :-)
"In those quiet moments, you come into my mind" - Liam Reilly
User avatar
slime
Solid Snayke
Posts: 3140
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post 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.
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

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

Post 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?
"In those quiet moments, you come into my mind" - Liam Reilly
User avatar
tavuntu
Citizen
Posts: 65
Joined: Mon Dec 24, 2012 6:56 am
Contact:

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

Post by tavuntu »

love.filesyste.enumerate was replaced by love.filesystem.getDirectoryItems in 0.9.0 :)
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

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

Post by jjmafiae »

tavuntu wrote:love.filesyste.enumerate was replaced by love.filesystem.getDirectoryItems in 0.9.0 :)
have they only renamed it?
User avatar
slime
Solid Snayke
Posts: 3140
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime »

Indeed, its functionality hasn't changed: https://bitbucket.org/rude/love/commits/312f789
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

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

Post by Eamonn »

Thank Goodness! :D Thanks for the help everyone! :-)
"In those quiet moments, you come into my mind" - Liam Reilly
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

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

Post by jjmafiae »

we get wrapping images in 0.9.0?
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post by Nixola »

Wrapping images?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

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

Post by jjmafiae »

Nixola wrote:Wrapping images?
something like love.graphics.setBackgroundImage(image)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot], Google [Bot] and 5 guests