This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Tortuga/rsc/setup.lua
T
Kayne Ruse 48bf0f549d Initial commit, read more
After a few days of work, I'm committing what i've done so far. Mostly
I've cherry picked the best parts of the multiplayer branch's modules, and
adapted them for use here. I've written a few new components, and I've
learnt a few things along the way. I may continue with this branch for a
while, before moving the changes into the main branch. Alternatively, it
might turn out that this single player version is more fun. We'll see.

I've swapped the config system for a pure lua version instead. This is
actually fairly flexible. I've also changed the map system and it's API a
great deal. The tile sheet can be loaded from lua, and the save directory
isn't hard coded anymore. I think this would be a good testbed for a lot
of different systems, including the collision system, however the current
system (using vectors) is inadequate. I'll have to dig up the old BBox,
possilby.

This branch will piggy back on the main repo for a while.
2014-07-08 17:02:28 +10:00

42 lines
882 B
Lua

--[[
--reroute the program while in development
config = {debug = true}
dofile("../rsc/setup.lua")
--]]
--catch the debug signal if the program was rerouted
local debug = false
if config ~= nil then
debug = config.debug
end
--the program's configuration
config = {
debug = debug,
screen = {
width = 800,
height = 600,
fullscreen = false
},
dir = {
fonts = "rsc/graphics/fonts/",
logos = "rsc/graphics/logos/",
sprites = "rsc/graphics/sprites/",
tilesets = "rsc/graphics/tilesets/",
interface = "rsc/graphics/interface/",
scripts = "rsc/scripts/",
maps = "rsc/maps/"
},
mapname = "mapname"
}
--development environment
if config.debug then
for k, v in pairs(config.dir) do
config.dir[k] = string.format("../%s", v)
end
end
--"load" the scripted systems
dofile(config.dir.scripts .. "file_format.lua")
dofile(config.dir.scripts .. "generator.lua")