Jump to content
  • Advertisement
Sign in to follow this  
Ravuya

Erlang

This topic is 4424 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Anyone using Erlang to build games? I know one guy who is working on a pseudo-MMO with it. I'm kind of interested in getting started with it for a laugh but I'd like to harass other people who have been using it for games first.

Share this post


Link to post
Share on other sites
Advertisement
Hmm... No one is responding. :D I imagine such people are quite rare.

I myself recently became interested in functional programming and have been looking at Common Lisp. I've been impressed with it so far, but I know it's going to take some time to wrap my head around certain things, having only used imperative languages in the past. I am very interested to see how concurrency is handled in Lisp, though I'm probably a few weeks (months?) away from finding out.

If I continue to enjoy the language, I can see myself trying out a game project in it. I'll have to try tracking down the source to Abuse as well, if it's still available...

Share this post


Link to post
Share on other sites
Yeah, I think that's true. Apparently Naughty Dog used Lisp in the development of Jak and Daxter, although I'm not sure if they used it to develop tools or if some portion of the game is actually implemented in Lisp.

Edit: Does the guy you know who is writing this MMO in Erlang have a website or blog where he is sharing is experiences with it?

Share this post


Link to post
Share on other sites
Naughty Dog used a custom lisp dialect implemented via Allegro CL. The language itself, GOAL, wasn't particularly functional; most of the code I have seen was imperative. In fact, the language itself allowed for embedded assembly (in s-expression syntax). This let them do all their development, from low level PS2 hacking to high level AI code, using the same language and toolset. Gameplay programmers really appreciated the late binding approach that lisp proponents discuss so much: the developers could redefine functions while the game was running, and via lisp's binding mechanism, all references to a redefined function would be updated to the newest version (only by name; if an expression closes over an older definition, the closure will not be altered to use the new one).

I have investigated Erlang a good deal. It shares some philosophy with lisp re: types and binding. Unfortunately, Erlang lacks some fundamental language features that modern Lisps have. The syntax is at times cumbersome and the module system is restrictive (although a restrictive module system is better than no module system). Aside from the 'Erlang model' of concurrency there is no support for other high level control flow abstractions. Pattern matching is at times a bit excessive. There is (iirc) a noticeable lack of 'mutation', even in the form of I-variables / M-variables (as in CML or id90). So basically, Erlang is a decent sequential language and an above average model of concurrency (processes vs shared memory threading), but there's nothing particularly exciting about it as a language.

I think the real selling point with Erlang is the quality of the implementation and the availability of high quality libraries (such as Mnesia). The approach taken by the OTP is particularly educational, I recommend you read Joe Armstrong's thesis to really get an idea of the Erlang way of doing things. It's a really great read.

As far as game development goes, I can't say that I would prefer Erlang over any other language. Erlang would really shine if you are writing a MMO backend, in which case you can take advantage of all the work that has been done to easily support fault-tolerant distributed computing. For a single player game I can't see a compelling reason to use Erlang.

Of course, I'm extremely picky when it comes to languages and libraries to use in my personal projects. It's probably the reason why I never finish any of them ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!