Advertisement

Perl in Game Scripting

Started by June 29, 2004 09:38 AM
5 comments, last by Arild Fines 20 years, 4 months ago
Greetings, everyone. I am proficient in Perl, but I do not know if it is a proper scripting language for use in computer games. 1.)Do any of you know if there is a game which uses Perl as one of its scripting languages? 2.)Do you think it would be better to learn Python or Lua? 3.)Would it be better to create my own scripting language? Please answer as many of these questions as you can!
The gaming industry likes to use Lua or their own homebrew language. I've been using Lua quite extensively now, and can say that it has worked for everything I've thrown at it.
Advertisement
Lua, Python, Ruby, and Scheme are all good choices. Perl tends to be an extremely "heavy" language to embed in a game, and is probably not the best choice.
Or, if you like C, you can try Small
It's a very nice and fast scripting language :)
Although you are proficient in Perl, many potential modders and scripters will be dismayed by its syntax. It's a good idea to keep the scripting language simple. Python and Lua are fairly simple to learn, but if you want a syntax you're familiar with, you can also try &#106avascript from Mozilla</a>. Most coders will be familiar with something of that sort, from C/C++, or PHP, or &#106avascripting web pages.<br><br><!--EDIT--><span class=editedby><!--/EDIT-->[Edited by - Matei on July 4, 2004 7:26:35 PM]<!--EDIT--></span><!--/EDIT-->
Personally I think Perl would be a fantastic language to use for scripting in a game except for two major problems:

1. The perl interpreter is a NIGHTMARE to embed in your application

2. C/C++ functions are a NIGHTMARE to expose to Perl

And who knows how data-objects such as classes, structures, variables are. I've never looked into it.

Better to quickly learn Python or Lua as the others recommended. Both are designed to be embedded and exposed, where Perl is not.

- Jason
Advertisement
Quote: Original post by Anonymous Poster
And who knows how data-objects such as classes, structures, variables are. I've never looked into it.

It's incredibly ugly and obtuse, like everything else in Perl.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement