logoalt Hacker News

gwbas1ctoday at 1:42 PM2 repliesview on HN

> The engine and IDE themselves are written in C#, but the language you use inside ArcadeMaker to program your games is my custom language, not C#.

Is there a plugin system that allows me to code in C#? (Or F#, or perhaps any of the other dotnet scripting languages?) I'd prefer to avoid a new language if possible.


Replies

am-gmtoday at 1:59 PM

So I need to implement again the assembly manager in the IDE. which will allow you to add your own C# libraries (DLLs) and then the answer would be yes, but from within the engine's language, like this:

  C#:
  public void DoSomething(Exp.Instance? callingInst, Exp.IValue?[] args)
  {
     ...
  }

  Exp:
  doSomething("hello")
There is already a relection-based way to call C# functions from my language, i call it "extern classes":

  extern class File = "System.IO.File"
  println(File.readAllText(filePath))
it can also be used with non-static classes, and you can use new(...) expressions on them, and "is" tests and access properties and so on... it SHOULD feel like a normal Exp class. The only exception is that it does not fit to performance-critical contexts, because it uses the slow reflection APIs of C#. but it's already working, unlike the assembly manager feature that is not implemented yet but will allow fast invocations.
show 1 reply
ux266478today at 2:09 PM

Seems rather trivial, just extend the codebase.