Chaosforge Forum
DoomRL => Modding => Topic started by: yaflhdztioxo on February 25, 2010, 15:43
-
Just in case you didn't know, (http://blog.chaosforge.org/articles/47/sandbox-doomrl-modding-advent) modding is now open--in a limited form. Already work is underway, creating new and exciting levels, and a tutorial is planned as well. And an argument sort've broke out on this point which hopefully you, the community, can resolve :)
In Lua (the language mods are written in), almost every object is a table. And Lua is fairly flexible with how you assign tables. For instance, if I were to create an item, the following approaches are all valid:
-- C-style
local new_cell
new_cell = {}
new_cell.name = "object"
new_cell.ascii = ":"
Cells(new_cell)
-- Table style
local new_cell
new_cell = {}
new_cell["name"] = "object"
new_cell["ascii"] = ":"
Cells(new_cell)
-- Lua style
Cells{
name = "object",
ascii = ":"
}
Which one do you, the community prefer? It's the form that the wiki pages will use, so choose wisely!
-
Lua style. It looks clearer, and uses less space as your own example proves :P
-
For the same reasons - Lua.
-
Scheme style. Oh wait...
I suppose Lua works...
-
LUA Style, for all the reasons listed above.
-
I am clearly outnumbered here. Oh, woe for the days where coding was procedural and we all knew assembly by heart...
-
yaflhdztioxo, told you so... but you wouldn't listen :>
And as a matter of fact this is the style in which DoomRL lua files are written... so I guess that is final :)
-
Damnit add. YOu couldn't get your IRC name or something?
Fine, I'm calling you Yaf.