Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Sneftel

Lua embedding

This topic is 5972 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement

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 .

Share this post


Link to post
Share on other sites
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".

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I was implenting it in the QuakeWorld console, gave up after 78 hours of intensive hacking....

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!