www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Monster - a game programming language

reply Nicolay Korslund <korslund gmail.com> writes:
Greetings my fellow D-icans!

The first release - version 0.1 - of the Monster programming language is now
available at http://monster.snaptoad.com

Monster is a rather ambitious project of mine - it is a game scripting language
based on D syntax and written entirely in D. To run Monster scripts, you first
compile the scripts to byte code, and then link the VM into your program and
run them there. This lets you integrate the scripts into your program or game,
and basically makes your program an extension of the language VM. Monster
includes some advanced features, such as states and (cooperative)
multithreading. The concept is similar to UnrealScript, except that it is not
bound to any specific engine (and that it is based on superior D syntax <g>.)

Note that this is a pre-alpha release, and most features you would need to
actually use the language (such as inheritance and memory allocation) are not
implemented yet. There are some compilable examples on the web site, though.

-Nico
Sep 07 2007
next sibling parent reply "Anders Bergh" <anders1 gmail.com> writes:
On 9/7/07, Anders Bergh <anders1 gmail.com> wrote:
 Hey, that looks really nice :-) I'll play around with it later today.

 One note however: Lua is really common in games, because of its very
 liberal license (new BSD or so). Monster is released under the GPLv3.
 Did you consider something like BSD or LGPL? This could be important
 for things like the Deadlock game/engine, which is written in D but
 isn't open source.
Oh yeah, an idea: why not use DSSS? This would let developers simply "dsss net install monster" to install everything, and makes it easier for people to use Monster in their own projects :-) I take it Monster isn't Tango-compatible, which is bad for some of us... did you look into it?
Sep 07 2007
parent reply Nicolay Korslund <korslund gmail.com> writes:
Anders Bergh Wrote:

 Oh yeah, an idea: why not use DSSS? This would let developers simply
 "dsss net install monster" to install everything, and makes it easier
 for people to use Monster in their own projects :-)
I plan on using DSSS, probably in the not-too-distant future :-)
 I take it Monster isn't Tango-compatible, which is bad for some of
 us... did you look into it?
To be honest I haven't look much into Tango yet, and haven't quite understood what the benefits are compared to Phobos. Is it possible to support both or do you have to choose? - Nico
Sep 08 2007
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Nicolay Korslund" <korslund gmail.com> wrote in message 
news:fbuhuc$mha$1 digitalmars.com...
 To be honest I haven't look much into Tango yet, and haven't quite 
 understood what the benefits are compared to Phobos. Is it possible to 
 support both or do you have to choose?
Benefits: actively being worked on by a group of people who use D and development is open to anyone, vs. Phobos, which is worked on by the same guy who writes the D compiler and D spec and who doesn't really use D very much. Provides a lot of useful functionality which is only half-heartedly implemented or not at all present in Phobos. Most of the library is designed to avoid heap allocations wherever possible, especially in the IO, which was designed for server use, making it _much_ faster than Phobos in many cases. Cons: it's not the default, and it's not completely done (though virtually anything Phobos can do Tango can do too, it's just some new features that are still being added, and of course bugs that are being fixed). Supporting both Phobos and Tango is.. difficult at best, an absolute mess at worst. There are some places where the two libraries don't really match up at all, i.e. their IO philosophies, so writing code which does the same IO stuff regardless of the standard library is very tricky. It can be done, though. There is a way to "support" both by using Tango and Tangobos. This is by no means a permanent solution, however, as Tangobos is mostly there to act as a bridge between Tango and Phobos when there is no other option. Tangobos Basically it's Phobos, but it's been slightly modified to use the Tango runtime, so you can compile code that depends on both Tango and Phobos in the same program.
Sep 09 2007
prev sibling next sibling parent reply "Anders Bergh" <anders1 gmail.com> writes:
On 9/7/07, Nicolay Korslund <korslund gmail.com> wrote:
 Greetings my fellow D-icans!

 The first release - version 0.1 - of the Monster programming language is now
