Page 1 of 1
Help :)
Posted: Mon Jan 09, 2012 5:14 pm
by abraxoseh
How to put customize background image in love engine
im new to this engine:) MANY THANKS
Re: Help :)
Posted: Mon Jan 09, 2012 6:22 pm
by Robin
You simply draw an image on 0, 0. See
love.graphics.draw.
If you just want another colour as background, you can use
love.graphics.setBackgroundColor
Re: Help :)
Posted: Mon Jan 09, 2012 6:39 pm
by Nixola
As Robin said, you can simply draw an image in 0,0, but before drawing/printing anything else
Re: Help :)
Posted: Mon Jan 09, 2012 7:09 pm
by MarekkPie
Nixola wrote:but before drawing/printing anything else
Be sure you do this. If you do:
Code: Select all
love.graphics.draw(player, ...)
love.graphics.draw(background, ...)
The player won't be seen The draw order is back-to-front.
Re: Help :)
Posted: Mon Jan 09, 2012 8:09 pm
by Jasoco
Learn to layer. Draw your background stuff first. Then your player and enemies and other objects. Then anything you might want overlayed, like in-game details like tree leaves or the tops of houses. And lastly, HUD text.
The order you draw in, the order it gets drawn. Easy as that.