Monster Script

Welcome to the Monster homepage

Monster is an open source programming language made with game scripting in mind. For a quick introduction to Monster, see the about page. To get a better feel for what Monster looks like and how it works, you can visit the tutorial section.

... or if you just want to give Monster a spin, see the download page.

News (rss feed )

Big redesign coming up

Date: 2009-nov-08

I've recently read the classic Mythical Man Month: Essays on Softwar Engineering and it made me realize the Monster engine is desperately in need of a redesign at this point in development.

In my own mind, Monster has slowly been creeping closer and closer to first 1.0 beta in the last releases, and I'm reasonably satisfied with the feature set it has now. There are some large potholes here and there, especially in the implementation and the API, but I feel that in terms of usability the language design itself is already approching (and in some ways surpassing) old sluggers like Lua and Squirrel.

So in light of all this, I've decided that I'm going to go the whole mile and redesign the whole thing: language, standard library, API and implementation. The result will be known as Monster 1.0. This essentially means that there will be no further updates on the current code branch, and a new branch will start as soon as the specs are ready.

I'll start with the language spec itself, which will largely be a heavy refinement of the existing language. I'll post the finished specs here when they're done. The rest (API, VM, compiler etc) will pretty much be completely rewritten. Most likely the new implementation will be written in C++ rather than D. I'd also like to use more tried and tested external tools like Flex/Bison, LLVM and so on in the final design.

Not that I consider the current code (or the use of D) as a failure, far from it. It's been a very successful prototype for testing, learning and for organic development. It's now time to move to the "production" stage. For existing D users there will of course be D bindings to Monster (as well as bindings to other languages eventually.)

My hopes and goals for this rewrite are:

BTW, we'll likely be moving to my new website at Assemblage Software eventually, where I'll set up a page, forum and a bug tracker for Monster 1.0.

Monster 0.14: function delegates

Date: 2009-sep-14

Another quick release, but with some interesting new features none the less!

Monster 0.14 adds abstract classes and the 'Object' class, but the big news this time around is function pointers. These aren't your standard messy C pointers of course. The concept behind them is more commonly known as 'delegates', which is a much-touted and complex feature of many other languages.

In Monster they are dead simple:

  var fn = @obj.func;   // Get delegate to obj.func()
  fn();                 // Call it
.. and it Just Works. Functions are always called on the right object. The function is always called virtually. Pointers can be declared, set, changed and passed around like any other variable. And, of course, all failure cases are handled gracefully (scripting languages should never crash, ever!)

You can mix and match between script functions, native functions (C/C++/D etc), idle functions (functions like sleep() that 'yields' control to others) and so on, any way you see fit. Just point it to whatever you want to call and the VM takes care of the details for you.

Anyway, coming up next are static functions and variables, and then state functions (roughly like the ones you find in UnrealScript). After that we'll slowly be moving towards the first Beta release! So stay tuned ;-)

To get Monster 0.14, check out the download page and the changelog.

Monster 0.13 + Git!

Date: 2009-aug-28

Monster 0.13 is finished!

Not a very big release this time (see the changelog for details), but it's good to start small after a three month break. You'll find the download in the download section as usual.

Just as big news is that we've officially switched VCS from Subversion to Git! You'll find the new Git repos in the download section as well. After just a week of usage I have to say that I've totally fallen in love with Git and don't miss SVN one bit. It just makes more sense on so many levels (although the initial learning curve is slightly steeper.)

One big plus is that we don't have to ditch the old SVN repos. The Subversion trunk will stay up-to-date with the latest development branch like always, but all other tags and branches in the future will be exclusive to Git.

Enjoy!

Monster 0.12 is out!

Date: 2009-may-04

We're happy to announce Monster 0.12! This release has a ton of new features, including a package system, class constructors, enums, named function parameters and a game console mode, to name a few.

Inspired by the MiniD language we've also made a huge (but backwards compatible) grammar change, namely making semicolons optional. Semicolons at the end of every statement are particularly nice to have if you're a veteran C hacker who can't lose the habbit, and they're particularly a pain in the backside in a game console or when you're new to programming. So now they are optional.

A detailed description of all the new features can be found in the developers log Wiki page.

Direct download link: monster-0.12.tar.gz (295k) (download section)

Special thanks this time around go to Tim Cas, for testing and for lots of valuable suggestions.

New wiki + developers log

Date: 2009-apr-15

We're happy to announce the new Monster Wiki. It's hosted on our new monsterscript.net domain, which is where we're moving the entire site in the near future. On the wiki you'll find tutorials, a language reference and several other pages, although most of it is still under construction.

One of the new pages on the wiki is the Monster 0.12 developers log. This page is like an "explained changelog" where you can stay up to date on upcoming versions. As you can see things are really spinning along for Monster 0.12, with many new features already available in SVN.

Monster 0.11: Meet the new alpha

Date: 2009-feb-18

Monster 0.11 is finally done, and this release has a lot of goodies:

Complete changelog here. With all the new stuff in place I consider Monster to be in a usable state - albeit not feature complete - so I'm bumping to 'alpha' status (from 'pre-alpha'). Still a few things to fix before going beta, but we're working on it, and we're already using Monster in the OpenMW project.

The improved threading system (like the old one) relies heavily on what I call 'idle functions'. These are functions that 'take time', while transparently giving control to the rest of the program in the mean time (Monster threading is cooperative, not preemptive.) Here's a short example:

import io, timer;
while(true)
{
    int i;
    writeln("i=", ++i);
    sleep(1);   // this is the 'idle' function, in case you wondered
}

This prints a message every second, while your program continues to run. No system threads are involved, so you can run thousands of such scripts at the same time efficiently, and there's none of those nasty concurrency issues like deadlocks to deal with.

I'll write a few tutorials on this and much more shortly, using some practical examples from OpenMW development.

Direct download link: monster-0.11.tar.gz (265k)

New roadmap and bug tracker

Date: 2008-nov-28

Monster is hungry, and is constantly craving juicy bugs and high calorie feature requests for his afternoon feeding ritual. To satisfy his wild snacking needs, we are opening a bug tracking page and a magical roadmap of the future. Feel free to feed the Monster with your very own bugs, wishes and other insects.

Powered by Flyspray (thanks guys!).

Monster 0.10 is done

Date: 2008-nov-20

The wait is over, the latest version of Monster is finally done! Most of the features this time around are in response to feedback from various people, so thanks to everyone who contributed their ideas.

The news include new types and operators, object cloning, improved memory performance, const for arrays and other improvements. The new array const is applied at runtime and is flexible and helpful, and much less restrictive than the compile-time equivalent found in eg. C++.

There's also further improvements on the newly merged compiler and VM interface, doing away with the 'linking' phase and opening up for run-time generation of code.

A complete list of changes can as usual be found in the changelog.
Download Monster here: monster-0.10.tar.gz (237Kb).
See the included README.txt for instructions.

Special thanks this time to Tom (tomqyp) who helped solve a long-standing incompatibility with newer DMD versions.

Monster 0.9 - Inheritance included

Date: 2008-aug-29

After a long summer with little action, Monster 0.9 has finally been released! With it comes inheritance, a much more organized code base and other features. A complete list can as usual be found in the changelog.

Monster has seen some big improvements over the summer. Most notable is the merging of compiler and VM, opening up for a lot of new features:

The inheritance isn't fully finished yet (no polymorphism or virtual functions), but all the groundwork is in place for the next release.

Special thanks go to Dúron (Moritz Maxeiner) for lots of helpful feedback and testing.

Download Monster here: monster-0.9.tar.gz (227k), and remember to check the changelog.

older news...