Monster Script

What is Monster?

Monster Script (or just Monster) is an advanced scripting language made for game programming.

(Or it will be, when it is finished.)

Monster is an object oriented programming language with syntax similar to D, C++ and Java. It is a byte-code compiled language (like Java) and scripts must be run through a virtual machine (VM). Rather than being a stand-alone program, however, the Monster VM is a library. It is meant to be integrated into an existing client program (written in D or C++, for example), where the VM runs side-by-side with "native" code.

Monster is meant to be a control language - it should give you a simple but flexible language to express high-level behavior, and let you put the low-level "back end" code in native code. Exactly where you draw the line between scripted code and native code is up to you.

The Monster compiler and VM are written entirely in the D programming language, but bindings to C++ are included. You do not need a D compiler og any knowledge of D to use Monster in C++. The language is still in the early stages of development, and many key features are not implemented yet. However, I have clear goals for what Monster should become:

Short example

import io;

writeln("Hello world! ", 1, 2, 3);  // prints 'Hello world! 123'

A more 'classy' example

This example uses a class and a function to get the same result:

class Hello;

import io;

char[] string = "Hello world!";
int a = 1;

main()
{
  int b = 2;
  writeln(string, a, b, 3); // 'Hello world! 123'
}

More examples

You'll find more examples, code snippets and tutorials in the Monster wiki.