Configuration for users

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.
Post Reply
User avatar
murks
Party member
Posts: 185
Joined: Tue Jun 03, 2014 4:18 pm

Configuration for users

Post by murks »

Hi there.
I was wondering how to best provide configuration for users.
Giving the user access to conf.lua would be nice, mainly because the user could set the resolution, fullscreen mode, etc. and have the game start with those settings. I was thinking of keeping the conf.lua in the same directory as the game itself, but I suppose that this is impossible due to the restrictions imposed by love.filesystem. However, I can't expect users to unpackage and repackage the game just to change a setting.

How do you solve this problem?
User avatar
Jack5500
Party member
Posts: 149
Joined: Wed Dec 07, 2011 8:38 pm
Location: Hamburg, Germany

Re: Configuration for users

Post by Jack5500 »

I used my own config, as far as I remember. You can set these settings via code. With toggleFullscreen you could just add it to your options menu and save that in an external config file, which you could load on startup.
Now that I think about it...a library for that would be nice indeed. :awesome:
User avatar
murks
Party member
Posts: 185
Joined: Tue Jun 03, 2014 4:18 pm

Re: Configuration for users

Post by murks »

Wouldn't loading the setting from a config file first apply the settings of conf.lua and then switch to the settings of the config file afterwards?

Ideally conf.lua would read some settings (for example fullscreen) from the custom config file if available, so that the game starts in the correct mode right away. Is this possible?

I'd still need to expose the settings in the game itself, but I guess I can live with that.
User avatar
mickeyjm
Party member
Posts: 237
Joined: Thu Dec 29, 2011 11:41 am

Re: Configuration for users

Post by mickeyjm »

You could disable the window in conf.lua then, when loading the config file, create the screen with the right settings to prevent a different window appearing briefly
Your screen is very zoomed in...
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 56 guests