DoomRL > Modding

Level modding and syntax preference

(1/2) > >>

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        = {}   = "object"
new_cell.ascii  = ":"

-- Table style
local new_cell
new_cell = {}
new_cell["name"]  = "object"
new_cell["ascii"] = ":"

-- Lua style
  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

For the same reasons - Lua.

Scheme style.  Oh wait...

I suppose Lua works...

LUA Style, for all the reasons listed above.


[0] Message Index

[#] Next page

Go to full version