I put my own values in it and pull their values in and use them. I was going to ask but I figured I would try it first. And it works.
Should it not?
Bring back readline!
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Bring back readline!
Probably the only thing you really get from the config file that you can't do in load() is not opening a window if you don't need one. You could add an optional "config()" function to the script and make sure it runs before you open a window. This would make the code lighter (no need to maintain an extra parser) and faster (one file to parse, at least initially).
If you are going to let people change the mainloop code then they can do it themselves, as long as opening the window is explicit (or at least can be overridden with "love.system.openWindow(false)" or something similar).
If you are going to let people change the mainloop code then they can do it themselves, as long as opening the window is explicit (or at least can be overridden with "love.system.openWindow(false)" or something similar).
Re: Bring back readline!
People will be able to take control over the main loop, but some code still needs to run before main.lua is loaded. For instance, the PhysFS search directories and write directory must be set (and the functions for setting them must self-destruct).
Also, the whole love_version thing could be solved like this, which makes config files even more redundant.
Also, the whole love_version thing could be solved like this, which makes config files even more redundant.
Code: Select all
function load()
love.system.checkVersion("0.5.0") -- Cause error if incompatible.
end
Re: Bring back readline!
Are we actually deciding to remove the config file completely and just give people more control over how LÖVE works? I'm not sure I favor this decree. Of course, it's great that people CAN change the window size within LÖVE, but I want to be able to write it into the file and then forget about it. The config file MAKES SENSE to me... then again, I've been wrong before.
Now posting IN STEREO (where available)
Re: Bring back readline!
I think the config file makes sense, if it can be left out of the .love file and still work. That way i can actually edit it to change the behaviour of my game without "recompiling."
Re: Bring back readline!
See my patch to support comments : http://love2d.org/forum/viewtopic.php?f=4&t=195mike wrote:Wait... we can have comments in the config files????
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
Re: Bring back readline!
This is only my opinion (as usual), but I prefer a single mechanism. It's easier on my brain.
My preferred solution is to have LÖVE's default main-loop function dofile "game.conf", then create the window (using the parameters from the config file), then run load() etc. That way, the behaviour will be pretty much the same, but with two advantages: 1. custom parameters and 2. control over this mechanism (in case I don't want game.conf).
It's not like the current situation is so bad. It's quite good, really. It's just that LÖVE has two very similar (to a point, of course) parsers. After comments, people might start expecting simple expression evaluation ("I want to have width = 1.5 * height") etc. Maintaining (and extending) an extra parser is a pain, especially when you get one for free (with good documentation, tutorials, etc.)
My preferred solution is to have LÖVE's default main-loop function dofile "game.conf", then create the window (using the parameters from the config file), then run load() etc. That way, the behaviour will be pretty much the same, but with two advantages: 1. custom parameters and 2. control over this mechanism (in case I don't want game.conf).
It's not like the current situation is so bad. It's quite good, really. It's just that LÖVE has two very similar (to a point, of course) parsers. After comments, people might start expecting simple expression evaluation ("I want to have width = 1.5 * height") etc. Maintaining (and extending) an extra parser is a pain, especially when you get one for free (with good documentation, tutorials, etc.)
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest