fysplane/settings.lua

85 lines
1.8 KiB
Lua
Raw Permalink Normal View History

-- Game specific settings go here
-- LÖVE settings should go to conf.lua
2014-10-23 18:55:57 +00:00
dofile("table.lua")
2014-10-18 21:24:01 +00:00
PIXELS_PER_METER = 8
2014-10-18 11:23:10 +00:00
GRAVITY_X = 0
2014-10-18 12:59:39 +00:00
GRAVITY_Y = 9.82599 * PIXELS_PER_METER
INITIAL_WIDTH = 1280
INITIAL_HEIGHT = 768
KEYMAP = {
[1] = {
ccw = { 'k', 'none' },
cw = { 'l', 'none' },
flip = { ',', 'none' },
shoot = { 'o', 'button8' },
accelerate = { 'j', 'none' },
decelerate = { 'm', 'button7' }
},
[2] = {
ccw = { 'a', 'none' },
cw = { 's', 'none' },
flip = { 'a', 'none' },
shoot = { 'w', 'button8' },
accelerate = { 'x', 'none' },
decelerate = { 'z', 'button7' }
}
}
2014-10-18 20:27:40 +00:00
AXISMAP = {
[1] = {
rotation = { { flipped = true, axis = 3 },
{ flipped = false, axis = 4 } },
throttle = { { flipped = false, axis = 1 },
2014-10-26 08:39:56 +00:00
{ flipped = true, axis = 2 } },
},
[2] = {
rotation = { { flipped = true, axis = 3 },
{ flipped = false, axis = 4 } },
throttle = { { flipped = false, axis = 1 },
2014-10-26 08:39:56 +00:00
{ flipped = true, axis = 2 } },
}
}
2014-10-23 18:55:57 +00:00
function save_settings()
table.save({KEYMAP = KEYMAP, AXISMAP = AXISMAP}, "fysplane.cfg")
2014-10-23 18:55:57 +00:00
end
if love.filesystem.isFile("fysplane.cfg") then
local m = table.load("fysplane.cfg")
KEYMAP = m.KEYMAP
AXISMAP = m.AXISMAP
2014-10-23 18:55:57 +00:00
end
function levelWidth()
local width, height = love.window.getMode()
return width
end
function levelHeight()
local width, height = love.window.getMode()
return height
end
PLANE_HEALTH = 200
2014-10-18 22:46:27 +00:00
PLANE_DEFAULT_GUN = "vickers77"
2014-10-18 20:27:40 +00:00
SCOREBOARD_WIDTH = 250
2014-10-18 23:22:14 +00:00
SCOREBOARD_HEIGHT = 125
2014-10-18 20:27:40 +00:00
SCOREBOARD_MARGIN = 20
2014-10-18 23:22:14 +00:00
2014-10-20 17:35:56 +00:00
ENGINE_MAX = 300
2014-10-18 23:51:03 +00:00
INITIAL_PLANE_SPEED = 400
2014-10-21 05:53:58 +00:00
INITIAL_ENGINE_SPEED = 200
2014-10-19 01:45:38 +00:00
2014-10-19 03:51:53 +00:00
HIT_SCORE = 1
2014-10-19 01:45:38 +00:00
KILL_SCORE = 10
SUICIDE_SCORE = -2