Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 33003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:51:08+00:00 2026-05-10T13:51:08+00:00

I have a little game written in C#. It uses a database as back-end.

  • 0

I have a little game written in C#. It uses a database as back-end. It’s a trading card game, and I wanted to implement the function of the cards as a script.

What I mean is that I essentially have an interface, ICard, which a card class implements (public class Card056: ICard) and which contains a function that is called by the game.

Now, to make the thing maintainable/moddable, I would like to have the class for each card as source code in the database and essentially compile it on first use. So when I have to add/change a card, I’ll just add it to the database and tell my application to refresh, without needing any assembly deployment (especially since we would be talking about 1 assembly per card which means hundreds of assemblies).

Is that possible? Register a class from a source file and then instantiate it, etc.

ICard Cards[current] = new MyGame.CardLibrary.Card056(); Cards[current].OnEnterPlay(ref currentGameState); 

The language is C# but extra bonus if it’s possible to write the script in any .NET language.

  • 1 1 Answer
  • 5 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T13:51:09+00:00Added an answer on May 10, 2026 at 1:51 pm

    Oleg Shilo’s C# Script solution (at The Code Project) really is a great introduction to providing script abilities in your application.

    A different approach would be to consider a language that is specifically built for scripting, such as IronRuby, IronPython, or Lua.

    IronPython and IronRuby are both available today.

    For a guide to embedding IronPython read How to embed IronPython script support in your existing app in 10 easy steps.

    Lua is a scripting language commonly used in games. There is a Lua compiler for .NET, available from CodePlex — http://www.codeplex.com/Nua

    That codebase is a great read if you want to learn about building a compiler in .NET.

    A different angle altogether is to try PowerShell. There are numerous examples of embedding PowerShell into an application — here’s a thorough project on the topic: Powershell Tunnel

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little desktop game written in Python and would like to be
I have written a little bash script that reads commands (one per line), in
I have written a stupid little game and want to have some kind of
I have a little game project that uses a MVC 4 api server, however
I am using libgdx on a little game and I have a little animation
I am making a basic little game in Java and I want to have
I'm working on my first game and I have a little over 20 classes.
I'm building a little Android game using libgdx. For now I have a copy
I am implementing a little Black Jack game in C# and I have the
I have not done any large game development projects, only messed around with little

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.