Archived

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

Embedded Scripting Languages

This topic is 5114 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

Hey all! I''m currently writing a massively multiplayer space game (think 2D Elite) in C# and I''m looking for a good scripting language to use to script all of my items/AI/other interactions. My goal for this game is to have a completely data-driven design that allows the AI to easily adapt as I extend the game by adding more items/locations. My original idea was to use a ton of XML docs for each item/location with data fields that would specify for the AI how good an item was, depending on a list of preset goals, ect. ect. Anyways, I''ve recently decided that it would be a good idea to work some kind of scripting capability into the game (the scripts could either be embedded with the rest of the XML or not). I''m looking for a scripting solution that I can easily embed into a C# program. Performance is also an important consideration. Also, I don''t want any screwy "functional language" BS that''s similar to LISP or ML. Right now I''m looking at Lua as a possible solution. Has anyone tried to embed Lua into a C# app? How about another scripting language? I''ve also looked at Python, but the syntax of the actual scripting seems nastier (whitespaces and tabs matter?!) However, I''m still very open to using something else and I''d love to hear about anyone''s experience with embedding any script processor into C#. How about JAVA with JNI? Possible to integrate into C#? Desirable? How about VBScript? Is there some obvious solution that I should know about? Thanks for any input! (other than defenses of LISP or ML or the functional programming paradigm) ---------------------------------------- Let be be finale of seem, seems to me. ---------------------------------------- Coding: http://www.stanford.edu/~jjshed/coding Miscellany: http://www.stanford.edu/~jjshed

Share this post


Link to post
Share on other sites
If your usnig C#, you can already use any .NET language as a scripting language (have your program compile scripts on the fly) and you dont have to worry about binding/glue functions associated with using other scripting languages. I recomend using jscript.net as your scripting language, since that was designed as a scripting language and has the simplicities of a scripting language.

Share this post


Link to post
Share on other sites
Any .net application requires the framework to be installed, and the compilers are part of the framework. So you can investigate reflection, this allows users to script in C#, JS or VB and to load those into your app. They will be compiled on demand.

This is one of the things .net wants to solve, to offer language and programming support as part of the operating system instead of as an application (commercial compiler). This is part of a long process starting with VBscript in the Office products. It''s inconvenient for users when every application has its own scripting language with different syntax, and hard for programmers to write their own parsers from 0.

Share this post


Link to post
Share on other sites
Hey, using a .Net language to script with sounds pretty cool. I was hoping there might be something like that, but I''ven''t heard of it before. I''m going to Google around for some tutorials, are there any hot keywords for what I''m trying to do. For example, is "reflection" the technical term for a language using itself to script?

Also, does anyone know of a place that would have information on this from the point of view of a game programmer? Such a prespective would no doubt be helpful and save me lots of time. Perhaps I will search on Gamasutra...

Thanks!


----------------------------------------
Let be be finale of seem, seems to me.
----------------------------------------

Coding:
http://www.stanford.edu/~jjshed/coding

Miscellany:
http://www.stanford.edu/~jjshed

Share this post


Link to post
Share on other sites