DoomRL > Modding
Level modding and syntax preference
yaflhdztioxo:
Just in case you didn't know, 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:
--- Code: ----- 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 = ":"
}
--- End code ---
Which one do you, the community prefer? It's the form that the wiki pages will use, so choose wisely!
Malek Deneith:
Lua style. It looks clearer, and uses less space as your own example proves :P
Deaven:
For the same reasons - Lua.
thelaptop:
Scheme style. Oh wait...
I suppose Lua works...
GenTechJ:
LUA Style, for all the reasons listed above.
Navigation
[0] Message Index
[#] Next page
Go to full version