available at http://monster.snaptoad.com

 Monster is a rather ambitious project of mine - it is a game scripting
language based on D syntax and written entirely in D. To run Monster scripts,
you first compile the scripts to byte code, and then link the VM into your
program and run them there. This lets you integrate the scripts into your
program or game, and basically makes your program an extension of the language
VM. Monster includes some advanced features, such as states and (cooperative)
multithreading. The concept is similar to UnrealScript, except that it is not
bound to any specific engine (and that it is based on superior D syntax <g>.)

 Note that this is a pre-alpha release, and most features you would need to
actually use the language (such as inheritance and memory allocation) are not
implemented yet. There are some compilable examples on the web site, though.

 -Nico
Hey, that looks really nice :-) I'll play around with it later today. One note however: Lua is really common in games, because of its very liberal license (new BSD or so). Monster is released under the GPLv3. Did you consider something like BSD or LGPL? This could be important for things like the Deadlock game/engine, which is written in D but isn't open source.
Sep 07 2007
parent reply Gregor Richards <Richards codu.org> writes:
Anders Bergh wrote:
 On 9/7/07, Nicolay Korslund <korslund gmail.com> wrote:
 Greetings my fellow D-icans!

 The first release - version 0.1 - of the Monster programming language is now
available at http://monster.snaptoad.com

 Monster is a rather ambitious project of mine - it is a game scripting
language based on D syntax and written entirely in D. To run Monster scripts,
you first compile the scripts to byte code, and then link the VM into your
program and run them there. This lets you integrate the scripts into your
program or game, and basically makes your program an extension of the language
VM. Monster includes some advanced features, such as states and (cooperative)
multithreading. The concept is similar to UnrealScript, except that it is not
bound to any specific engine (and that it is based on superior D syntax <g>.)

 Note that this is a pre-alpha release, and most features you would need to
actually use the language (such as inheritance and memory allocation) are not
implemented yet. There are some compilable examples on the web site, though.

 -Nico
Hey, that looks really nice :-) I'll play around with it later today. One note however: Lua is really common in games, because of its very liberal license (new BSD or so). Monster is released under the GPLv3. Did you consider something like BSD or LGPL? This could be important for things like the Deadlock game/engine, which is written in D but isn't open source.
Maybe he doesn't WANT non-Open-Source games using his engine, eh? That's everyone's right. - Gregor Richards
Sep 07 2007
parent reply Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
Gregor Richards wrote:
 Maybe he doesn't WANT non-Open-Source games using his engine, eh? That's 
 everyone's right.
!slap GregorR An engine doesn't really have to be open source if it's well scriptable :P -- Tomasz Stachowiak http://h3.team0xf.com/ h3/h3r3tic on #D freenode
Sep 07 2007
parent "Vladimir Panteleev" <thecybershadow gmail.com> writes:
On Sat, 08 Sep 2007 04:03:24 +0200, Tom S <h3r3tic remove.mat.uni.torun.pl>
wrote:

 Gregor Richards wrote:
 Maybe he doesn't WANT non-Open-Source games using his engine, eh? That's
 everyone's right.
!slap GregorR An engine doesn't really have to be open source if it's well scriptable :P
If you statically link to GPL code, like the way you do with Monster (if I understood correctly, the script bytecode is appended to the engine binary), then you must provide the source code for the entire executable, which includes your scripts. This means that, unless you're able to completely separate the output of the "compiler" to a distinct file, all games created and distributed by Monster must be open-source as per the GPL license. -- Best regards, Vladimir mailto:thecybershadow gmail.com
Sep 08 2007
prev sibling next sibling parent reply renoX <renosky free.fr> writes:
Nicolay Korslund a écrit :
 Greetings my fellow D-icans!
 
 The first release - version 0.1 - of the Monster programming language
 is now available at http://monster.snaptoad.com
 
 Monster is a rather ambitious project of mine - it is a game
 scripting language based on D syntax and written entirely in D. To
 run Monster scripts, you first compile the scripts to byte code, and
 then link the VM into your program and run them there. This lets you
 integrate the scripts into your program or game, and basically makes
 your program an extension of the language VM. Monster includes some
 advanced features, such as states 
