Why the Lacuna Expanse is good for Perl
There have been a number of blog entries, tweets, reddits, diggs, and everything else in the Perl community over the past couple of days about The Lacuna Expanse. It's super cool to see the excitement level; it wasn't something I expected.
I figured it was about time that I made a bit of a post about it. So here I am, hoping to answer some of the questions I've seen posted, and talk a little bit about how the project came together and what that means for the Perl community. Whew! Seems like a lot for one post. =)
What is the Lacuna Expanse?
It's a massively multiplayer strategy game which is sort of a combination of EVE Online and SimCity. Here's a screen shot or two:
Why should I care?
Good question. If you like strategy games, that's obviously one reason to care. However, if you're a member of the Perl community, then you should care because I believe this game is the first of it's kind. It's a massively multiplayer multi-platform video game, written entirely in Perl (well at least the server is).
Why Perl?
I thought about and could certainly have used many other languages to write the server, but ultimately I chose Perl because of the Second Age of Perl. The new tools that have come out in the past few years for Perl made this whole process a lot faster and easier than it would have been for me to do it in another language. Not that other languages are bad, it's just that I know quite a bit about Perl already, and of all the programming communities I've been a part of, Perl has the smartest people. So I knew if I got into trouble along the way, someone in the Perl community would have a solution for me.
When you say the server is written in Perl, just how much of it?
Basically all of it. We use nginx as our load balancer, and MySQL as our database, but everything between those two is 100% pure Perl. It's all Plack, Moose, DBIx::Class, etc. I did a talk on this at my local Perl Mongers group. If you're reasonably close, I'd be happy to give the same talk at your group.
What about the clients?
The server communicates with the clients over JSON-RPC (using JSON::RPC::Dispatcher). And the clients are then written in whatever language is appropriate to the platform it is deployed on. So the web client is 100% pure Javascript. The iPhone client is 100% pure Objective-C. There are even desktop clients being written by members of the Lacuna community using Adobe Air. By using a small neutral protocol like JSON-RPC, you don't have to start religious wars about what language is best. You can use the tools that are best for the job. In my case, I thought Perl was the best tool for the server, and other languages were best for each platform. I'm certain a Perl client could be written using SDL Perl for native desktop apps, and I'd love to see that happen at some point. But our focus was not on the desktop, it was on web and mobile apps.
So why is this good for Perl then?
Well the Perl community has a lot of good things it can point at and say "Hey that's Perl.", but most of it is fairly business oriented. While business tools are great, they don't often win the hearts and minds of your average citizen. For that you need something a bit more frivolous. On the other side of the coin I think it's fair to say that the most popular Perl game to date is Frozen Bubble. I think it's a great game. I know I've logged more hours than I can count playing it, but I think Lacuna Expanse can be that next evolution. Something that's massively multiplayer. Something that can go incredibly viral.
In addition to Lacuna going viral, I'm very open about how it was constructed. Combining those two things should be a useful way to promote Perl. I'm vocal about not only that it was built with Perl, but what the architecture looks like. If Lacuna hits a mainstream audience, maybe it will help inspire a new generation of game developers to look more closely at Perl.
And finally, I've always said that marketing Perl itself is a losing game. What you really need to do is create money around Perl and create Perl jobs. If there are more jobs, more people will learn Perl. It's as simple as that. There are some great consulting and software companies like Shadowcat, Best Practical, Plain Black, SixApart, and Infinity Interactive out there doing exactly that. Those are the silent heros of Perl marketing. If you really want to help market Perl, create a profitable business that uses it. Every time you post a Perl job opening you're telling the world out there that Perl is a good skill to have.
Finally
I want to finish by saying in no way do I think that Lacuna Expanse should be some sort of hero to be worshiped in the Perl community. I've got a big ego, but I'm not stupid. I'm simply saying that I hope that by doing something that hasn't been done with Perl on this scale before, Lacuna can be a model for others in the community to think about Perl in a different way. Yes Perl is a great tool for the traditional things that Perl has been used for (data munging, web site building, server administration, etc), but it can be so much more. We just need to step outside our normal circles and we can begin to see all that's possible.
I am very excited for you personally (what an accomplishment!) and for Perl for all the reasons you stated.
Now (not to belittle TLE at all), all we need is more. Because it's always embarrassing to have one awesome thing that everyone points out whenever a topic comes up. :)
@Andrew: I couldn't agree more. Get started today. =)
As a former EVE addict, I agree there's a definite smell of that game to Lacuna.
Based on the current version of the game (I'm ignoring combat and alliances, since none of the current player base have gone multi-planet yet) the only areas that it currently seems to be lacking are the trade system.
EVE has both a conventional market system and a trade system. The regular market is primarily (and ideally) used for bulk and general commodities, and the trade system is primarily (and ideally) used for moving strange, unusual, or super-expensive materials.
Looking at the current state of the trade system, I wonder if it's going to be functional. To the extent people will use it, I think we'll see lots of highly asymmetric speculative trades, and not much in the way of legitimate ones.
Of course, taking the step of creating your own currency is a MASSIVE addition. In exchange for getting a same market system, now you need to also deal with inflation and mineral reservation (locking off certain resources that have been committed to the trade), or if you allow materials to sit on the market, having people use asymmetrical trades nobody would ever accept as a kind of extra storage space.
Yeah, trade is something we knew we weren't going to get right to start with, so we made it rather basic. We intend to go back and build a new or at least upgraded trade system after we've collected some feedback from the community. So what we have now works fine for what it is, but it's no where near what it will eventually need to be.
This post passed unadvertised under my eyes some day ago... today reading [0] in spanish, It has caught my attention...
A-W-E-S-O-M-E !!
[0] http://perliscopio.blogspot.com/2010/10/aplicaciones-no-tradicionales-en-perl.html