Hello! I've setup LDK for use with LOVE, and I setup subfolders in the project (audio, graphics, lua, etc...).
However, when I do "love.graphics.newImage("maingame/graphics/test.png") and run, it says it couldn't be found.
How would I get this to work properly? Or am I doing something horridly wrong?
Here is a picture:
LDK - File system and usage?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: LDK - File system and usage?
You're on Windows, aren't you? Maybe it doesn't understand the / in the path. If I remember correctly, you can use dots. Like this: "maingame.graphics.pic.png". Otherwise, you probably need backslashes (\)
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: LDK - File system and usage?
Dots can be only used inside 'require'
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: LDK - File system and usage?
And the love.filesystem only works with forward slashes.
Do these folders really exist or are those just tags/subcategories/filters that do not actually affect the position of the file in the filesystem?
Do these folders really exist or are those just tags/subcategories/filters that do not actually affect the position of the file in the filesystem?
Shallow indentations.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: LDK - File system and usage?
I see a small arrow on the lower right of test.png's icon. Have you copied the real test.png there, or have you created a "direct access" (or whatever windows calls them now) instead? The image should work, the direct access should fail.
When I write def I mean function.
Re: LDK - File system and usage?
I think Windows added proper symlink support in Win7 (or was it Vista?), but I don't think it's used by default from the GUI. So that's probably a "link" (as in a .lnk file) and yeah, that doesn't work.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 8 guests