Sign in to follow this  

[XNA] Scripting in C# and XNA

This topic is 3411 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 have recently started a project using XNA and so far am enjoying it. I was thinking about using some sort of scripting system, and my first thought was Lua after hearing many wonderful things about it. After doing a bit of digging there doesn't seem to be a great deal of support for Lua in XNA. I found http://xnua.com/ which may do the trick, but it doesn't seem very 'tried and tested'. Does anyone else use scripting in their XNA games? If so what scripting system? Would it be better to write my own? [Btw, I'm not particually interested in it working on the XBox, if it does then great, but if not then its no big loss to me as this is an exercise to get a sizable game programmed rather than the next best thing] Thanks for your input, -SD

Share this post


Link to post
Share on other sites
Checkout GakScript. It's a scripting library for .NET, with C#, VB, JScript and Boo (kinda like Python). It's also extendable so you can add other languages if they implement certain interfaces.

Share this post


Link to post
Share on other sites
Quote:
Original post by Silent Dragon
Hmm, I did a quick google for it, but it only came up with Rob Loach's announcement post which just contains dead links. I assume that means it's no longer being maintained?

Thanks for the reply,

-SD


It's not, as far as I know, being maintained. However, it was a trivial wrapper around the built-in CodeDOM portion of the .NET Framework. As long as you aren't targetting the XBox 360, you should have no problem using reflection and the CodeDOM to handle all of your scripting needs. If you are targeting the XBox 360, you will need to look into the CodeDOM support contained in the .NET Compact Framework.

Share this post


Link to post
Share on other sites
Honestly for me C# with Reflection is enough to fill the roles that a scripting language use to serve in my old C++ engines. You've got runtime discovery of types/methods/properties/attributes with Reflection, and I find C# is generally high-level enough for gameplay programmers to work with. You've even got runtime compilation as long as you're not targeting 360. I was honestly dumbfounded at how easy it was to create a robust entity/component system for my engine + map editor with .NET and XNA...gotta love PropertyGrid + attributes!

Share this post


Link to post
Share on other sites

This topic is 3411 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this