-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitialize.lua
More file actions
56 lines (43 loc) · 1.57 KB
/
initialize.lua
File metadata and controls
56 lines (43 loc) · 1.57 KB
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
-- initialize.lua
----------------------------------------------------------------
-- This file contains initializing values, easy to edit
----------------------------------------------------------------
_worldScale_ = 10
_windowScale_ = 1
_cameraScale_ = 1
_gravity_ = 20
_stage_scale_ = 1 -- scaling factor applied to window (should be 1 for mobile/fullscreen)
_stage_ = { w = 960, h = 640 } -- Pixels in the game (adjustment of display size is automatic)
_debugMode_ = true -- enables debug in debug.lua
_fontScale_ = 20 -- fonts for debug
_imgFolder_ = "images/"
_animFolder_ = _imgFolder_.."animations/"
_audioFolder_ = "audio/"
_videoFolder_ = "video/"
_dataFolder_ = "data/" -- referene data files (save, load, etc)
_scriptFolder_ = "scripts/"
_levelFolder_ = "working_levels/"
_levelFile_ = "level001.lv"
_physicsConfigFile_ = "physics_config.lua"
_physicsEditorFile_ = _dataFolder_ .. "autogen_physics.lua"
-- _PlayerInit_ Values
_playerDefaultVelocity_ = 75
_bulletRadius_ = 5
_eLength_ = 5
_eRadius_ = 10
_worldFriction_ = 0.2
_charCode_ = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 _+-()[]{}|\/?.,<>!~`@#$%^&*\'":;'
-- Disable buffered output: docs say this is important for osx platform
io.stdout:setvbuf("no")
function extend (fileName)
dofile("scripts/"..fileName)
end
function error (message, ...)
-- Writes a message to stderr. If extra arguments are supplied, the message is formatted.
local arg_count = select ('#', ...)
if arg_count > 0 then
io.stderr:write (string.format (message, ...) .. "\n")
else
io.stderr:write (message .. "\n")
end
end