Could you explain what you mean by 'states' here? For me a state is when you assign a value to a variable which isn't what I would call an 'advanced feature'.. renoX
 and (cooperative) multithreading.
 The concept is similar to UnrealScript, except that it is not bound
 to any specific engine (and that it is based on superior D syntax
 <g>.)
 
 Note that this is a pre-alpha release, and most features you would
 need to actually use the language (such as inheritance and memory
 allocation) are not implemented yet. There are some compilable
 examples on the web site, though.
 
 -Nico
Sep 07 2007
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"renoX" <renosky free.fr> wrote in message 
news:fbs3sk$2v30$1 digitalmars.com...

 Could you explain what you mean by 'states' here?
 For me a state is when you assign a value to a variable which isn't what I 
 would call an 'advanced feature'..
He probably means something like state machine constructs built into the language. Something that's rather useful when it comes to game scripting.
Sep 07 2007
parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
Jarrett Billingsley wrote:
 "renoX" <renosky free.fr> wrote in message 
 news:fbs3sk$2v30$1 digitalmars.com...
 
 Could you explain what you mean by 'states' here?
 For me a state is when you assign a value to a variable which isn't what I 
 would call an 'advanced feature'..
He probably means something like state machine constructs built into the language. Something that's rather useful when it comes to game scripting.
It's something borrowed from UnrealScript. From what I remember, you could define blocks of code to be in a particular state, and then that code would only execute in that state. Yes, you can do this with ifs and switches, but it's used so very often in games, it was promoted to a language feature. Tim Sweeny's a damn smart cookie when it comes to these things. With ZZT (released in 1991), it had an OO scripting language that used coroutines; the *editor* ended up being more popular than the game itself :P . Monster is certainly interesting; I look forward to seeing where it goes. -- Daniel
Sep 07 2007
parent Nicolay Korslund <korslund gmail.com> writes:
Daniel Keep Wrote:

 It's something borrowed from UnrealScript.  From what I remember, you
 could define blocks of code to be in a particular state, and then that
 code would only execute in that state.
 
 Yes, you can do this with ifs and switches, but it's used so very often
 in games, it was promoted to a language feature.  Tim Sweeny's a damn
 smart cookie when it comes to these things.  With ZZT (released in
 1991), it had an OO scripting language that used coroutines; the
 *editor* ended up being more popular than the game itself :P .
That is right. Having states as a language construct makes them much simpler and more intuitive to use. And one of the main benefits of the way states work in UScript (and will work in Monster) is that they can easily be added or changed through subclassing. The same functionality would quickly become cumbersome with ifs and switches. - Nico
Sep 08 2007
prev sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
Nicolay Korslund wrote:

 Greetings my fellow D-icans!
 
 The first release - version 0.1 - of the Monster programming language is
 now available at http://monster.snaptoad.com
 
 Monster is a rather ambitious project of mine - it is a game scripting
 language based on D syntax and written entirely in D. To run Monster
 scripts, you first compile the scripts to byte code, and then link the VM
 into your program and run them there. This lets you integrate the scripts
 into your program or game, and basically makes your program an extension
 of the language VM. Monster includes some advanced features, such as
 states and (cooperative) multithreading. The concept is similar to
 UnrealScript, except that it is not bound to any specific engine (and that
 it is based on superior D syntax <g>.)
 
 Note that this is a pre-alpha release, and most features you would need to
 actually use the language (such as inheritance and memory allocation) are
 not implemented yet. There are some compilable examples on the web site,
 though.
 
 -Nico
This sounds like a really great project! Now, I'm just a tiny bit biased, but I think the implementation of some of your features (like coop multithreading) may benefit from being done on top of Tango.</shameless plug> -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Sep 08 2007