mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-24 02:29:03 -06:00
Compare commits
4 Commits
8d7ccae2bc
...
df19129228
Author | SHA1 | Date | |
---|---|---|---|
|
df19129228 | ||
|
80de771d2a | ||
|
7c32273971 | ||
|
9d5dbb4674 |
@ -1 +1 @@
|
|||||||
version = "v0.3.2"
|
version = "v0.3.3"
|
9
main.lua
9
main.lua
@ -1,5 +1,4 @@
|
|||||||
function love.load()
|
function love.load()
|
||||||
math.randomseed(os.time())
|
|
||||||
highscores = {}
|
highscores = {}
|
||||||
love.graphics.setDefaultFilter("linear", "nearest")
|
love.graphics.setDefaultFilter("linear", "nearest")
|
||||||
require "load.rpc"
|
require "load.rpc"
|
||||||
@ -24,6 +23,11 @@ function love.load()
|
|||||||
-- used for screenshots
|
-- used for screenshots
|
||||||
GLOBAL_CANVAS = love.graphics.newCanvas()
|
GLOBAL_CANVAS = love.graphics.newCanvas()
|
||||||
|
|
||||||
|
-- aliasing to prevent people using math.random by accident
|
||||||
|
math.random = love.math.random
|
||||||
|
math.randomseed = love.math.setRandomSeed
|
||||||
|
math.randomseed(os.time())
|
||||||
|
|
||||||
-- init config
|
-- init config
|
||||||
initConfig()
|
initConfig()
|
||||||
|
|
||||||
@ -289,9 +293,12 @@ function love.resize(w, h)
|
|||||||
GLOBAL_CANVAS = love.graphics.newCanvas(w, h)
|
GLOBAL_CANVAS = love.graphics.newCanvas(w, h)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- higher values of TARGET_FPS will make the game run "faster"
|
||||||
|
-- since the game is mostly designed for 60 FPS
|
||||||
local TARGET_FPS = 60
|
local TARGET_FPS = 60
|
||||||
local FRAME_DURATION = 1.0 / TARGET_FPS
|
local FRAME_DURATION = 1.0 / TARGET_FPS
|
||||||
|
|
||||||
|
-- custom run function; optimizes game by syncing draw/update calls
|
||||||
function love.run()
|
function love.run()
|
||||||
if love.load then love.load(love.arg.parseGameArguments(arg), arg) end
|
if love.load then love.load(love.arg.parseGameArguments(arg), arg) end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user