Loading external graphics outside of love?

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
Chris016
Prole
Posts: 22
Joined: Sat Aug 16, 2008 1:58 am

Loading external graphics outside of love?

Post by Chris016 »

So i compile everything into a exe. I learned how to run external lua files which was pretty easy using the default lua io commands. Does anyone know how to do external images so people could say mod there players character and i could have the love load them externally?

btw im using love 0.5.0 im sure that shoudnt really matter for the help but just thought i throw that out there.
User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: Loading external graphics outside of love?

Post by napco »

You can load files from 2 places only: the .love file and the save directory. You can get the path to this folder by using the command:

Code: Select all

love.filesystem.getSaveDirectory()
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Loading external graphics outside of love?

Post by Robin »

napco wrote:You can load files from 2 places only: the .love file and the save directory. You can get the path to this folder by using the command:

Code: Select all

love.filesystem.getSaveDirectory()
Actually, both are accessible as the current directory (.). So if you have an image with the name "~/.love/mygame/awesome.png"*, you can load it as "awesome.png"

* Assuming you're on Linux/UNIX. For Windows, the story is similar.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Loading external graphics outside of love?

Post by bartbes »

With 0.6.0 you can load images from strings too, thus making loading external files possible too.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], GoldenTCat, Google [Bot] and 5 guests