Difference between revisions of "Config Files (Deutsch)"

(Rechtschreibfehler korrigiert)
(Update german translation.)
 
(3 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
== love.conf ==
 
== love.conf ==
  
Der Funktion <code>love.conf</code> wird ein Argument übergeben: Eine Tabelle, die alle Standardeinstellungen beinhaltet, die du nach deinem Gutdünken überschreiben kannst. Wenn du die Standardfenstergröße ändern willst, tu folgendes (Dieser Code setzt die Standardfenstergröße auf 1024×768 Pixel):
+
Der Funktion <code>love.conf</code> wird ein Argument übergeben: Eine Tabelle, welche alle Standardeinstellungen beinhaltet, die du nach Belieben überschreiben kannst. Der folgende Code würde zum Beispiel die Standardfenstergröße auf 1024x768 Pixel ändern:
 
<source lang="lua">
 
<source lang="lua">
 
function love.conf(t)
 
function love.conf(t)
Line 21: Line 21:
 
</source>
 
</source>
  
Es wird empfohlen, unbenutzte Module auf <code>false</code> zu setzen, wenn du dein Spiel veröffentlichst, da sich dadurch die Startgeschwindigkeit und der Verbrauch des Arbeitsspeichers ein geringfügig verringert.
+
Es wird empfohlen, unbenutzte Module auf <code>false</code> zu setzen, wenn du dein Spiel veröffentlichst, da sich dadurch die Startgeschwindigkeit und der Verbrauch des Arbeitsspeichers (geringfügig) verringert.
  
Hier ist eine komplette Liste der möglichen Optionen und ihrer Standardwerte:
+
Beachte, dass du [[love.filesystem (Deutsch)|love.filesystem]] nicht abschalten kannst, da es zwingend vorhanden sein muss. Dasselbe gilt auch für das [[love (Deutsch)|love]]-Modul selbst. Auch [[love.graphics (Deutsch)|love.graphics]] und [[love.window (Deutsch)|love.window]] müssen aktiviert sein.
<source lang="lua">  
+
 
 +
== Aktuelle Konfigurationsdatei ==
 +
Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE [[0.9.2]]:
 +
<source lang="lua">
 
function love.conf(t)
 
function love.conf(t)
     t.title = "Titellos"       -- Der Titel des Fensters in dem das Spiel läuft (string)
+
     t.identity = nil                  -- The name of the save directory (string)
     t.author = "Namenlos"       -- Der Spielautor (string)
+
    t.version = "0.9.2"               -- The LÖVE version this game was made for (string)
     t.identity = nil           -- Der Name des Spielverzeichnisses (string)
+
     t.console = false                  -- Attach a console (boolean, Windows only)
     t.version = 0               -- Die LÖVE-Version, mit welcher das Spiel programmiert wurde (number)
+
 
     t.console = false           -- Startet mit dem Spiel auch eine Konsole (boolean, nur unter Windows)
+
    t.window.title = "Untitled"       -- The window title (string)
     t.screen.width = 800        -- Die Fensterbreite (number)
+
     t.window.icon = nil               -- Filepath to an image to use as the window's icon (string)
     t.screen.height = 600      -- Die Fensterhöhe (number)
+
     t.window.width = 800               -- The window width (number)
     t.screen.fullscreen = false -- Schaltet den Vollbildschirm-Modus ein (boolean)
+
    t.window.height = 600              -- The window height (number)
     t.screen.vsync = true       -- Schaltet Vsync an (boolean)
+
     t.window.borderless = false        -- Remove all border visuals from the window (boolean)
     t.screen.fsaa = 0          -- Die Anzahl der FSAA-buffer (number)
+
    t.window.resizable = false         -- Let the window be user-resizable (boolean)
     t.modules.joystick = true  -- Schaltet das Joystick-Modul ein (boolean)
+
     t.window.minwidth = 1              -- Minimum window width if the window is resizable (number)
     t.modules.audio = true     -- Schaltet das Audio-Modul ein (boolean)
+
     t.window.minheight = 1            -- Minimum window height if the window is resizable (number)
     t.modules.keyboard = true   -- Schaltet das Tastatur-Modul ein (boolean)
+
     t.window.fullscreen = false       -- Enable fullscreen (boolean)
     t.modules.event = true     -- Schaltet das Event-Modul ein (boolean)
+
    t.window.fullscreentype = "normal" -- Standard fullscreen or desktop fullscreen mode (string)
     t.modules.image = true     -- Schaltet das Bilder-Modul ein(boolean)
+
     t.window.vsync = true             -- Enable vertical sync (boolean)
     t.modules.graphics = true   -- Schaltet das Grafik-Modul ein (boolean)
+
     t.window.fsaa = 0                 -- The number of samples to use with multi-sampled antialiasing (number)
     t.modules.timer = true     -- Schaltet das Timer-Modul ein (boolean)
+
    t.window.display = 1              -- Index of the monitor to show the window in (number)
     t.modules.mouse = true     -- Schaltet das Maus-Modul ein (boolean)
+
    t.window.highdpi = false           -- Enable high-dpi mode for the window on a Retina display (boolean)
     t.modules.sound = true     -- Schaltet das Maus-Modul ein (boolean)
+
    t.window.srgb = false              -- Enable sRGB gamma correction when drawing to the screen (boolean)
     t.modules.physics = true   -- Schaltet das Physik-Modul ein (boolean)
+
    t.window.x = nil                  -- The x-coordinate of the window's position in the specified display (number)
 +
     t.window.y = nil                  -- The y-coordinate of the window's position in the specified display (number)
 +
 
 +
     t.modules.audio = true             -- Enable the audio module (boolean)
 +
     t.modules.event = true             -- Enable the event module (boolean)
 +
     t.modules.graphics = true         -- Enable the graphics module (boolean)
 +
     t.modules.image = true             -- Enable the image module (boolean)
 +
    t.modules.joystick = true          -- Enable the joystick module (boolean)
 +
     t.modules.keyboard = true         -- Enable the keyboard module (boolean)
 +
     t.modules.math = true             -- Enable the math module (boolean)
 +
     t.modules.mouse = true             -- Enable the mouse module (boolean)
 +
    t.modules.physics = true          -- Enable the physics module (boolean)
 +
     t.modules.sound = true             -- Enable the sound module (boolean)
 +
    t.modules.system = true            -- Enable the system module (boolean)
 +
     t.modules.timer = true            -- Enable the timer module (boolean)
 +
    t.modules.window = true           -- Enable the window module (boolean)
 +
    t.modules.thread = true            -- Enable the thread module (boolean)
 
end
 
end
 
</source>
 
</source>
  
Beachte bitte, dass du [[love.filesystem]] nicht ausschalten kannst, da es zwingend vorhanden sein muss. Dasselbe gilt auch für das [[love]]-Modul selbst.
+
== Flags ==
 +
==== identity ====
 +
Diese Option bestimmt den Namen des Speicherordners deines Spiels. Du kannst jedoch nur den Namen, nicht aber das Verzeichnis bestimmen, in dem Dateien gespeichert werden sollen:
 +
<source lang="lua">
 +
t.identity = "gabe_HL3" -- Richtig
 +
t.identity = "c:/Users/gabe/HL3" -- Falsch
 +
</source>
 +
Alternativ kann [[love.filesystem.setIdentity (Deutsch)|love.filesystem.setIdentity]] verwendet werden um den Speicherordner außerhalb der Konfigurationsdatei zu bestimmen.
 +
 
 +
==== version ====
 +
{{newin|[[0.8.0]]|080|type=flag}}
 +
<code>t.version</code> sollte ein [[string (Deutsch)|String]] sein, welcher die Version von LÖVE repräsentiert, für die das Spiel entwickelt wurde. Er sollte wie folgt formatiert sein: <code>"''X.Y.Z''"</code> wobei <code>''X''</code> die Hauptversionsnummer, <code>''Y''</code> die Unterversion und <code>''Z''</code> die Revisionsnummer darstellt. Hierdurch kann LÖVE eine Warnung ausgeben, die den Spieler darauf hinweist, dass das Spiel nicht mit der installierten LÖVE-Version kompatibel ist.
 +
 
 +
==== console ====
 +
Bestimmt, ob neben dem Spielfenster zusätzlich eine Konsole geöffnet werden soll (Nur für Windowssystem verfügbar). Anmerkung: Auch auf OSX ist es möglich Konsolenoutput zu bekommen, indem man LÖVE über das Terminal laufen lässt.
 +
 
 +
==== window ====
 +
{{newin|[[0.9.0]]|090|type=flags|plural='y'}}
 +
Es ist möglich die Erstellung des Fensters solange aufzuschieben, bis [[love.window.setMode (Deutsch)|love.window.setMode]] das erste Mal im Code aufgerufen wird. Um dies zu bewerkstelligen muss in der Konfigurationsdatei <code>t.window = nil</code> (oder <code>t.screen = nil</code> in älteren Versionen) gesetzt werden. Vorsicht ist geboten, da LÖVE abstürzen kann, wenn eine Funktion aus [[love.graphics (Deutsch)|love.graphics]] aufgerufen wird, bevor das Fenster mit [[love.window.setMode (Deutsch)|love.window.setMode]] erstellt wurde.
 +
 
 +
==== window.title ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Bestimmt den Titel des Spielefensters. Alternativ kann [[love.window.setTitle (Deutsch)|love.window.setTitle]] verwendet werden.
  
 +
==== window.icon ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Ein Pfad der auf eine Bilddatei zeigt, welche als Symbol für das Spielefenster verwendet werden soll. Zu beachten ist hierbei, dass nicht alle Systeme mit großen Icons zurecht kommen. Das Icon kann auch über [[love.window.setIcon (Deutsch)|love.window.setIcon]] angepasst werden.
 +
 +
==== window.width & window.height ====
 +
{{newin|[[0.9.0]]|090|type=flags|plural='y'}}
 +
Bestimmt die Höhe und Breite des Spielefensters. Wenn diese Werte auf 0 gesetzt werden, wird LÖVE das Fenster automatisch an die Desktopdimensionen des Nutzers anpassen.
 +
 +
==== window.borderless ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Entfernt alle Fensterbegrenzungen. Beachte, dass die Effekte dieser Option abhängig vom Betriebssystem unterschiedlich ausfallen können.
 +
 +
==== window.resizable ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Bestimmt ob der Nutzer die Größe des Spielefensters verändern kann.
 +
 +
==== window.minwidth & window.minheight ====
 +
{{newin|[[0.9.0]]|090|type=flags|plural='y'}}
 +
Bestimmt die minimale Größe des Spielefensters. Diese Werte werden immer vorrangig gegenüber den Werten von <code>window.width</code> und <code>window.height</code> behandelt. LÖVE wird also immer die minimalen Dimensionen verwenden, welche via <code>window.minwidth</code> und <code>window.minheight</code> bestimmt wurden.
 +
 +
==== window.fullscreen ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Bestimmt ob das Spiel im Vollbildmodus (<code>true</code>) oder im Fenstermodus (<code>false</code>) gestartet werden soll. Der Vollbildmodus kann außerdem über [[love.window.setFullscreen (Deutsch)|love.window.setFullscreen]] oder [[love.window.setMode (Deutsch)|love.window.setMode]] verändert werden.
 +
 +
==== window.fullscreentype ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Bestimmt die [[FullscreenType (Deutsch)|Art]] des Vollbildmodus (<code>normal</code> oder <code>desktop</code>). Generell wird der <code>desktop</code> Modus empfohlen, da er auf einigen Systemene nicht so restriktiv ist wie der <code>normal</code> Modus.
 +
 +
==== window.vsync ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Aktiviert, bzw. deaktiviert die vertikale Synchronisation. Vsync versucht das Spiel bei einer konstanten Framerate zu halten und kann Probleme wie das "Screen Tearing" verhindern. Es wird empfohlen Vsync aktiviert zu lassen, wenn man nicht weiß, welche Auswirkungen das Abschalten mit sich führen kann.
 +
 +
==== window.fsaa ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Die Anzahl der Samples welche für das MSAA verwendet werden sollen.
 +
 +
==== window.display ====
 +
{{newin|[[0.9.0]]|090|type=flag}}
 +
Der Index des Monitors in dem das Spielefenster geöffnet werden soll, wenn mehrere Bildschirme verfügbar sind.
 +
 +
==== window.highdpi ====
 +
{{newin|[[0.9.1]]|091|type=flag}}
 +
Siehe [[love.window.getPixelScale (Deutsch)|love.window.getPixelScale]]. Diese Option sollte deaktiviert bleiben, solange das Spiel nicht auf einem Mac mit Retina-Display getestet werden kann, da einige Änderungen am Code vorgenommen werden müssen um alles korrekt darstellen zu können.
 +
 +
==== window.srgb ====
 +
{{newin|[[0.9.1]]|091|type=flag}}
 +
Wenn diese Option aktiviert ist, werden automatisch alle Farben die auf den Bildschirm gezeichnet werden vom linearen RGB-Farbraum in den sRGB-Farbraum umgewandelt - Die Fensteroberfläche wird als gamma-space sRGB behandelt. Da es sich um ein sehr fortgeschrittenes Thema handelt, sollte diese Option nur aktiviert werden, wenn man sich wirklich über die Auswirkungen im Klaren ist.
 +
 +
==== window.x & window.y ====
 +
{{newin|[[0.9.2]]|092|type=flags|plural='y'}}
 +
Bestimmt die Position des Spielefensters auf dem Bildschirm des Nutzers. Diese kann auch via [[love.window.setPosition (Deutsch)|love.window.setPosition]] verändert werden.
 +
 +
==== release ====
 +
{{newin|[[0.8.0]]|080|type=flag}}
 +
{{oldin|[[0.9.0]]|090|type=flag}}
 +
 +
Wenn <code>t.release</code> aktiviert ist, nutzt LÖVE den [[love.releaseerrhand (Deutsch)|"Release Error Handler"]], welcher überschrieben werden kann um weitere Informationen auszugeben.
 +
 +
Der Standard-Handler zeigt außerdem eine Nachricht an, über die der Entwickler benachrichtigt werden kann, indem es die <code>title, author</code> und <code>url</code> Werte aus der conf.lua benutzt.
 +
 +
== Older Versions ==
 +
Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE [[0.9.1]]:
 +
<source lang="lua">
 +
function love.conf(t)
 +
    t.identity = nil                  -- The name of the save directory (string)
 +
    t.version = "0.9.1"                -- The LÖVE version this game was made for (string)
 +
    t.console = false                  -- Attach a console (boolean, Windows only)
 +
 +
    t.window.title = "Untitled"        -- The window title (string)
 +
    t.window.icon = nil                -- Filepath to an image to use as the window's icon (string)
 +
    t.window.width = 800              -- The window width (number)
 +
    t.window.height = 600              -- The window height (number)
 +
    t.window.borderless = false        -- Remove all border visuals from the window (boolean)
 +
    t.window.resizable = false        -- Let the window be user-resizable (boolean)
 +
    t.window.minwidth = 1              -- Minimum window width if the window is resizable (number)
 +
    t.window.minheight = 1            -- Minimum window height if the window is resizable (number)
 +
    t.window.fullscreen = false        -- Enable fullscreen (boolean)
 +
    t.window.fullscreentype = "normal" -- Standard fullscreen or desktop fullscreen mode (string)
 +
    t.window.vsync = true              -- Enable vertical sync (boolean)
 +
    t.window.fsaa = 0                  -- The number of samples to use with multi-sampled antialiasing (number)
 +
    t.window.display = 1              -- Index of the monitor to show the window in (number)
 +
    t.window.highdpi = false          -- Enable high-dpi mode for the window on a Retina display (boolean)
 +
    t.window.srgb = false              -- Enable sRGB gamma correction when drawing to the screen (boolean)
 +
 +
    t.modules.audio = true            -- Enable the audio module (boolean)
 +
    t.modules.event = true            -- Enable the event module (boolean)
 +
    t.modules.graphics = true          -- Enable the graphics module (boolean)
 +
    t.modules.image = true            -- Enable the image module (boolean)
 +
    t.modules.joystick = true          -- Enable the joystick module (boolean)
 +
    t.modules.keyboard = true          -- Enable the keyboard module (boolean)
 +
    t.modules.math = true              -- Enable the math module (boolean)
 +
    t.modules.mouse = true            -- Enable the mouse module (boolean)
 +
    t.modules.physics = true          -- Enable the physics module (boolean)
 +
    t.modules.sound = true            -- Enable the sound module (boolean)
 +
    t.modules.system = true            -- Enable the system module (boolean)
 +
    t.modules.timer = true            -- Enable the timer module (boolean)
 +
    t.modules.window = true            -- Enable the window module (boolean)
 +
    t.modules.thread = true            -- Enable the thread module (boolean)
 +
end
 +
</source>
 +
 +
Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE [[0.9.0]]:
 +
<source lang="lua">
 +
function love.conf(t)
 +
    t.identity = nil                  -- The name of the save directory (string)
 +
    t.version = "0.9.0"                -- The LÖVE version this game was made for (string)
 +
    t.console = false                  -- Attach a console (boolean, Windows only)
 +
 +
    t.window.title = "Untitled"        -- The window title (string)
 +
    t.window.icon = nil                -- Filepath to an image to use as the window's icon (string)
 +
    t.window.width = 800              -- The window width (number)
 +
    t.window.height = 600              -- The window height (number)
 +
    t.window.borderless = false        -- Remove all border visuals from the window (boolean)
 +
    t.window.resizable = false        -- Let the window be user-resizable (boolean)
 +
    t.window.minwidth = 1              -- Minimum window width if the window is resizable (number)
 +
    t.window.minheight = 1            -- Minimum window height if the window is resizable (number)
 +
    t.window.fullscreen = false        -- Enable fullscreen (boolean)
 +
    t.window.fullscreentype = "normal" -- Standard fullscreen or desktop fullscreen mode (string)
 +
    t.window.vsync = true              -- Enable vertical sync (boolean)
 +
    t.window.fsaa = 0                  -- The number of samples to use with multi-sampled antialiasing (number)
 +
    t.window.display = 1              -- Index of the monitor to show the window in (number)
 +
 +
    t.modules.audio = true            -- Enable the audio module (boolean)
 +
    t.modules.event = true            -- Enable the event module (boolean)
 +
    t.modules.graphics = true          -- Enable the graphics module (boolean)
 +
    t.modules.image = true            -- Enable the image module (boolean)
 +
    t.modules.joystick = true          -- Enable the joystick module (boolean)
 +
    t.modules.keyboard = true          -- Enable the keyboard module (boolean)
 +
    t.modules.math = true              -- Enable the math module (boolean)
 +
    t.modules.mouse = true            -- Enable the mouse module (boolean)
 +
    t.modules.physics = true          -- Enable the physics module (boolean)
 +
    t.modules.sound = true            -- Enable the sound module (boolean)
 +
    t.modules.system = true            -- Enable the system module (boolean)
 +
    t.modules.timer = true            -- Enable the timer module (boolean)
 +
    t.modules.window = true            -- Enable the window module (boolean)
 +
    t.modules.thread = true            -- Enable the thread module (boolean)
 +
end
 +
</source>
 +
 +
Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE [[0.8.0]]:
 +
<source lang="lua">
 +
function love.conf(t)
 +
    t.title = "Untitled"        -- The title of the window the game is in (string)
 +
    t.author = "Unnamed"        -- The author of the game (string)
 +
    t.url = nil                -- The website of the game (string)
 +
    t.identity = nil            -- The name of the save directory (string)
 +
    t.version = "0.8.0"        -- The LÖVE version this game was made for (string)
 +
    t.console = false          -- Attach a console (boolean, Windows only)
 +
    t.release = false          -- Enable release mode (boolean)
 +
    t.screen.width = 800        -- The window width (number)
 +
    t.screen.height = 600      -- The window height (number)
 +
    t.screen.fullscreen = false -- Enable fullscreen (boolean)
 +
    t.screen.vsync = true      -- Enable vertical sync (boolean)
 +
    t.screen.fsaa = 0          -- The number of FSAA-buffers (number)
 +
    t.modules.joystick = true  -- Enable the joystick module (boolean)
 +
    t.modules.audio = true      -- Enable the audio module (boolean)
 +
    t.modules.keyboard = true  -- Enable the keyboard module (boolean)
 +
    t.modules.event = true      -- Enable the event module (boolean)
 +
    t.modules.image = true      -- Enable the image module (boolean)
 +
    t.modules.graphics = true  -- Enable the graphics module (boolean)
 +
    t.modules.timer = true      -- Enable the timer module (boolean)
 +
    t.modules.mouse = true      -- Enable the mouse module (boolean)
 +
    t.modules.sound = true      -- Enable the sound module (boolean)
 +
    t.modules.physics = true    -- Enable the physics module (boolean)
 +
    t.modules.thread = true    -- Enable the thread module (boolean)
 +
end
 +
</source>
 +
 +
Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE [[0.7.2]] und früher:
 +
<source lang="lua">
 +
function love.conf(t)
 +
    t.title = "Untitled"        -- The title of the window the game is in (string)
 +
    t.author = "Unnamed"        -- The author of the game (string)
 +
    t.identity = nil            -- The name of the save directory (string)
 +
    t.version = 0              -- The LÖVE version this game was made for (number)
 +
    t.console = false          -- Attach a console (boolean, Windows only)
 +
    t.screen.width = 800        -- The window width (number)
 +
    t.screen.height = 600      -- The window height (number)
 +
    t.screen.fullscreen = false -- Enable fullscreen (boolean)
 +
    t.screen.vsync = true      -- Enable vertical sync (boolean)
 +
    t.screen.fsaa = 0          -- The number of FSAA-buffers (number)
 +
    t.modules.joystick = true  -- Enable the joystick module (boolean)
 +
    t.modules.audio = true      -- Enable the audio module (boolean)
 +
    t.modules.keyboard = true  -- Enable the keyboard module (boolean)
 +
    t.modules.event = true      -- Enable the event module (boolean)
 +
    t.modules.image = true      -- Enable the image module (boolean)
 +
    t.modules.graphics = true  -- Enable the graphics module (boolean)
 +
    t.modules.timer = true      -- Enable the timer module (boolean)
 +
    t.modules.mouse = true      -- Enable the mouse module (boolean)
 +
    t.modules.sound = true      -- Enable the sound module (boolean)
 +
    t.modules.physics = true    -- Enable the physics module (boolean)
 +
end
 +
</source>
 +
 +
== Siehe auch ==
 +
* [[parent::love (Deutsch)|love]]
 +
[[Category:LÖVE]]
 +
[[Category:Callbacks]]
 +
{{#set:Subcategory=General}}
 +
{{#set:Description=Die Konfigurationsdatei eines Spiels.}}
 +
{{#set:Since=000}}
 
== Andere Sprachen ==
 
== Andere Sprachen ==
 
{{i18n|Config_Files}}
 
{{i18n|Config_Files}}
 
[[Category:LÖVE]]
 

Latest revision as of 08:23, 22 March 2015

Einführung

Wenn eine Datei namens conf.lua in deinem Spielverzeichnis (oder deiner .love-Datei) existiert, wird sie ausgeführt, bevor die LOVE-Module geladen werden. Du kannst diese Datei dazu benutzen, um die Funktion love.conf zu überschreiben, welche später vom LÖVE-Boot-Skript aufgerufen wird. Wenn du die love.conf-Funktion benutzt, kannst du ein paar Konfigurationsoptionen setzten, Dinge wie die Standardfenstergröße ändern, einstellen, welche Module benutzt werden sollen u. v. m.

love.conf

Der Funktion love.conf wird ein Argument übergeben: Eine Tabelle, welche alle Standardeinstellungen beinhaltet, die du nach Belieben überschreiben kannst. Der folgende Code würde zum Beispiel die Standardfenstergröße auf 1024x768 Pixel ändern:

function love.conf(t)
    t.screen.width = 1024
    t.screen.height = 768
end

Wenn du beispielsweise das Physik- und Joystick-Modul nicht benötigst, könntest du folgenden Code verwenden:

function love.conf(t)
    t.modules.joystick = false
    t.modules.physics = false
end

Es wird empfohlen, unbenutzte Module auf false zu setzen, wenn du dein Spiel veröffentlichst, da sich dadurch die Startgeschwindigkeit und der Verbrauch des Arbeitsspeichers (geringfügig) verringert.

Beachte, dass du love.filesystem nicht abschalten kannst, da es zwingend vorhanden sein muss. Dasselbe gilt auch für das love-Modul selbst. Auch love.graphics und love.window müssen aktiviert sein.

Aktuelle Konfigurationsdatei

Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE 0.9.2:

function love.conf(t)
    t.identity = nil                   -- The name of the save directory (string)
    t.version = "0.9.2"                -- The LÖVE version this game was made for (string)
    t.console = false                  -- Attach a console (boolean, Windows only)

    t.window.title = "Untitled"        -- The window title (string)
    t.window.icon = nil                -- Filepath to an image to use as the window's icon (string)
    t.window.width = 800               -- The window width (number)
    t.window.height = 600              -- The window height (number)
    t.window.borderless = false        -- Remove all border visuals from the window (boolean)
    t.window.resizable = false         -- Let the window be user-resizable (boolean)
    t.window.minwidth = 1              -- Minimum window width if the window is resizable (number)
    t.window.minheight = 1             -- Minimum window height if the window is resizable (number)
    t.window.fullscreen = false        -- Enable fullscreen (boolean)
    t.window.fullscreentype = "normal" -- Standard fullscreen or desktop fullscreen mode (string)
    t.window.vsync = true              -- Enable vertical sync (boolean)
    t.window.fsaa = 0                  -- The number of samples to use with multi-sampled antialiasing (number)
    t.window.display = 1               -- Index of the monitor to show the window in (number)
    t.window.highdpi = false           -- Enable high-dpi mode for the window on a Retina display (boolean)
    t.window.srgb = false              -- Enable sRGB gamma correction when drawing to the screen (boolean)
    t.window.x = nil                   -- The x-coordinate of the window's position in the specified display (number)
    t.window.y = nil                   -- The y-coordinate of the window's position in the specified display (number)

    t.modules.audio = true             -- Enable the audio module (boolean)
    t.modules.event = true             -- Enable the event module (boolean)
    t.modules.graphics = true          -- Enable the graphics module (boolean)
    t.modules.image = true             -- Enable the image module (boolean)
    t.modules.joystick = true          -- Enable the joystick module (boolean)
    t.modules.keyboard = true          -- Enable the keyboard module (boolean)
    t.modules.math = true              -- Enable the math module (boolean)
    t.modules.mouse = true             -- Enable the mouse module (boolean)
    t.modules.physics = true           -- Enable the physics module (boolean)
    t.modules.sound = true             -- Enable the sound module (boolean)
    t.modules.system = true            -- Enable the system module (boolean)
    t.modules.timer = true             -- Enable the timer module (boolean)
    t.modules.window = true            -- Enable the window module (boolean)
    t.modules.thread = true            -- Enable the thread module (boolean)
end

Flags

identity

Diese Option bestimmt den Namen des Speicherordners deines Spiels. Du kannst jedoch nur den Namen, nicht aber das Verzeichnis bestimmen, in dem Dateien gespeichert werden sollen:

t.identity = "gabe_HL3" -- Richtig
t.identity = "c:/Users/gabe/HL3" -- Falsch

Alternativ kann love.filesystem.setIdentity verwendet werden um den Speicherordner außerhalb der Konfigurationsdatei zu bestimmen.

version

Available since LÖVE 0.8.0
This flag is not supported in earlier versions.

t.version sollte ein String sein, welcher die Version von LÖVE repräsentiert, für die das Spiel entwickelt wurde. Er sollte wie folgt formatiert sein: "X.Y.Z" wobei X die Hauptversionsnummer, Y die Unterversion und Z die Revisionsnummer darstellt. Hierdurch kann LÖVE eine Warnung ausgeben, die den Spieler darauf hinweist, dass das Spiel nicht mit der installierten LÖVE-Version kompatibel ist.

console

Bestimmt, ob neben dem Spielfenster zusätzlich eine Konsole geöffnet werden soll (Nur für Windowssystem verfügbar). Anmerkung: Auch auf OSX ist es möglich Konsolenoutput zu bekommen, indem man LÖVE über das Terminal laufen lässt.

window

Available since LÖVE 0.9.0
These flags are not supported in earlier versions.

Es ist möglich die Erstellung des Fensters solange aufzuschieben, bis love.window.setMode das erste Mal im Code aufgerufen wird. Um dies zu bewerkstelligen muss in der Konfigurationsdatei t.window = nil (oder t.screen = nil in älteren Versionen) gesetzt werden. Vorsicht ist geboten, da LÖVE abstürzen kann, wenn eine Funktion aus love.graphics aufgerufen wird, bevor das Fenster mit love.window.setMode erstellt wurde.

window.title

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Bestimmt den Titel des Spielefensters. Alternativ kann love.window.setTitle verwendet werden.

window.icon

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Ein Pfad der auf eine Bilddatei zeigt, welche als Symbol für das Spielefenster verwendet werden soll. Zu beachten ist hierbei, dass nicht alle Systeme mit großen Icons zurecht kommen. Das Icon kann auch über love.window.setIcon angepasst werden.

window.width & window.height

Available since LÖVE 0.9.0
These flags are not supported in earlier versions.

Bestimmt die Höhe und Breite des Spielefensters. Wenn diese Werte auf 0 gesetzt werden, wird LÖVE das Fenster automatisch an die Desktopdimensionen des Nutzers anpassen.

window.borderless

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Entfernt alle Fensterbegrenzungen. Beachte, dass die Effekte dieser Option abhängig vom Betriebssystem unterschiedlich ausfallen können.

window.resizable

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Bestimmt ob der Nutzer die Größe des Spielefensters verändern kann.

window.minwidth & window.minheight

Available since LÖVE 0.9.0
These flags are not supported in earlier versions.

Bestimmt die minimale Größe des Spielefensters. Diese Werte werden immer vorrangig gegenüber den Werten von window.width und window.height behandelt. LÖVE wird also immer die minimalen Dimensionen verwenden, welche via window.minwidth und window.minheight bestimmt wurden.

window.fullscreen

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Bestimmt ob das Spiel im Vollbildmodus (true) oder im Fenstermodus (false) gestartet werden soll. Der Vollbildmodus kann außerdem über love.window.setFullscreen oder love.window.setMode verändert werden.

window.fullscreentype

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Bestimmt die Art des Vollbildmodus (normal oder desktop). Generell wird der desktop Modus empfohlen, da er auf einigen Systemene nicht so restriktiv ist wie der normal Modus.

window.vsync

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Aktiviert, bzw. deaktiviert die vertikale Synchronisation. Vsync versucht das Spiel bei einer konstanten Framerate zu halten und kann Probleme wie das "Screen Tearing" verhindern. Es wird empfohlen Vsync aktiviert zu lassen, wenn man nicht weiß, welche Auswirkungen das Abschalten mit sich führen kann.

window.fsaa

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Die Anzahl der Samples welche für das MSAA verwendet werden sollen.

window.display

Available since LÖVE 0.9.0
This flag is not supported in earlier versions.

Der Index des Monitors in dem das Spielefenster geöffnet werden soll, wenn mehrere Bildschirme verfügbar sind.

window.highdpi

Available since LÖVE 0.9.1
This flag is not supported in earlier versions.

Siehe love.window.getPixelScale. Diese Option sollte deaktiviert bleiben, solange das Spiel nicht auf einem Mac mit Retina-Display getestet werden kann, da einige Änderungen am Code vorgenommen werden müssen um alles korrekt darstellen zu können.

window.srgb

Available since LÖVE 0.9.1
This flag is not supported in earlier versions.

Wenn diese Option aktiviert ist, werden automatisch alle Farben die auf den Bildschirm gezeichnet werden vom linearen RGB-Farbraum in den sRGB-Farbraum umgewandelt - Die Fensteroberfläche wird als gamma-space sRGB behandelt. Da es sich um ein sehr fortgeschrittenes Thema handelt, sollte diese Option nur aktiviert werden, wenn man sich wirklich über die Auswirkungen im Klaren ist.

window.x & window.y

Available since LÖVE 0.9.2
These flags are not supported in earlier versions.

Bestimmt die Position des Spielefensters auf dem Bildschirm des Nutzers. Diese kann auch via love.window.setPosition verändert werden.

release

Available since LÖVE 0.8.0
This flag is not supported in earlier versions.
Removed in LÖVE 0.9.0
This flag is not supported in that and later versions.


Wenn t.release aktiviert ist, nutzt LÖVE den "Release Error Handler", welcher überschrieben werden kann um weitere Informationen auszugeben.

Der Standard-Handler zeigt außerdem eine Nachricht an, über die der Entwickler benachrichtigt werden kann, indem es die title, author und url Werte aus der conf.lua benutzt.

Older Versions

Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE 0.9.1:

function love.conf(t)
    t.identity = nil                   -- The name of the save directory (string)
    t.version = "0.9.1"                -- The LÖVE version this game was made for (string)
    t.console = false                  -- Attach a console (boolean, Windows only)

    t.window.title = "Untitled"        -- The window title (string)
    t.window.icon = nil                -- Filepath to an image to use as the window's icon (string)
    t.window.width = 800               -- The window width (number)
    t.window.height = 600              -- The window height (number)
    t.window.borderless = false        -- Remove all border visuals from the window (boolean)
    t.window.resizable = false         -- Let the window be user-resizable (boolean)
    t.window.minwidth = 1              -- Minimum window width if the window is resizable (number)
    t.window.minheight = 1             -- Minimum window height if the window is resizable (number)
    t.window.fullscreen = false        -- Enable fullscreen (boolean)
    t.window.fullscreentype = "normal" -- Standard fullscreen or desktop fullscreen mode (string)
    t.window.vsync = true              -- Enable vertical sync (boolean)
    t.window.fsaa = 0                  -- The number of samples to use with multi-sampled antialiasing (number)
    t.window.display = 1               -- Index of the monitor to show the window in (number)
    t.window.highdpi = false           -- Enable high-dpi mode for the window on a Retina display (boolean)
    t.window.srgb = false              -- Enable sRGB gamma correction when drawing to the screen (boolean)

    t.modules.audio = true             -- Enable the audio module (boolean)
    t.modules.event = true             -- Enable the event module (boolean)
    t.modules.graphics = true          -- Enable the graphics module (boolean)
    t.modules.image = true             -- Enable the image module (boolean)
    t.modules.joystick = true          -- Enable the joystick module (boolean)
    t.modules.keyboard = true          -- Enable the keyboard module (boolean)
    t.modules.math = true              -- Enable the math module (boolean)
    t.modules.mouse = true             -- Enable the mouse module (boolean)
    t.modules.physics = true           -- Enable the physics module (boolean)
    t.modules.sound = true             -- Enable the sound module (boolean)
    t.modules.system = true            -- Enable the system module (boolean)
    t.modules.timer = true             -- Enable the timer module (boolean)
    t.modules.window = true            -- Enable the window module (boolean)
    t.modules.thread = true            -- Enable the thread module (boolean)
end

Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE 0.9.0:

function love.conf(t)
    t.identity = nil                   -- The name of the save directory (string)
    t.version = "0.9.0"                -- The LÖVE version this game was made for (string)
    t.console = false                  -- Attach a console (boolean, Windows only)

    t.window.title = "Untitled"        -- The window title (string)
    t.window.icon = nil                -- Filepath to an image to use as the window's icon (string)
    t.window.width = 800               -- The window width (number)
    t.window.height = 600              -- The window height (number)
    t.window.borderless = false        -- Remove all border visuals from the window (boolean)
    t.window.resizable = false         -- Let the window be user-resizable (boolean)
    t.window.minwidth = 1              -- Minimum window width if the window is resizable (number)
    t.window.minheight = 1             -- Minimum window height if the window is resizable (number)
    t.window.fullscreen = false        -- Enable fullscreen (boolean)
    t.window.fullscreentype = "normal" -- Standard fullscreen or desktop fullscreen mode (string)
    t.window.vsync = true              -- Enable vertical sync (boolean)
    t.window.fsaa = 0                  -- The number of samples to use with multi-sampled antialiasing (number)
    t.window.display = 1               -- Index of the monitor to show the window in (number)

    t.modules.audio = true             -- Enable the audio module (boolean)
    t.modules.event = true             -- Enable the event module (boolean)
    t.modules.graphics = true          -- Enable the graphics module (boolean)
    t.modules.image = true             -- Enable the image module (boolean)
    t.modules.joystick = true          -- Enable the joystick module (boolean)
    t.modules.keyboard = true          -- Enable the keyboard module (boolean)
    t.modules.math = true              -- Enable the math module (boolean)
    t.modules.mouse = true             -- Enable the mouse module (boolean)
    t.modules.physics = true           -- Enable the physics module (boolean)
    t.modules.sound = true             -- Enable the sound module (boolean)
    t.modules.system = true            -- Enable the system module (boolean)
    t.modules.timer = true             -- Enable the timer module (boolean)
    t.modules.window = true            -- Enable the window module (boolean)
    t.modules.thread = true            -- Enable the thread module (boolean)
end

Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE 0.8.0:

function love.conf(t)
    t.title = "Untitled"        -- The title of the window the game is in (string)
    t.author = "Unnamed"        -- The author of the game (string)
    t.url = nil                 -- The website of the game (string)
    t.identity = nil            -- The name of the save directory (string)
    t.version = "0.8.0"         -- The LÖVE version this game was made for (string)
    t.console = false           -- Attach a console (boolean, Windows only)
    t.release = false           -- Enable release mode (boolean)
    t.screen.width = 800        -- The window width (number)
    t.screen.height = 600       -- The window height (number)
    t.screen.fullscreen = false -- Enable fullscreen (boolean)
    t.screen.vsync = true       -- Enable vertical sync (boolean)
    t.screen.fsaa = 0           -- The number of FSAA-buffers (number)
    t.modules.joystick = true   -- Enable the joystick module (boolean)
    t.modules.audio = true      -- Enable the audio module (boolean)
    t.modules.keyboard = true   -- Enable the keyboard module (boolean)
    t.modules.event = true      -- Enable the event module (boolean)
    t.modules.image = true      -- Enable the image module (boolean)
    t.modules.graphics = true   -- Enable the graphics module (boolean)
    t.modules.timer = true      -- Enable the timer module (boolean)
    t.modules.mouse = true      -- Enable the mouse module (boolean)
    t.modules.sound = true      -- Enable the sound module (boolean)
    t.modules.physics = true    -- Enable the physics module (boolean)
    t.modules.thread = true     -- Enable the thread module (boolean)
end

Hier ist eine Liste aller Optionen mit ihren Standardwerten für LÖVE 0.7.2 und früher:

function love.conf(t)
    t.title = "Untitled"        -- The title of the window the game is in (string)
    t.author = "Unnamed"        -- The author of the game (string)
    t.identity = nil            -- The name of the save directory (string)
    t.version = 0               -- The LÖVE version this game was made for (number)
    t.console = false           -- Attach a console (boolean, Windows only)
    t.screen.width = 800        -- The window width (number)
    t.screen.height = 600       -- The window height (number)
    t.screen.fullscreen = false -- Enable fullscreen (boolean)
    t.screen.vsync = true       -- Enable vertical sync (boolean)
    t.screen.fsaa = 0           -- The number of FSAA-buffers (number)
    t.modules.joystick = true   -- Enable the joystick module (boolean)
    t.modules.audio = true      -- Enable the audio module (boolean)
    t.modules.keyboard = true   -- Enable the keyboard module (boolean)
    t.modules.event = true      -- Enable the event module (boolean)
    t.modules.image = true      -- Enable the image module (boolean)
    t.modules.graphics = true   -- Enable the graphics module (boolean)
    t.modules.timer = true      -- Enable the timer module (boolean)
    t.modules.mouse = true      -- Enable the mouse module (boolean)
    t.modules.sound = true      -- Enable the sound module (boolean)
    t.modules.physics = true    -- Enable the physics module (boolean)
end

Siehe auch


Andere Sprachen