Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ MUD Design Concepts ➜ Mud Scripting, Alternative to Lua.. GameMonkey

Mud Scripting, Alternative to Lua.. GameMonkey

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Altered   USA  (7 posts)  Bio
Date Fri 30 Jan 2009 07:12 AM (UTC)
Message
Hello,

I didn't really care much for Lua as a scripting language years ago but I followed the author of GameMonkey from the very beginning. Some of the concepts are based on Lua and can do the same thing it seems from in game scripting.

If you are thinking about Lua but wondering if there are any alternatives, check out GameMonkey.

http://www.somedude.net/gamemonkey/

Example from Homepage;
---

OnDoorTriggerEnter = function(door, objEntering)
{
  if(objEntering == player && !door.IsOpen())
  {
    door.Open();
    return true;
  }
  return false;
};



---

Chris
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 30 Jan 2009 07:50 AM (UTC)

Amended on Fri 30 Jan 2009 07:53 AM (UTC) by Nick Gammon

Message
Quote:

I didn't really care much for Lua as a scripting language years ago ...


Why? It has evolved somewhat since a few years ago. It is easy to integrate into C or C++ programs (like MUSHclient). Also various mainstream games use it (like Blizzard's World of Warcraft).

See here for a great success story and rave review (by Aylorian):

http://www.gammon.com.au/forum/?id=8306

Let me quote him, if I may:

Quote:

Performance has been fantastic. With literally millions of prog executions per day, hundreds of paused couroutine threads running at any given time (pauses in game progs), 3,500 old "mobprog" style progs converted to Lua plus around a thousand more since it was added, we experience no lag from GC whatsoever and the debug lib is reporting just under 10M usage at time of writing with a peak around 16M during the night.

...

Bottom line, if you're wondering whether it is worth the work to convert to Lua, it absolutely is. Our builders love it and even mention side benefits like being able to put a "real" programming language on their resume. They are just now starting to realize they can create arbitrary commands in a single room only using lua, and even override game commands.

It is fast, stable, and mainstream. We've had several people who know MUDs convinced we took an LPMud and gave it a "diku-style" look and feel after going through our starting area -- that is always a compliment. Hope this isn't coming over as trying to "show off", that isn't the point. This stuff is exciting and I just can't rave enough about how great Lua has been for the MUD and the potential it opens up if you can find people creative enough to use it well.


In scripting language comparisons it tends to come out one of the fastest, but has a very small footprint to download.

Your example code looks like Lua. ;)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Altered   USA  (7 posts)  Bio
Date Reply #2 on Fri 30 Jan 2009 08:58 AM (UTC)
Message
Hell Nick,

The main reason back then was probably because I was still a bit new to c. I see now though that some of the more popular muds like Aardwolf use lua in thier new custom codebase and have some developer examples on the site.

After seeing what Aardwolf has done, it does seem like a really nice system when you get to see it up close.

http://www.aardwolf.com/lua.html

I may have to check Lua out again. I there are various posts on these forums about lua. Looks like a nice place to start.

Chris
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Fri 30 Jan 2009 05:47 PM (UTC)
Message
Nick already said it but it's worth repeating: Lua has changed a lot over the years. For example, coroutines might not have existed when you previously looked into Lua, but coroutines are a very powerful tool.

Judging just from the example you gave, it looks like GameMonkey is kind of like Lua but with Cish syntax.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 30 Jan 2009 07:36 PM (UTC)
Message
Quote:

Nick:

Your example code looks like Lua. ;)

David:

it looks like GameMonkey is kind of like Lua but with Cish syntax.


You are right David, of course. The && instead of "and" is a giveaway. However the function declaration looked like Lua.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #5 on Fri 30 Jan 2009 07:59 PM (UTC)
Message
Oh, sorry, I meant to be agreeing with you. :-) What I meant to say was that it probably is a form of Lua under the hood, just with a different parser.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


20,498 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.