Page 1 of 1

Lua, XML and mouse suggestions

Posted: Thu Sep 23, 2004 12:30
by Mistaril
Hi Eddie and thanks for the great project! :)

I have three seperate suggestions:

- You might be interested in using LuaPlus (http://www.luaplus.org) instead of LuaBind for integrating C++ and Lua. It is very lightweight and has worked charms for me so far.

- Is there a possibility of disabling XML files and for example parse the resources from Lua scripts? The XML parsing library adds almost 3 MB to the download size (as an example Space Station Manager is just 5MB total, including all art assets)

- Make an option for using an external, non CEGUI rendered cursor. On Win32 it sometimes pays off to use the standard system cursor as it has zero lag compared to one drawn as a texture.

Lua, XML and mouse suggestions

Posted: Thu Sep 23, 2004 18:22
by CrazyEddie
Hi

Thanks for looking at the system, and for your suggestions :)

- You might be interested in using LuaPlus (http://www.luaplus.org) instead of LuaBind for integrating C++ and Lua. It is very lightweight and has worked charms for me so far.

Thanks for the link, I'll check it out :) I'm having serious doubts about luabind right now, I'll probably just clean up what I have done with that and release it as a VC7.1 only option, and hopefully one of these other binding solutions (tolua++, LuaPlus, or something) will offer a more universally compatible solution.

- Is there a possibility of disabling XML files and for example parse the resources from Lua scripts? The XML parsing library adds almost 3 MB to the download size (as an example Space Station Manager is just 5MB total, including all art assets)

Hmmm, I accept that Xerces is huge, but it's good :). I may consider something like this for the future, how did you envision the Lua scripts looking for this? What I might try and come up with some kind of plug-in system where the library user can choose one of a selection of systems for parsing files while using the same basic interface, this would not get implemented for a while yet though.

- Make an option for using an external, non CEGUI rendered cursor. On Win32 it sometimes pays off to use the standard system cursor as it has zero lag compared to one drawn as a texture.

You can kind of do this now; hide the CEGui cursor and just sync its position with the alternative cursor you are using (or vice versa). I think this may be better left up to the library user to sort this kind of thing rather than start tying the system into OS specific stuff.

CE.

Lua, XML and mouse suggestions

Posted: Fri Sep 24, 2004 07:40
by Mistaril

<snip Lua binding>
Thanks for the link, I'll check it out :) I'm having serious doubts about luabind right now, I'll probably just clean up what I have done with that and release it as a VC7.1 only option, and hopefully one of these other binding solutions (tolua++, LuaPlus, or something) will offer a more universally compatible solution.


I tried luabind and tolua myself before hooking up with LuaPlus. It has no external dependencies (it comes integrated with Lua) and even has a remove debugger built in.

Hmmm, I accept that Xerces is huge, but it's good :). I may consider something like this for the future, how did you envision the Lua scripts looking for this? What I might try and come up with some kind of plug-in system where the library user can choose one of a selection of systems for parsing files while using the same basic interface, this would not get implemented for a while yet though.


The XML parser is basically a Builder pattern isn't it? Ie. it reads the files and builds a specific interface from that. If this was separated enough you could plug in your own builder and support other external script formats (or a totally different way of building the interface). We use Lua files for all configuration and script files as the format is simpler and using the Lua parser doesn't give us any overhead. XML is great, but sometimes an overkill for small config files.

(I checked my figures and Xerces adds 0.6MB which isn't really that much. My bad.. :))


<External cursor>
You can kind of do this now; hide the CEGui cursor and just sync its position with the alternative cursor you are using (or vice versa). I think this may be better left up to the library user to sort this kind of thing rather than start tying the system into OS specific stuff.


Excellent. This was just what I was looking for. Definitely stay OS independent here. Just that there is a method

Code: Select all

hideCEGUICursorsWhileStillLettingMessagesThrough(bool)
.

Thanks and looking forward to the frozen beta interface (like Sinbad we are waiting for that before synchronization .. ) :D