TCL vs Lua - scripting a mmo server

Byron Whitlock picture Byron Whitlock · Sep 10, 2009 · Viewed 10.1k times · Source

I have a c++ server side project that I need to embed some sort of scripting into. It is part of an online MMO type of server. I have significant experience using TCL, and it seems like the natural fit. I've done a minimal amount of Lua in my game dev days, and I wonder if this might be a better language for embedded scripting. It is also nice to learn a new language. What are the relative strengths and weaknesses of TCL vs Lua? Thanks!

Answer

RHSeeger picture RHSeeger · Sep 10, 2009

Honestly, they're both extremely well suited to the task. Both are easy to embed in an application and have a fairly simple syntax. I know for a fact that it's extremely simple to add new commands (to interact with the application) in Tcl, and I'm told Lua is very good at this type of thing, too.

My recommendation would be to play around with Lua for a while to see how you like it (since you already know Tcl)... and then pick the one that feels most comfortable to you. If you're writing much of the code, you'll wind up working with it a lot, so you'll need something you can use, too. In the end, both language choices should be fairly easy for your end users to script in.

My personal preference is Tcl, both because I don't like Lua (I've done a reasonable amount of programming in it for Warcraft addsons) and because I love Tcl (I've done a LOT of programming in it for both professional and private work).

Edit: Added the note about both being easy for end users. Got 2 down votes and couldn't think of anything else that it might be for other than not clarifying the why part of my statement.