Page 1 of 4
Questions about Löve's source code structure
Posted: Sat Mar 14, 2015 2:47 pm
by T-Bone
So I'm currently investigating the (promising!) possibility of porting Löve to WinRT/Windows Phone (and possibly the Xbox One, depending on how the Windows 10 apps API looks). There are a few things that confuse me about Löve's source code, and I'd love to get them cleared up to give me a better sense of understanding of how Löve works internally.
1. One of Löve's dependencies, PhysFS, is used inside src/modules/filesystem/physfs/File.h. I don't see it in src/libraries, so I'm assuming it's an external dependency. But when I download a compiled Windows binary, it's not shipped as a .dll file either. Where is it? How is it included? The same question for FreeType as well. And Vorbis.
2. Is there any specific reasons Löve primarily uses DevIL for image loading, rather than, say, SDL_image? DevIL doesn't seem to be supported on WinRT/WP, so I'll probably have to write my own FormatHandler, based on SDL_image (or some other image library). Basically what I'm wondering is if there are any practical reasons that won't be possible.
3. If this project succeeds, I will probably make a fork of Löve 0.10.0 once that's finished (for the "official" GLES support mainly). Assuming there are no changes when running on other platforms, would you be interested in merging it into the main Löve code at some point? This is mostly for me to plan how I should set up my project if/once it starts to
I'm absolutely going to come up with more questions as I go along too
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 3:01 pm
by bartbes
T-Bone wrote:
1. One of Löve's dependencies, PhysFS, is used inside src/modules/filesystem/physfs/File.h. I don't see it in src/libraries, so I'm assuming it's an external dependency. But when I download a compiled Windows binary, it's not shipped as a .dll file either. Where is it? How is it included? The same question for FreeType as well. And Vorbis.
It's compiled in. dlls are dynamically linked libraries (hence the name), the other modules are compiled to statically linked libraries, then linked into the final binary.
T-Bone wrote:
2. Is there any specific reasons Löve primarily uses DevIL for image loading, rather than, say, SDL_image? DevIL doesn't seem to be supported on WinRT/WP, so I'll probably have to write my own FormatHandler, based on SDL_image (or some other image library). Basically what I'm wondering is if there are any practical reasons that won't be possible.
3. If this project succeeds, I will probably make a fork of Löve 0.10.0 once that's finished (for the "official" GLES support mainly). Assuming there are no changes when running on other platforms, would you be interested in merging it into the main Löve code at some point? This is mostly for me to plan how I should set up my project if/once it starts to
You might want to check out the
mobile-common branch of love-experiments. It's what all mobile ports on are based on, and it's got most of the things 0.10.0 is going to have (though possibly reimplemented). For one it's already switched from devil to magpie (our own image loader), so that shouldn't be a problem either. Regardless, compiling DevIL really shouldn't be hard.
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 3:06 pm
by T-Bone
bartbes wrote: For one it's already switched from devil to magpie (our own image loader), so that shouldn't be a problem either. Regardless, compiling DevIL really shouldn't be hard.
Wait, I though Magpie was just a wrapper for mutliple image libraries? I mean, DevilHandler is still there in the source code. Is it unused?
Thanks for those quick answers, you've helped make things a lot more clear
Another question: Where's the "no game" source code stored in the source? I can't find it anywhere!
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 3:08 pm
by bartbes
Ah, my bad, I thought mobile-common had already nuked DevIL from magpie.
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 3:12 pm
by T-Bone
Well, the mobile-common branch has got custom PNG and JPEG loaders as well so I guess isn't necessary to run it, unless you want support for lots of rarely used formats
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 3:12 pm
by slime
You can disable compilation of DevilHandler in the mobile-common branch by enabling a preprocessor define.
T-Bone wrote:Another question: Where's the "no game" source code stored in the source? I can't find it anywhere!
src/scripts/boot.lua.
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 3:14 pm
by T-Bone
slime wrote:You can disable compilation of DevilHandler in the mobile-common branch by enabling a preprocessor define.
T-Bone wrote:Another question: Where's the "no game" source code stored in the source? I can't find it anywhere!
src/scripts/boot.lua.
Ah, I wondered what all that hex stuff was
Makes sense. Are the images it uses in there somewhere?
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 3:18 pm
by slime
Yeah (stored as base64-encoded strings inside boot.lua.)
If you join the IRC channel you might have your questions answered more quickly.
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 4:31 pm
by T-Bone
slime wrote:Yeah (stored as base64-encoded strings inside boot.lua.)
If you join the IRC channel you might have your questions answered more quickly.
Considering how fast all my questions got answered here, speed certainly isn't an issue
but I can see why asking tons of questions here could be considered "spammy". But then on the other hand, these answers could be useful for others as well...
Re: A question for the Löve developers
Posted: Sat Mar 14, 2015 4:58 pm
by davisdude
There used to be a place where all the IRC chats were stored, but that stopped some time in 2012...