Importing a backround

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.
Post Reply
User avatar
pactace
Prole
Posts: 38
Joined: Fri Jan 30, 2015 1:25 am

Importing a backround

Post by pactace »

Hey Im trying to Import a background that moves in my game. If anyone could I'd be thankful for some help
Very new programmer dont judge
Joe Black
Prole
Posts: 39
Joined: Wed Jan 21, 2015 1:57 pm

Re: Importing a backround

Post by Joe Black »

to import an image you can use love.graphics.newImage(filename)
image is a drawable.
So you can draw it with love.graphics.draw.

if you want to move the background while time passing update the coordonnate in love.update.

I don't really know what you want to know, it seems you need to understand the basic function of love.
to do so look at the tutorial in the wiki.
or be more precise so I could help you better.
User avatar
pactace
Prole
Posts: 38
Joined: Fri Jan 30, 2015 1:25 am

Re: Importing a backround

Post by pactace »

sorry for not being specific I meant to say I needed to make the background move while the player is moving
Very new programmer dont judge
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Importing a backround

Post by Positive07 »

If you post no code nor a .love file we can't help you!
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Importing a backround

Post by kikito »

I think he's asking how to make scrolling. Is that what you are asking, pactace?
When I write def I mean function.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Importing a backround

Post by Positive07 »

Yeah but it will depend on his character movement, plus his questions are more like: "Do me a background that scroll"

If it is what kikito asked then check gamera his camera library
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
pactace
Prole
Posts: 38
Joined: Fri Jan 30, 2015 1:25 am

Re: Importing a backround

Post by pactace »

Sorry Im a new programmer I started about 3 weeks ago so I dont know alot about the programming laguage and yes I am asking for a scrolling backround
Very new programmer dont judge
Joe Black
Prole
Posts: 39
Joined: Wed Jan 21, 2015 1:57 pm

Re: Importing a backround

Post by Joe Black »

In order to learn the lua language check the main page of the wiki.
To make your hand with löve you must try the tutorials.

The camera tutorial will help you to move your background.

see this code for example.
Attachments
scrolling.love
(667.2 KiB) Downloaded 49 times
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests