Questions about Löve's source code structure

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Questions about Löve's source code structure

Post 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 :neko:
Last edited by T-Bone on Sun Mar 15, 2015 5:23 am, edited 1 time in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: A question for the Löve developers

Post 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.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: A question for the Löve developers

Post 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!
Last edited by T-Bone on Sat Mar 14, 2015 3:10 pm, edited 1 time in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: A question for the Löve developers

Post by bartbes »

Ah, my bad, I thought mobile-common had already nuked DevIL from magpie.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: A question for the Löve developers

Post 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 :P
Last edited by T-Bone on Sat Mar 14, 2015 3:12 pm, edited 1 time in total.
User avatar
slime
Solid Snayke
Posts: 3172
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: A question for the Löve developers

Post 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.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: A question for the Löve developers

Post 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 :P Makes sense. Are the images it uses in there somewhere?
User avatar
slime
Solid Snayke
Posts: 3172
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: A question for the Löve developers

Post 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. :)
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: A question for the Löve developers

Post 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...
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: A question for the Löve developers

Post by davisdude »

There used to be a place where all the IRC chats were stored, but that stopped some time in 2012...
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Post Reply

Who is online

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