Problem with In-Game Zooming [SOLVED]
Posted: Mon Mar 14, 2011 7:25 pm
I've recently been trying to make a game which involves a planet and the simulated inhabitance there-of, and have had some troubles with using love.graphics.scale to zoom in and out with the middle scroller mouse button thing.
I have it changing a variable up or down depending on which way you scroll and I have it zooming in an out, but I can't figure out how to stop love.graphics.scale from scaling everything else after the planet and it's inhabitants, so the mouse (which obviously has to go over everything) is scaled with the rest of it.
I tried doing
to set the graphics' scale back to normal before it draws the mouse but that didn't do anything.
I'm welcome to any alternatives to love.graphics.scale and some help with layering different things in the same way you can layer movieclips in flash.
I had a look into framebuffers but got a bit confused due to the lack of examples on the wiki.
Here's the perpetrator:
Thanks
J
I have it changing a variable up or down depending on which way you scroll and I have it zooming in an out, but I can't figure out how to stop love.graphics.scale from scaling everything else after the planet and it's inhabitants, so the mouse (which obviously has to go over everything) is scaled with the rest of it.
I tried doing
Code: Select all
love.graphics.scale(1)
I'm welcome to any alternatives to love.graphics.scale and some help with layering different things in the same way you can layer movieclips in flash.
I had a look into framebuffers but got a bit confused due to the lack of examples on the wiki.
Here's the perpetrator:
Code: Select all
if area == "ingame" then
love.graphics.scale(scale)
love.graphics.setColor(51, 204, 102, 255)
love.graphics.setBlendMode("alpha")
love.graphics.setColorMode("modulate")
love.graphics.circle("fill", 640, 400, 500, 500)
end
love.graphics.scale(1)
love.graphics.draw(p, 0, 0)
J