Difference between revisions of "Config Files (Deutsch)"

m
(Update german translation.)
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 Belieben ü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:
+
Hier ist eine Liste aller Optionen und ihrer Standardwerte für LÖVE 0.9.x:
<source lang="lua">  
+
<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). Added in 0.9.1
 +
    t.window.srgb = false              -- Enable sRGB gamma correction when drawing to the screen (boolean). Added in 0.9.1
 +
 
 +
    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>
 +
 
 +
Beachte bitte, 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.
 +
 
 +
== Flags ==
 +
==== 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.
 +
 
 +
==== 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 ====
 +
{{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 Configurationsdatei <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.
 +
 
 +
==== 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.
 +
 
 +
==== Veröffentlichungsmodus ====
 +
{{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.
 +
 
 +
== Ältere Versionen ==
 +
 
 +
Hier ist eine Liste aller Optionen und ihrer Standardwerte für LÖVE [[0.8.0]]:
 +
<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.title = "Untitled"        -- The title of the window the game is in (string)
     t.author = "Namenlos"       -- Der Spielautor (string)
+
     t.author = "Unnamed"       -- The author of the game (string)
     t.identity = nil            -- Der Name des Spielverzeichnisses (string)
+
    t.url = nil                -- The website of the game (string)
     t.version = 0               -- Die LÖVE-Version, mit welcher das Spiel programmiert wurde (number)
+
     t.identity = nil            -- The name of the save directory (string)
     t.console = false          -- Startet mit dem Spiel auch eine Konsole (boolean, nur unter Windows)
+
     t.version = "0.8.0"        -- The LÖVE version this game was made for (string)
     t.screen.width = 800        -- Die Fensterbreite (number)
+
     t.console = false          -- Attach a console (boolean, Windows only)
     t.screen.height = 600      -- Die Fensterhöhe (number)
+
    t.release = false          -- Enable release mode (boolean)
     t.screen.fullscreen = false -- Schaltet den Vollbildschirm-Modus ein (boolean)
+
     t.screen.width = 800        -- The window width (number)
     t.screen.vsync = true      -- Schaltet Vsync an (boolean)
+
     t.screen.height = 600      -- The window height (number)
     t.screen.fsaa = 0          -- Die Anzahl der FSAA-buffer (number)
+
     t.screen.fullscreen = false -- Enable fullscreen (boolean)
     t.modules.joystick = true  -- Schaltet das Joystick-Modul ein (boolean)
+
     t.screen.vsync = true      -- Enable vertical sync (boolean)
     t.modules.audio = true      -- Schaltet das Audio-Modul ein (boolean)
+
     t.screen.fsaa = 0          -- The number of FSAA-buffers (number)
     t.modules.keyboard = true  -- Schaltet das Tastatur-Modul ein (boolean)
+
     t.modules.joystick = true  -- Enable the joystick module (boolean)
     t.modules.event = true      -- Schaltet das Event-Modul ein (boolean)
+
     t.modules.audio = true      -- Enable the audio module (boolean)
     t.modules.image = true      -- Schaltet das Bilder-Modul ein(boolean)
+
     t.modules.keyboard = true  -- Enable the keyboard module (boolean)
     t.modules.graphics = true  -- Schaltet das Grafik-Modul ein (boolean)
+
     t.modules.event = true      -- Enable the event module (boolean)
     t.modules.timer = true      -- Schaltet das Timer-Modul ein (boolean)
+
     t.modules.image = true      -- Enable the image module (boolean)
     t.modules.mouse = true      -- Schaltet das Maus-Modul ein (boolean)
+
     t.modules.graphics = true  -- Enable the graphics module (boolean)
     t.modules.sound = true      -- Schaltet das Maus-Modul ein (boolean)
+
     t.modules.timer = true      -- Enable the timer module (boolean)
     t.modules.physics = true    -- Schaltet das Physik-Modul ein (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
 
end
 
</source>
 
</source>
  
Beachte bitte, dass du [[love.filesystem]] nicht abschalten kannst, da es zwingend vorhanden sein muss. Dasselbe gilt auch für das [[love]]-Modul selbst.
+
Hier ist eine Liste aller Optionen und ihrer Standardwerte 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]]
 

Revision as of 14:17, 17 January 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.

Hier ist eine Liste aller Optionen und ihrer Standardwerte für LÖVE 0.9.x:

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). Added in 0.9.1
    t.window.srgb = false              -- Enable sRGB gamma correction when drawing to the screen (boolean). Added in 0.9.1

    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

Beachte bitte, 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.

Flags

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.

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

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 Configurationsdatei 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.

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.

Veröffentlichungsmodus

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.

Ältere Versionen

Hier ist eine Liste aller Optionen und ihrer Standardwerte 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 und ihrer Standardwerte 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