Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dcss:brainstorm:dungeon:lua_script [2012-10-06 10:21]
KiloByte [Band Placement]
dcss:brainstorm:dungeon:lua_script [2012-10-06 10:40] (current)
KiloByte
Line 15: Line 15:
  
 The existing specifications for ''.des'' files and LUA script in them can be found [[dcss:help:maps|here]] (the same syntax is used for layouts). The existing specifications for ''.des'' files and LUA script in them can be found [[dcss:help:maps|here]] (the same syntax is used for layouts).
 +
 +===== Lua overuse =====
 +
 +Lua in general is good for code a few lines long: doing that in C++ would need several lines of syntax, a prototype in the header, actual call, etc -- while Lua can do that ad-hoc.  On the other hand, Lua fails badly for anything above around a screen of code.  It's just incapable of storing any structured code and keeping it readable.
 +
 +We recently got two big pieces of lua: layout_loops which is bad but semi-manageable, then layout_vaults which is beyond hope even with its monstrous comment-to-code ratio.  Especially with the latter, I have serious doubts if it's a good idea to have code in Crawl that's understandable to only its creator (if even that).  I have spend quite a bit of time sanitizing Ziggurat code (and there's a lot left to do there), let's avoid using languages unfit for large pieces of code in large amounts.  You write one-liners in Perl not Java, and don't write a 300KLOC program in assembly... --- //[[user:KiloByte]] 2012-10-06 10:21//
  
 ===== Subvault ===== ===== Subvault =====
Logged in as: Anonymous (VIEWER)
dcss/brainstorm/dungeon/lua_script.txt · Last modified: 2012-10-06 10:40 by KiloByte
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki