Help :)

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
abraxoseh
Prole
Posts: 1
Joined: Mon Jan 09, 2012 4:43 pm

Help :)

Post by abraxoseh »

How to put customize background image in love engine :) im new to this engine:) MANY THANKS
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Help :)

Post 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
Help us help you: attach a .love.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Help :)

Post by Nixola »

As Robin said, you can simply draw an image in 0,0, but before drawing/printing anything else
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
MarekkPie
Inner party member
Posts: 587
Joined: Wed Dec 28, 2011 4:48 pm
Contact:

Re: Help :)

Post 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.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Help :)

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests