Spec-Zone.ru › LÖVE

love.conf

Введение

Если в папке вашей игры (или файле .love) присутствует файл под названием conf.lua, он выполняется перед загрузкой модулей LÖVE. Вы можете использовать этот файл для перезаписи функции love.conf, которая позднее вызывается скриптом загрузки LÖVE 'boot'. Используя функцию love.conf, вы можете настроить некоторые параметры конфигурации и изменить такие вещи, как размер окна по умолчанию, загружаемые модули и другие параметры.

love.conf

Функция love.conf принимает один аргумент: таблицу, заполненную всеми значениями по умолчанию, которые вы можете переопределить по своему усмотрению. Например, если вы хотите изменить размер окна по умолчанию, сделайте следующее:

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

Если вам не нужны модули физики или джойстика, сделайте следующее.

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

Установка ненужных модулей в значение false рекомендуется при релизе вашей игры. Это незначительно сокращает время запуска (особенно если модуль джойстика отключен) и уменьшает использование памяти (незначительно).

Обратите внимание, что вы не можете отключить love.filesystem и love.data; это обязательно. То же самое касается и самого модуля love. Модуль love.graphics нуждается в модуле love.window.

В версиях LÖVE 0.9.2 и более ранних, ошибки в файле конфигурации приведут к тому, что игра не запустится, и не будет отображаться никакого сообщения об ошибке. Если игра не загружается, сначала проверьте файл конфигурации на наличие ошибок. В версии 0.10.2 и более поздних версиях ошибки в конфигурации теперь будут отображаться на синем экране с ошибкой в файле конфигурации.

Текущий файл конфигурации

Вот полный список опций и их значений по умолчанию для LÖVE 11.3:

function love.conf(t)
    t.identity = nil                    -- The name of the save directory (string)
    t.appendidentity = false            -- Search files in source directory before save directory (boolean)
    t.version = "11.3"                  -- The LÖVE version this game was made for (string)
    t.console = false                   -- Attach a console (boolean, Windows only)
    t.accelerometerjoystick = true      -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
    t.externalstorage = false           -- True to save files (and read from the save directory) in external storage on Android (boolean) 
    t.gammacorrect = false              -- Enable gamma-correct rendering, when supported by the system (boolean)
 
    t.audio.mic = false                 -- Request and use microphone capabilities in Android (boolean)
    t.audio.mixwithsystem = true        -- Keep background music playing when opening LOVE (boolean, iOS and Android 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 = "desktop" -- Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
    t.window.vsync = 1                  -- Vertical sync mode (number)
    t.window.msaa = 0                   -- The number of samples to use with multi-sampled antialiasing (number)
    t.window.depth = nil                -- The number of bits per sample in the depth buffer
    t.window.stencil = nil              -- The number of bits per sample in the stencil buffer
    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.usedpiscale = true         -- Enable automatic DPI scaling when highdpi is set to true as well (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.data = true               -- Enable the data module (boolean)
    t.modules.event = true              -- Enable the event module (boolean)
    t.modules.font = true               -- Enable the font 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.thread = true             -- Enable the thread module (boolean)
    t.modules.timer = true              -- Enable the timer module (boolean), Disabling it will result 0 delta time in love.update
    t.modules.touch = true              -- Enable the touch module (boolean)
    t.modules.video = true              -- Enable the video module (boolean)
    t.modules.window = true             -- Enable the window module (boolean)
end

Флаги

identity

Этот флаг определяет имя каталога сохранения для вашей игры. Обратите внимание, что вы можете указать только имя, а не местоположение, где оно будет создано:

t.identity = "gabe_HL3" -- Correct
t.identity = "c:/Users/gabe/HL3" -- Incorrect

В качестве альтернативы можно использовать love.filesystem.setIdentity для установки каталога сохранения вне файла конфигурации.

appendidentity

Доступно начиная с LÖVE 11.0
Этот флаг не поддерживается в более ранних версиях.

Этот флаг определяет, должен ли сначала проверяться каталог игры, а затем каталог сохранения (true) или иначе (false)

version

Доступно начиная с LÖVE 0.8.0
Этот флаг не поддерживается в более ранних версиях.

t.version должен быть строкой, представляющей версию LÖVE, для которой была создана ваша игра.

До версии 11.0, он должен быть отформатирован как "X.Y.Z", где X — номер основной версии, Y — номер дополнительной версии, а Z — номер исправления. Начиная с версии 11.0, он должен быть отформатирован как "X.Y", где X и Y — соответственно номер основной и дополнительной версии.

Если этот параметр задан в файле конфигурации игры, LÖVE отобразит предупреждение, если игра несовместима с текущей версией LÖVE, используемой для запуска игры. Значение по умолчанию — версия используемого LÖVE.

console

Определяет, открывать ли консоль вместе с окном игры (только Windows) или нет. Примечание: в OSX вы можете получить вывод консоли, запустив LÖVE через терминал, или в Windows с LÖVE 0.10.2, запустив lovec.exe вместо love.exe.

accelerometerjoystick

Доступно начиная с LÖVE 0.10.0
Этот флаг не поддерживается в более ранних версиях.

Устанавливает, следует ли устройству акселерометра на iOS и Android экспонировать его как 3-осевой джойстик. Отключение акселерометра, когда он не используется, может снизить использование ЦП.

externalstorage

Доступно начиная с LÖVE 0.10.1
Этот флаг не поддерживается в более ранних версиях.

Устанавливает, сохраняются ли файлы во внешнем хранилище (true) или внутреннем хранилище (false) на Android.

gammacorrect

Доступно начиная с LÖVE 0.10.0
Этот флаг не поддерживается в более ранних версиях.

Определяет, включено ли гамма-корректное рендерирование, если система его поддерживает.

audio.mic

Доступно начиная с LÖVE 11.3
Этот флаг не поддерживается в более ранних версиях.

Запрашивает разрешение на использование микрофона у пользователя. Когда пользователь разрешит, love.audio.getRecordingDevices выведет список доступных устройств записи. В противном случае love.audio.getRecordingDevices вернет пустую таблицу, а пользователю будет показано сообщение, информирующее его об этом при вызове.

audio.mixwithsystem

Доступно начиная с LÖVE 11.0
Этот флаг не поддерживается в более ранних версиях.

Устанавливает, воспроизводится ли фоновая аудио/музыка из других приложений, пока открыт LÖVE. Подробнее см. love.system.hasBackgroundMusic.

window

Доступно начиная с LÖVE 0.9.0
Эти флаги не поддерживаются в более ранних версиях.

Можно отложить создание окна до первого вызова love.window.setMode в вашем коде. Для этого установите t.window = nil в love.conf (или t.screen = nil в более старых версиях.) Если это сделано, LÖVE может завершиться ошибкой, если любая функция из love.graphics вызывается до первого вызова love.window.setMode в вашем коде.

Таблица t.window называлась t.screen в версиях до 0.9.0. Таблица t.screen не существует в love.conf в версии 0.9.0, а таблица t.window не существует в love.conf в версии 0.8.0. Это означает, что love.conf не выполнится (поэтому он вернется к значениям по умолчанию), если не позаботиться о правильном использовании таблицы для используемой версии LÖVE.

window.title

Доступно начиная с LÖVE 0.9.0
Этот флаг не поддерживается в более ранних версиях.

Устанавливает заголовок окна игры. В качестве альтернативы, можно использовать love.window.setTitle для изменения заголовка окна вне файла конфигурации.

window.icon

Доступно начиная с LÖVE 0.9.0
Этот флаг не поддерживается в более ранних версиях.

Путь к файлу изображения, используемому в качестве значка окна. Не все операционные системы поддерживают очень большие изображения значков. Значок также можно изменить с помощью love.window.setIcon.

window.width & window.height

Доступно начиная с LÖVE 0.9.0
Эти флаги не поддерживаются в более ранних версиях.

Устанавливает размеры окна. Если эти флаги установлены в 0, LÖVE автоматически использует размеры рабочего стола пользователя.

window.borderless

Доступно начиная с LÖVE 0.9.0
Этот флаг не поддерживается в более ранних версиях.

Удаляет все визуальные границы из окна. Обратите внимание, что эффекты могут варьироваться в зависимости от операционной системы.

window.resizable

Доступно начиная с LÖVE 0.9.0
Этот флаг не поддерживается в более ранних версиях.

Если установлено в значение true, это позволяет пользователю изменять размер окна игры.

window.minwidth & window.minheight

Доступно начиная с LÖVE 0.9.0
Эти флаги не поддерживаются в более ранних версиях.

Устанавливает минимальную ширину и высоту окна игры, если пользователь может изменять его размер. Если вы установите меньшие значения для window.width и window.height, LÖVE всегда будет отдавать предпочтение минимальным размерам, установленным с помощью window.minwidth и window.minheight.

window.fullscreen

Доступно начиная с LÖVE 0.9.0
Этот флаг не поддерживается в более ранних версиях.

Устанавливает режим работы игры в полноэкранном (true) или оконном (false) режиме. Полноэкранный режим также можно переключать с помощью love.window.setFullscreen или love.window.setMode. В версии 11.3 для Android, установка этого значения в true скрывает строку состояния.

window.fullscreentype

Доступно начиная с LÖVE 0.9.0
Этот флаг не поддерживается в более ранних версиях.

Указывает тип полноэкранного режима использовать (exclusive или desktop). Обычно рекомендуется desktop, так как он менее ограничен, чем режим exclusive на некоторых операционных системах. (Примечание: в версиях 0.9.2 и более ранних используется normal вместо exclusive.)

window.vsync

Доступно начиная с LÖVE 0.9.0
Этот флаг не поддерживается в более ранних версиях.

Включает или отключает вертикальную синхронизацию. Vsync пытается поддерживать стабильную частоту кадров и может предотвратить проблемы, такие как разрывы экрана. Рекомендуется оставлять vsync включённым, если вы не знаете о возможных последствиях его отключения. До версии LÖVE 11.0 это значение было булевым (true или false). С версии LÖVE 11.0 это значение является числовым (1 для включения vsync, 0 для отключения vsync, -1 для использования адаптивной vsync, если поддерживается).

Обратите внимание, что в iOS вертикальная синхронизация всегда включена и не может быть изменена.

window.depth

Доступно с версии LÖVE 11.0
Данный флаг не поддерживается в более ранних версиях.

Количество битов на образец в буфере глубины (16/24/32, по умолчанию nil)

window.stencil

Доступно с версии LÖVE 11.0
Данный флаг не поддерживается в более ранних версиях.

Количество битов на образец в буфере трафарета (обычно 8, по умолчанию nil)

window.msaa

Доступно с версии LÖVE 0.9.2
Данный флаг не поддерживается в более ранних версиях.

Количество образцов для использования с многократной выборкой антиалиасинга.

window.display

Доступно с версии LÖVE 0.9.0
Данный флаг не поддерживается в более ранних версиях.

Индекс дисплея, на котором отобразить окно, если доступно несколько мониторов.

window.highdpi

Доступно с версии LÖVE 0.9.1
Данный флаг не поддерживается в более ранних версиях.

См. love.window.getDPIScale. Позволяет буферу заднего плана окна использовать полную плотность пикселей высоко-DPI дисплеев на поддерживаемых операционных системах. LOVE автоматически масштабирует элементы соответственно и использует единицы масштабирования DPI вместо пикселей для большинства элементов (с версии 11.0), когда это значение истинно, если флаг usedpiscale не установлен в false. Когда highdpi имеет значение false, ОС сохраняет согласованность между дисплеями с низким и высоким DPI, рендеринга на буфер заднего плана с низким разрешением и последующим масштабированием, когда используется дисплей с высоким DPI.

Данный флаг в настоящее время ничего не делает в Windows, а в Android он фактически всегда включен.

window.usedpiscale

Доступно с версии LÖVE 11.3
Данный флаг не поддерживается в более ранних версиях.

Отключает автоматическое масштабирование LOVE по DPI на дисплеях с высоким DPI, когда значение ложно. Это оказывает эффект только при установке флага highdpi в true, поскольку ОС (а не LOVE) в противном случае отвечает за всё.

window.x & window.y

Доступно с версии LÖVE 0.9.2
Эти флаги не поддерживаются в более ранних версиях.

Определяет положение окна на экране пользователя. В качестве альтернативы можно использовать love.window.setPosition для изменения положения в режиме реального времени.

window.fsaa

Доступно с версии LÖVE 0.9.0 и удалено в LÖVE 0.10.0
Данный флаг был заменён флагом window.msaa.

Количество образцов для использования с многократной выборкой антиалиасинга.

window.srgb

Доступно с версии LÖVE 0.9.1 и удалено в LÖVE 0.10.0
Данный флаг был заменён флагом gammacorrect.

Включение этого флага окна автоматически преобразует цвета всего, что отображается на главном экране, из линейного цветового пространства RGB в цветовое пространство sRGB — поверхность окна обрабатывается как sRGB в гамма-пространстве. Это лишь один компонент гамма-корректного рендеринга, сложная тема, которую легко испортить, поэтому рекомендуется оставлять этот параметр отключенным, если вы не уверены в его последствиях.

Режим выпуска

Доступно с версии LÖVE 0.8.0 и удалено в LÖVE 0.9.0
Данный флаг не поддерживается в более ранних или более поздних версиях.


Если t.release включён, LÖVE использует обработчик ошибок выпуска release error handler, который по умолчанию содержит мало информации и может быть, конечно, переопределён.

Обработчик ошибок режима выпуска по умолчанию также выводит сообщение игроку, рекомендуя ему связаться с автором, используя значения title, author и url, как указано в conf.lua.

При запуске объединённой игры в режиме выпуска она не будет сохраняться в каталоге сохранений LOVE, а скорее в собственном каталоге, в то время как ранее это было %APPDATA%\\LOVE\\game в Windows, теперь это %APPDATA%\\game. Эта концепция также применима к другим платформам.

Старые версии

Вот полный список параметров и их значений по умолчанию для LÖVE 11.0 до 11.2:

function love.conf(t)
    t.identity = nil                    -- The name of the save directory (string)
    t.appendidentity = false            -- Search files in source directory before save directory (boolean)
    t.version = "11.0"                  -- The LÖVE version this game was made for (string)
    t.console = false                   -- Attach a console (boolean, Windows only)
    t.accelerometerjoystick = true      -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
    t.externalstorage = false           -- True to save files (and read from the save directory) in external storage on Android (boolean) 
    t.gammacorrect = false              -- Enable gamma-correct rendering, when supported by the system (boolean)
 
    t.audio.mixwithsystem = true        -- Keep background music playing when opening LOVE (boolean, iOS and Android 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 = "desktop" -- Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
    t.window.vsync = 1                  -- Vertical sync mode (number)
    t.window.msaa = 0                   -- The number of samples to use with multi-sampled antialiasing (number)
    t.window.depth = nil                -- The number of bits per sample in the depth buffer
    t.window.stencil = nil              -- The number of bits per sample in the stencil buffer
    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.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.data = true               -- Enable the data module (boolean)
    t.modules.event = true              -- Enable the event module (boolean)
    t.modules.font = true               -- Enable the font 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.thread = true             -- Enable the thread module (boolean)
    t.modules.timer = true              -- Enable the timer module (boolean), Disabling it will result 0 delta time in love.update
    t.modules.touch = true              -- Enable the touch module (boolean)
    t.modules.video = true              -- Enable the video module (boolean)
    t.modules.window = true             -- Enable the window module (boolean)
end

Вот полный список параметров и их значений по умолчанию для LÖVE 0.10.1 и 0.10.2:

function love.conf(t)
    t.identity = nil                    -- The name of the save directory (string)
    t.version = "0.10.2"                -- The LÖVE version this game was made for (string)
    t.console = false                   -- Attach a console (boolean, Windows only)
    t.accelerometerjoystick = true      -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
    t.externalstorage = false           -- True to save files (and read from the save directory) in external storage on Android (boolean) 
    t.gammacorrect = false              -- Enable gamma-correct rendering, when supported by the system (boolean)
 
    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 = "desktop" -- Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
    t.window.vsync = true               -- Enable vertical sync (boolean)
    t.window.msaa = 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.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), Disabling it will result 0 delta time in love.update
    t.modules.touch = true              -- Enable the touch module (boolean)
    t.modules.video = true              -- Enable the video module (boolean)
    t.modules.window = true             -- Enable the window module (boolean)
    t.modules.thread = true             -- Enable the thread module (boolean)
end

Вот полный список параметров и их значений по умолчанию для LÖVE 0.10.0:

function love.conf(t)
    t.identity = nil                    -- The name of the save directory (string)
    t.version = "0.10.0"                -- The LÖVE version this game was made for (string)
    t.console = false                   -- Attach a console (boolean, Windows only)
    t.accelerometerjoystick = true      -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
    t.gammacorrect = false              -- Enable gamma-correct rendering, when supported by the system (boolean)
 
    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 = "desktop" -- Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
    t.window.vsync = true               -- Enable vertical sync (boolean)
    t.window.msaa = 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.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), Disabling it will result 0 delta time in love.update
    t.modules.touch = true              -- Enable the touch module (boolean)
    t.modules.video = true              -- Enable the video module (boolean)
    t.modules.window = true             -- Enable the window module (boolean)
    t.modules.thread = true             -- Enable the thread module (boolean)
end

Вот полный список параметров и их значений по умолчанию для 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" -- Choose between "normal" 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), Disabling it will result 0 delta time in love.update
    t.modules.window = true            -- Enable the window module (boolean)
    t.modules.thread = true            -- Enable the thread module (boolean)
end

Вот полный список параметров и их значений по умолчанию для 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

Вот полный список параметров и их значений по умолчанию для 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

Вот полный список параметров и их значений по умолчанию для 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 MSAA samples (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

Вот полный список параметров и их значений по умолчанию для LÖVE 0.7.2 и более ранних версий:

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 MSAA samples (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

См. также

  • love


© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.conf

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API