Camera System
Posted: Mon Jan 10, 2011 9:15 am
Hey everyone, I finally decided to sign up to the forums after much lurking. I've been using Love for some weeks now and I'm enjoying it very much. I've been working on a classic RPG and a small platformer game involving lovely cats, though I've stumbled upon my first real problem. How does one implement a camera system in Love?
My previous attempt for my platformer which uses love.physics was using love.graphics.translate inside the love.draw function which moves the level when the player goes left or right. I found this causes some issues though, like when using a tilemap, little lines will jitter between the tile edges. So I found this solution to be kind of a hack, looking through the source of other Love games, I couldn't find anyone else using this solution either.
I suppose I don't really want to move the world in the first place, not when using physics, just the view.
How does one manipulate the love.draw function using a camera which follows the player through a level? I hope my description isn't too vague. Thanks!
My previous attempt for my platformer which uses love.physics was using love.graphics.translate inside the love.draw function which moves the level when the player goes left or right. I found this causes some issues though, like when using a tilemap, little lines will jitter between the tile edges. So I found this solution to be kind of a hack, looking through the source of other Love games, I couldn't find anyone else using this solution either.
I suppose I don't really want to move the world in the first place, not when using physics, just the view.
How does one manipulate the love.draw function using a camera which follows the player through a level? I hope my description isn't too vague. Thanks!