-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.lua
117 lines (101 loc) · 6.79 KB
/
conf.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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 = "idek" -- The window title (string)
t.window.icon = "icons/isondo.png" -- 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 = true -- Let the window be user-resizable (boolean)
t.window.minwidth = 800 -- Minimum window width if the window is resizable (number)
t.window.minheight = 600 -- 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 = 1 -- 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 = true -- 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 = false -- 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
--[[
Original Author: https://github.com/Leandros
Updated Author: https://github.com/jakebesworth
MIT License
Copyright (c) 2018 Jake Besworth
Original Gist: https://gist.github.com/Leandros/98624b9b9d9d26df18c4
Love.run 11.X: https://love2d.org/wiki/love.run
Original Article, 4th algorithm: https://gafferongames.com/post/fix_your_timestep/
Forum Discussion: https://love2d.org/forums/viewtopic.php?f=3&t=85166&start=10
Add this code to bottom of main.lua to override love.run() for Love2D 11.X
Tickrate is how many frames your simulation happens per second (Timestep)
Max Frame Skip is how many frames to allow skipped due to lag of simulation outpacing (on slow PCs) tickrate
---]]
-- 1 / Ticks Per Second
-- local TICK_RATE = 1 / 60
-- -- How many Frames are allowed to be skipped at once due to lag (no "spiral of death")
-- local MAX_FRAME_SKIP = 25
-- -- No configurable framerate cap currently, either max frames CPU can handle (up to 1000), or vsync'd if conf.lua
-- function love.run()
-- if love.load then love.load(love.arg.parseGameArguments(arg), arg) end
-- -- We don't want the first frame's dt to include time taken by love.load.
-- if love.timer then love.timer.step() end
-- local lag = 0.0
-- -- Main loop time.
-- return function()
-- -- Process events.
-- if love.event then
-- love.event.pump()
-- for name, a,b,c,d,e,f in love.event.poll() do
-- if name == "quit" then
-- if not love.quit or not love.quit() then
-- return a or 0
-- end
-- end
-- love.handlers[name](a,b,c,d,e,f)
-- end
-- end
-- -- Cap number of Frames that can be skipped so lag doesn't accumulate
-- if love.timer then lag = math.min(lag + love.timer.step(), TICK_RATE * MAX_FRAME_SKIP) end
-- while lag >= TICK_RATE do
-- if love.update then love.update(TICK_RATE) end
-- lag = lag - TICK_RATE
-- end
-- if love.graphics and love.graphics.isActive() then
-- love.graphics.origin()
-- love.graphics.clear(love.graphics.getBackgroundColor())
-- if love.draw then love.draw() end
-- love.graphics.present()
-- end
-- -- Even though we limit tick rate and not frame rate, we might want to cap framerate at 1000 frame rate as mentioned https://love2d.org/forums/viewtopic.php?f=4&t=76998&p=198629&hilit=love.timer.sleep#p160881
-- if love.timer then love.timer.sleep(0.001) end
-- end
-- end