|
From: <fl...@ma...> - 2004-02-10 14:20:38
|
Hi Serge, we are going to use LUA in fact to simplify the Lua work take a look at LuaBind www.sourceforge.net/projects/luabind. And for a live example take a look at Oasis www.sourceforge.net/projects/oasis, if you are using it, you should consider use it. It is heavily based on templates but it looks like sort of new language inside C++, it is a very nice piece of work. About XML we are using it to store data entities (not executable code) so in that case XML sounded the best approach, how had been your experience with only data in LUA? Greetings Red Knight > Hello Mamutas, > > Monday, February 9, 2004, 5:05:13 AM, you wrote: > > MP> As RK mentioned, until Xerces is integrated into Xenocide, we do not > have > MP> official XML parser. Xerces so far is our first choice and your > comments > MP> about it are really appreciated. We will definitely take them into > account. > > Greetings to you all. Here are just my 2 cents. We use Lua scripting > language (http://www.lua.org) for describing resources and > configuration files in UFO2000. In my opinion, it is much more > flexible than XML and offers other benefits (we are going to make AI > in Lua for example). XML is just stores information, and Lua scrips > can make some preprocessing and also validation of data. > > As UFO2000 is developed with the goals to be portable, extensibile, > lightweight and easy maintainable, Lua scripting support seems to be > an ideal choice. In fact, we are going to turn UFO2000 into a free > engine for tactical squad based strategies with an X-COM sequel based > on it :) > > You can compare our XML (we use Expat library and store sound > configuration in XML file) and Lua code. > > Lua: > http://lxnt.info:8888/repos/ufo2k/trunk/init-scripts/standard-maps.lua > Code for getting information from Lua (iit performs a lot of other > work in fact, see only the places where functions with lua_ prefix are > called): > http://lxnt.info:8888/repos/ufo2k/trunk/src/map.cpp > > XML: > http://lxnt.info:8888/repos/ufo2k/trunk/soundmap.xml > Code for getting information from XML: > http://lxnt.info:8888/repos/ufo2k/trunk/src/sound.cpp > > XML code looks much more overbloated. But that is only my opinion, > it's up to you to decide :) > > -- > Serge Semashko > ufo2000 development team > http://ufo2000.sourceforge.net > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Xenocide-programming mailing list > Xen...@li... > https://lists.sourceforge.net/lists/listinfo/xenocide-programming > |