Include lsqlite3 in 0.9.0 or later

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.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Include lsqlite3 in 0.9.0 or later

Post by kikito »

I'm against. I don't think it adds enough to warrant the extra dependencies and dev time. I think the advantages miko and kyle have listed are overstated and would help only a minority of devs.
When I write def I mean function.
Kyle
Party member
Posts: 146
Joined: Sat Mar 16, 2013 9:46 pm

Re: Include lsqlite3 in 0.9.0 or later

Post by Kyle »

kikito wrote:I'm against. I don't think it adds enough to warrant the extra dependencies and dev time. I think the advantages miko and kyle have listed are overstated and would help only a minority of devs.
It's a very small library and the only dependencies are sqlite3 and Lua. It's implemented as a Lua module. In fact, rebuilding LOVE isn't even necessary - the only issue is that I don't have the resources to build a .so and whatever OS X uses. It'd be much, much more convenient if it was just included in the repo. Besides, LOVE already has a crazy amount of dependencies, what's one more? And who knows, maybe you'll come up with an idea that'd benefit from it. We should be opening doors, not keeping them closed because it's "too much work" when in fact... it's really not.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Include lsqlite3 in 0.9.0 or later

Post by josefnpat »

I am a heavy SQL user and can say that having an SQL system in a game framework would be a great thing.

Love has the library luasocket2 includeded because it's rather easy to use and it serves a vital function in games (multiplayer).

The way to include libraries that aren't in love is a little bothersome, but possible; Including extra binary libraries or requiring the user to install libraries via something like luarocks.

But, here's the crux of the issue;

The difference between luasocket2 and other libraries such as LuaSec(https) and lsqlite3 is that they are not easy to use, or even commonly used. On top of that, they add requirements to the makefile and will in the end (via binary or additional libraries) make the footprint larger. The love frameworks trys to give a user the bare essentals for making video games (thus libraires exist) and in my opinion, luasocket2 is one of the rare exceptions, due to the fact that it provides a networking interface.

But, as an SQL user, I would be very happy to have some extra libraries such as lsqlite3 and LuaSec, but totally understand why the developers don't want to bloat the framework.

Perhaps a compromise might be in order?

Why can't we add some compile flags to the engine to allow libraries to be included? e.g. --use-lsqlite3 and --use-luasec? Since any serious game developer is going to want to distribute the binary with the game anyway, why not have an easy way for developers to make alternate binaries with flags?
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Include lsqlite3 in 0.9.0 or later

Post by Boolsheet »

Kyle wrote:Besides, LOVE already has a crazy amount of dependencies, what's one more? And who knows, maybe you'll come up with an idea that'd benefit from it. We should be opening doors, not keeping them closed because it's "too much work" when in fact... it's really not.
Crazy amount? I don't think so. There's Box2D, GLee, LuaSocket, UTF8-CPP (which are included in the LÖVE source) and SDL, DevIL, FreeType, libmodplug, libvorbis, mpg123, OpenAL, PhysicsFS. Most of those libraries do something very specific and are required to get the functions of the current LÖVE modules. I also don't think it's about the amount of them, but if a dependency is actively used by LÖVE and the lovers (in a proper way, hopefully). Nobody says that a database interface would not be useful.

I'm not sure how the developers feel about just slapping the Lua module into it. Yes, I know there's LuaSocket, but that has been in there for a while. There were discussions about a network module and actual implementations are popping up now.

In the end, it's up to the developers if they decide to open this door for their project. I'm pretty sure they're aware what a database can do for LÖVE. You may be able to increase the chance to get this included by showing an example or even an implementation, though it's possible that this is work could get a simple no as an answer. I'm assuming you keep your expectations at a reasonable level.

Edit:
josefnpat wrote:Why can't we add some compile flags to the engine to allow libraries to be included? e.g. --use-lsqlite3 and --use-luasec? Since any serious game developer is going to want to distribute the binary with the game anyway, why not have an easy way for developers to make alternate binaries with flags?
Only Linux has a proper package system and there should be quite a few prebuilt binaries of Lua modules and their dependencies on the internet.
Shallow indentations.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Include lsqlite3 in 0.9.0 or later

Post by josefnpat »

Boolsheet wrote:Only Linux has a proper package system and there should be quite a few prebuilt binaries of Lua modules and their dependencies on the internet.
I am not familliar with building stuff on os-x and windows. Are you telling me that windows and OS X don't use the makefile to build the framework?
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Include lsqlite3 in 0.9.0 or later

Post by Boolsheet »

Well, I don't think the official binaries for OS X and Windows were built with the autotools. You certainly can use the autotools on OS X and on Windows with Cygwin or MinGW, but I'm not sure what this has to do with it. The lover would still require all the target platforms or go with cross-compiling. (I'm under the impression that proper cross-compiling is a black art.) Your suggestion also requires that the Lua module is already present on the system or included in the LÖVE source. LuaSec comes with the OpenSSL dependency and I very much doubt that's going into the LÖVE repository.

Then again, the Lua module loader already solves this problem for us. The least painful way is distributing prebuilt binaries, I guess. Or not supporting that platform since the lover can't test on it...
Shallow indentations.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Include lsqlite3 in 0.9.0 or later

Post by bartbes »

Yes, I've thought of this, but I quickly realized that generally a proper relational database is like trying to subtly tail people in an australian road train, then again, I guess the same goes for box2d..
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Include lsqlite3 in 0.9.0 or later

Post by Jasoco »

I think the less dependencies the better. Especially if we EVER plan on having proper releases on other devices like iOS, Android and the many other smaller indie kickstarted game consoles that keep coming out.

The more dependencies you add, the harder it would be to port to them.
Kyle
Party member
Posts: 146
Joined: Sat Mar 16, 2013 9:46 pm

Re: Include lsqlite3 in 0.9.0 or later

Post by Kyle »

Jasoco wrote:I think the less dependencies the better. Especially if we EVER plan on having proper releases on other devices like iOS, Android and the many other smaller indie kickstarted game consoles that keep coming out.

The more dependencies you add, the harder it would be to port to them.
Like I said, Android comes with SQLite built in. iOS is probably a similar situation.
User avatar
daviddoran
Prole
Posts: 30
Joined: Sun Mar 24, 2013 5:35 am

Re: Include lsqlite3 in 0.9.0 or later

Post by daviddoran »

My two cents because I see both sides:
  • I can see reasons why SQLite would be useful in a game. Querying over a set of data (e.g. get all the ships owned by the enemy and with health < 10 that have shields disabled), transactions, etc. For every made-up use case I can come up with there are probably many more that arise in practice.
  • A file-backed SQLite database takes a lot of the burden of loading/saving and maintaining consistency away from the developer.
  • It's okay for the devs not to include a library if they feel it's not a common requirement. Every dependency adds complexity.
  • Both iOS and Android provide SQLite database access to applications.
  • SQLite would add about 400KiB to the binary.
Note: In my experience, it's much more difficult to manage an SQLite database on a remote installation (e.g. a smartphone or game install) than something like JSON or a document DB. Schema migrations are a PITA and they just feel very rigid. Your mileage may vary though.

Personally I vote (whatever weight that carries) not to include SQLite into Love. I'm sure the devs will be more than willing to help anyone who wants to include SQLite in their build of Love.
Post Reply

Who is online

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