License
Monster is currently released under the GNU
General Public License (GPL) version 3 only. More license options
are planned in the near future.
All files, web pages and designs are copyright (C) 2007-2009 Nicolay
Korslund (korslund@gmail.com).
Source releases
Monster is alpha software! Some features might still be
missing or incomplete.
The source releases require a D compiler, but can be used both with
D and C++.
Git
You can now get the Monster sources via Git as well as through
SVN. To get the latest sources (not necessarily stable), you do:
git clone git://monster-script.git.sourceforge.net/gitroot/monster-script/monster-script monster
This will put the source code in a directory called 'monster'. To
update to the newest version at a later point, just enter this
directory and type:
git pull
Subversion
To check out the latest sources via Subversion, do:
svn co https://monster-script.svn.sourceforge.net/svnroot/monster-script/trunk monster
This will put the source code in a directory called 'monster'. To
update to the newest version at a later point, just enter this
directory and type:
svn up
Note that the tags/ and branches/ directories are no longer updated
in Subversion, only the trunk is updated to match the current Git
master branch.
Both the Git and the SVN repositories are updated
simulaneously and they contain exactly the same information.
Obtaining a D compiler
The Monster library requires a fairly recent D compiler. Currently
the only tested compiler is the 1.0 (stable) branch of DMD. You can download DMD here. For
installation instructions check out the official DMD
installation page. The GNU D compiler (GDC) is also known to
work. In addition to a compiler you will also need to install DSSS, the D Shared
Software System, in order to build Monster.
Note to C++ users: You do not need a D compiler to
use the library, only to compile it.
Compiling Monster
Unpack the Monster archive and change to the resulting
directory. For example, on Linux you do:
tar xvzf monster-X.X.tar.gz
cd monster-X.X
Once you are in the correct directory, compile and install Monster
(on all platforms) with:
dsss build
dsss install
This will build and install the example VM (mvm) and the
library. For further instructions see the included README.txt.
Changelog
A more detailed changelog + developmers log can be found in the Wiki.
0.14 - Alpha - 2009-sep-14
0.13 - Alpha - 2009-aug-28
- can now use single quotes ' for string literals
- character literals no longer exist as a separate syntax object
- implemented string escape sequences
- using "" (or '') can be used to represent a quote character in strings
- use r"..." or \"..." for wysiwyg strings (where backslashes are ignored)
- simplified function call syntax in console mode (eg. print 1 2 3)
- array literals can be implicitly cast at compile time
0.12 - Alpha - 2009-may-04
- package system, based on directories
- semicolons are now mostly optional
- added vm.load() and family for class loading, replacing MonsterClass constructors
- class constructors
- assignment is now a statement, not an expression
- can set object variables upon creation with 'new'
- named function parameters
- optional function parameters
- initial value of class variables can changed in child classes
- initial state can be set in class declarations
- improved stack trace functionality
- enums
- module for interactive mode and ingame consoles
- new file options.d, customize the language and VM at compile time
- thin virtual file system (VFS) abstraction, allows using external libraries to read scripts from archives
- all initialization is automatic: InitMonster() and initAllModules() are gone.
- bindNew, allows a callback function for newly created objects
- explicit casting, of the type int(3.4) or MyClass(obj)
- implicit downcasting of objects
- numerous bug fixes and improvements
See the Wiki
changelog for detailed descriptions.
0.11 - Alpha - 2009-feb-18
- first alpha release
- complete inheritance and polymorphism
- abstract, final and override function keywords
- support for non-class (run-once) script files
- modules and import statement
- typeof and var
- virtual thread system is much more versatile and no longer restricted to object state code
- idle functions can be called anywhere
- idles/vthreads can be used as (asymmetrical) coroutines
0.10 - 2008-nov-19
- Further merged the compiler and VM. Classes can now be created at
runtime and through API calls.
- Removed the 'classes' struct, as the linking phase is no longer
necessary.
- Four new types: uint, long, ulong and double
- Const array references: new array properties .const and .isConst
- 'const' modifier for function parameters (for arrays only)
- Array/string literals are now constants
- Improved memory performance for array literals
- Object cloning: obj.clone in Monster and mo.clone() in D/C++
- Floating point reminder (%) and integer division (\) operators
- BOM markers are now recognized
- Ignore first lines beginning with #! (for unix scripts)
- Fixed incompatibility with DMD 1.032+ (thanks to tomqyp)
- Created 'tests' directory, reorganized examples
- Bug fixes and minor improvements
0.9 - 2008-aug-27
- Simple inheritance (no function overriding or polymorphism yet)
- Major rewrite: merged compiler and VM
- Much more information at runtime: variable names/types, function
parameters, etc
- Read and write directly to class variables from native code
- Compiler (mcc) and compiled files (.mc) are gone
- Renamed file extension from .m to .mn to avoid editor clash with
Matlab
- Added generic type properties, like int.max, float.nan, etc. See
examples/properties.mn for a list
- Multiple script include directories - just do classes.addPath("dir")
- 'codetml' program for easy translation .mn → html
- Lots of minor improvements
0.8 - 2008-apr-21
- String concatination.
- Foreach on a class can loop through instances.
- Autogen programs now handle arrays correctly.
- Tango and C++ versions of the program 'mvm'.
- Better error handling in C++, exceptions can now "pass through"
the interface (experimental.)
- Fixed the foreach ref bug and some other minor issues.
- Internal: cleanup and refactoring of compiler/scopes.d.
0.7 - 2008-mar-12
- Dynamic arrays. Syntax and semantics work pretty much like in D.
- Dynamic creation of single or multi-dimensional arrays.
- Array and string literals.
- Foreach loops, with type deduction, optional index and ref elements.
- Easy interface to pass arrays to and from native code (also for C++.)
- Array vararg function parameters.
- Break and continue in loops, with support for loop labels.
- Case insensitive string comparison operator: =i= and =I=.
- Changed syntax of empty state to "state = null;"
- Moved several mvm-based examples to examples/
- Implicit type conversions: int -> float, all types -> char[].
- Various small improvements and bugfixes.
0.6 - 2008-feb-19
- Added a Tango compatability layer ("minibos".) Monster now
supports Tango "out of the box".
- Created dexamples-tango/ with Tango versions of all the examples.
- The VM will now compile script files automatically. You no longer
need to run mcc.
- Removed hard coded function "writeln".
- Cleaned up shared/mcfile.d and finalized numbering in
shared/bytecode.d
- Removed expensive consistency checks from util.list (add
debug=slowcheck to bring them back.) This should improve performance
of sdltest.
0.5 - 2008-feb-07
- dsss.conf for examples updated to work on windows
- resolved a circular module dependency issue on windows
0.4 - 2008-jan-31
- Labels, goto and halt statements can now be used in state
code.
- Labels can be specified when changing state.
- States no longer loop automatically. Existing code must be updated.
- Improved dsss.conf files and restructured directories for better
compatability with DSSS.
- Hugely simplified scope handling code in the compiler, and rewrote
the entire type system.
- D version of 'sdltest' switched to DerelictSDL.
- All makefiles have been removed, except the ones that compile C++
examples.
0.3 - 2007-dec-30
- Made some workarounds to avoid DMD template bugs
- Full support for DSSS and Rebuild
- Should also work with GDC now (not extensively tested.)
- Example 'sdltest' can turn off graphics with the 'g' key
- C++ file monster.h is somewhat more const correct
- Compiler mcc prints file names to stdout
0.2 - 2007-dec-20
- C++ bindings
- All examples are now implemented in both D and C++
- Binary (static library) download for C++ (no D compiler
required)[1]
- New utility programs (autogen_d, autogen_c) that automate
creation of native code for D and C++
- Completely removed the redundant 'void' type from the language
- Compiler 'mcc' can compile multiple files at once (eg. 'mcc *.m')
- More examples, including SDL example
- Restructured the vm code quite a bit
- Can now bind functions (as well as delegates) to native functions
- Added util/freelist.d and util/growarray.d and several other files
- Multiple classes and object now fully implemented (but no inheritance yet)
- Lots of small improvements and bug fixes
[1] Binary downloads have been removed again, they simply took
too much work to maintain. They will return in the future.
0.1 - 2007-sep-03