Advertisement

Advice on choosing a scripting language for game/editor combo - Python, Lua, AngelScript or a mix?

Started by July 06, 2014 01:43 AM
-1 comments, last by Althar 10 years, 4 months ago

Hello all,

Apologies for yet another "scripting language war post", but after having spent several days reading about scripting languages, deciding on the one to use, then reading another article and starting to have doubt about my choice, I thought I would ask you guys for opinions/suggestions.

I am reasonably comfortable with Python, have "some" experience with Lua - I have never touched Angelscript but I understand it is pretty much scripting in C++.

I am currently writing a game engine / remote-editor combo in C++ and have been trying to decide what scripting language to use - it is obviously not an easy decision but I could end up wasting a great deal of time if I made the "wrong choice". My motivations for embedding/extending a scripting language are the following :

  • Remote-editor
    • Plugin system to extend the editor's functionality (either authored by myself or others)
    • Export/import & conditioning assets to game-friendly formats
  • Game
    • High level logic (AI, UI, choreography) - no high-performance code - just "icing on the cake" & plumbing work
    • Modules / Player Mods (new assets / compound game objects)

I have several criteria that I am keen on, including :

  • One scripting language for both the editor/game
  • Scripting language also embedded/supported in popular art/tools is a plus (e.g. Blender, 3DSmax, etc.)
  • Fast enough / Compatible with mobile platforms for the game-side given my expected usage
  • Feature rich - Anything that would help users and/or myself writing complex/extensive plugins without any dependencies on the game/editor support (e.g. supporting version control, IO, etc.)
  • Not too bothered about memory footprint/exe size (come on, we're in 2014, an extra 10MB is not going to hurt...)

From those criteria, I have derived the following short-list :

  • AngelScript
    • Never used it before but I am well accustomed to C++
    • Fast
    • Statically typed (as a programmer, a plus - not necessarily for the average Joe)
    • C++ syntax and very easy to embed - programmer's heaven
    • Lightweight - does not come with any libraries
  • Python
    • Comfortable with & to my liking
    • Popular & trusted
    • More fiddly to embed (although boost.python should help I read?)
    • Reasonably fast
    • Dynamically typed
    • Heavy but feature rich (loads of libraries/modules)
    • Very good documentation (probably the best I have found)
    • Supported & used by a number of tools (e.g. Blender, 3DS Max, etc.) facilitating
  • Lua
    • Used it a little & don't have any problems with it
    • Seems to be "THE game scripting language" or so I keep reading
    • Fast (supposedly faster than Python?)
    • Easy to embed
    • Dynamically typed
    • Relatively lightweight but has some libraries
    • Documentation a little bit drier but still present
    • Not really as popular as Python on the third-party tools-side

So far, I would say that I am kind of veering towards Python because it feels "wiser" & more "stable". AngelScript seems like a good solution for programmers alike - but not so much for wannabe modders ; similarly I think the time gained on embedding the language does not counteract the lack of libraries (not in my case at least).

Finally, I keep reading posts about people saying how Lua is so much more superior/faster to Python - to the point where it sounds like Python is a pre-historial artifact that can't add two bytes together. It is difficult to assess the benchmarks given they are usually not representative of a typical in-game usage (I'm sorry but how often do you calculate recursive fibonnacci sequences in a game).

Any suggestions / personal experiences would be very much appreciated,

Thanks in advance,

This topic is closed to new replies.

Advertisement