I would like to organize my art assets for my game. But, I realized that they will not be found if I put them within a subfolder located in the folder containing my main.lua. For example, if I create a folder for my art assets, then put one of my sprites in there and run the following line:
sprite= love.graphics.newImage("sprite.png"),
Then, it will display the error:
Could not open file sprite.png. Does not exist.
Is there a way for me to have my assets in subfolders so that my game-related files are not so cluttered and unorganized?
Asset(s) Located In Subfolders
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Asset(s) Located In Subfolders
Sure. For example:
sprite = love.graphics.newImage("sprites/sprite.png")
background = love.graphics.newImage("backgrounds/something.png")
It is not only a matter of better organizing. Imagine you have two files with the same name...
sprite = love.graphics.newImage("sprites/sprite.png")
background = love.graphics.newImage("backgrounds/something.png")
It is not only a matter of better organizing. Imagine you have two files with the same name...
Who is online
Users browsing this forum: Bing [Bot] and 5 guests