Lua embedding

Started by
23 comments, last by Sneftel 21 years, 8 months ago
Has anyone had much experience using Lua as an embedded scripting language for their game? I''d be very interested to hear how werll it worked for you, what caveats you discovered, etc. I searched the forums, and found plenty of posts by people suggesting Lua, but not much real-world information about what they''ve done with it. Specifically, I''ll be grafting Lua onto C++ for a (LucasArts-style) adventure game engine. Objects in the game world will be Lua pseudo-objects, with certain callback functions overridden on a per-instantiation basis to change the default behavior (i.e. a locked door''s "use" callback would make sure the key was in the character''s inventory before passing on to the default door use callback). Does this sound reasonable? What have been you guys'' experiences with Lua?
Advertisement
bump

I believe Relic are using it for Homeworld 2. No experience personally, but if Relic are using it after evaluating the alternatives (including writing your own scripting language engine) then I guess it can''t be all bad .

LucasArts used it for Grim Fandango. I guess it''s up to par then. 8)

A 2D Developer''s Board
Baldurs Gate, too. I''m more interested, tho, in game developers around here who have experience in it; Lua''s definitely got the cred, but I''m wondering about what insights into using Lua you guys have... stuff on par with "make your destructor virtual".
bump.... anyone with experience in this? Or is Lua just for the "big boys"?
I was implenting it in the QuakeWorld console, gave up after 78 hours of intensive hacking....
i am using LUA 4.0 at the moment.

very easy to integrate with VC++.

script runs quite fast too..

Just that the scripts are not object oriented and you have to define each function static. quite troublesome sometimes but overall its nothing compared to the power of the LUA language..

Its my duty, to please that booty ! - John Shaft
I''m kind of resurrecting this topic to make my question, as it perfectly fits into this topic''s subject.

I''m considering using Lua as the script language for a MMORPG server.

I''d like to code NPC''s AI with it, mainly.

However, the most recent Lua version still doesn''t support concurrent scripts.

That''s certainly something I need, since a server would control over 10.000 NPCs. It''d also make scripting much easier, as I would be able to have blocking functions such as "PromptPlayer".

The missing functionality I feel in Lua is a lua_run_chuck( unsigned char *chuck, unsigned long checksize, lua_State *L, unsigned long maxinstructions ) function, to limit the amount of instructions that a script can execute at once.

I couldn''t find any solution to this problem searching the web.

Can anyone here enlighten me? Or even confirm me that Lua isn''t for my project.
Actually, I''m writing a 3D engine for the creation of a real time strategy game and myself and my friend Eric are programming an in-house scripting engine which we''re calling MindScript. Its structure is very similar to C and very easy to use. I hope to get it to the point where I can release it so that other programmers can implement it into their games.

Mindgamez Entertainment

This topic is closed to new replies.

Advertisement