Jump to content

Lua support with mangos.


Guest Terrorblade__

Recommended Posts

what is good lua for?

With respect,

Axel

It's simplier than C++ and designed for "scripting", widely used amongst tons of projects, from games to window managers. It has more power than a config file and it's less error-prone than C/C++. Some projects use perl/python as scripting language, but LUA wins statistically due to it's simplicity and specific usage (which includes good integration within other languages).

Link to comment
Share on other sites

No thank you.

It was poorly made anyways. Better to use Lunar like LUAppArc.

Hey, it was mine code !!!

I used luabind which was based on Boost.Python and I think it was working pritey fine.

My idea was beyond lua, I wanted to implement FSM and messaging for the AI.

Yet I had to stop development of this because of real life.

Link to comment
Share on other sites

Hey, it was mine code !!!

I used luabind which was based on Boost.Python and I think it was working pritey fine.

My idea was beyond lua, I wanted to implement FSM and messaging for the AI.

Yet I had to stop development of this because of real life.

Sounds really cool, if you had finished it then I would have considered it well done.

But for simple AI functionality it's not necessary to use such a complicated system. It's much less painful to use a simple class-export system like Lunar and keep it small and clean.

Link to comment
Share on other sites

What about AngelScript ?

well... implement it yourself, just write another scriptlib implementation.

1

AngelScript not as popular as the LUA and Python.

i agree, i never heard about that angel script.... and to the damn small written letters: good question... you'll implement them for us? :P

Link to comment
Share on other sites

Why not in scripting DLL? What problem with it...

if you have an error in it it crashes server

you cant (easily) reload it while server is running

is probably something people would say. (i really like the c++ way. although restarting all the time when testing is a bit of a hassle ^^)

Link to comment
Share on other sites

What about AngelScript ?
if you have an error in it it crashes server

you cant (easily) reload it while server is running

is probably something people would say. (i really like the c++ way. although restarting all the time when testing is a bit of a hassle ^^)

('loadscripts',3,'Syntax: .loadscripts $scriptlibraryname\\r\\n\\r\\nUnload current and load the script library $scriptlibraryname or reload current if $scriptlibraryname omitted, in case you changed it while the server was running.'),

Link to comment
Share on other sites

Why not in scripting DLL? What problem with it...

I think the reason for wanting a scripting language like Lua, Python, you name it, is a simple one: not needing to run builds on changes. E.g. on a server you will probably keep compilers off the system.

Personally I prefer C++ scripting, but I have to admit scripting with Lua or Python sometimes would be a time saver.

Any way, MaNGOS comes with C++ scripting support, and if anyone desires different scripting, there are options for this, too. There are ready-made classes for Lua bindings and Python bindings available and if someone wants to see support for any of these, go fork MaNGOS and github and create your own branch for Lua, Python, you name it, and see if people like it and start using it.

Link to comment
Share on other sites

('loadscripts',3,'Syntax: .loadscripts $scriptlibraryname\\r\\n\\r\\nUnload current and load the script library $scriptlibraryname or reload current if $scriptlibraryname omitted, in case you changed it while the server was running.'),

Does this actually work? i read somewhere it doesnt work for already loaded script but you have to rename the compiled script and then load it. Well i could be wrong dunno how up to date that topic was

Link to comment
Share on other sites

*nod nod* right

i'm always right :P

i'm just wondering how it would be with the performance with such a scripting language... what's with e.g. a mob which is in an instance like aq40 with a 40person raid and there are e.g. 2-3 instances of aq40 open (e.g. because of an event or whatever...), i'm unsure if lua/whatever could handle that....

oh, blizz only uses lua for the interface, so nothing which needs an update every tick and which has to calculate tons of data.

about the implementation of the blizz servers: i already read that blizz servers would run on an oracle cluster and would be implemented in PL/SQL (i work with an application which is implemented that way (ok, it runs on a host and not on a cluster, but still, it's nearly the same)). (source (german): http://spieleprogrammierer.de/phpBB2/viewtopic.php?t=11807&start=15 see post by FalkT)

Link to comment
Share on other sites

Personally, I think if lua is ever brought back, it should only be for testing stuff which will eventually be in C++, or small scripts (like scripts which don't update every tick) For example, it would be nice to be able to work on a script without having to compile, test, fix one bug, compile, test, fix another small bug, etc.

Link to comment
Share on other sites

It does not really matter what scripting language it is. I think having a scripting variant which does not need compilation of the scripts just is a psychological thing. It simply feels simpler. Doesn't mean it would be better, but it feel better for many people apparently. :-)

Link to comment
Share on other sites

still dunno why you guys all want lua there are so many good established (and sometimes fast) scripting languages out there. just because lua is used in the client gui scripting isnt really a reasono to use it here.

I just like lua. I think it is a good scripting language, it's very extensible, completely C-standard-compliant, cross-platform, has a small footprint, is a simple language, and is very C-like, which is great for beginners to programming. You could use something like Python or Ruby, or some other obscure scripting language, and I will look into this, but lua just seems to be what people prefer.

Besides, it's pretty easy to make just because of how much code there is to steal out there. ^_^

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use