Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Scripting language

This is a somewhat odd question.

I want to provide a scripting language for modding games that I build for XNA. If I was deplying these games for the PC then I would just be able to use C# files, compiled at runtime (Using reflection.emit) as scripts and that would be fine - a nice simple way to mod the game. However, the .net compact framework (which is what the xbox provides) does not support reflection.emit, so how can I write a scripting language taking this into account?

  1. Are there any projects already doing this
  2. Are there any good resources to start my own project to do this
  3. What would be the best language to choose? This is for games scripting so it can be a fairly small language so long as it's quite efficient and easy to implement an interpreter for
like image 996
Martin Avatar asked Dec 02 '09 11:12

Martin


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr. Stroustroupe.

Is C language easy?

C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.

How old is the letter C?

The letter c was applied by French orthographists in the 12th century to represent the sound ts in English, and this sound developed into the simpler sibilant s.


2 Answers

Lua is often used for game scripting. World of Warcraft for example offers it for all its mod makers.

Also take a look at these sites:

  1. C++
  2. C#
like image 56
Carra Avatar answered Sep 19 '22 20:09

Carra


I know this is an old question but I had similar requirements earlier and I found out about Managed Scripting. Looks like it is developed initially to solve the problem of scripting in XNA games so this is even better.

From the website:

Managed Scripting Engine

Managed Scripting provides a quick and easy solution for developers needing to implement a scripting engine into their solutions. Managed Scripting comes with a straight forward script engine that can compile & instance scripts on the fly, generating the assemblies in memory or locally on the hard-drive, and allow for dynamically invoking methods and accessing properties during runtime. ManagedScripting runs on Windows Vista, XP, Linux, XBox 360 and Microsofts Zune Player with scripts wrote using either Visual Basic or C# as the language with plans to add support for Ruby, Python and JScript.

I have not looked into it deeper myself but it sounds like what we want.

like image 25
Dan7 Avatar answered Sep 21 '22 20:09

Dan7