Pros and Cons of Implementing a Scripting Language

  • devast8a
    17th Oct 2010 Former Staff 0 Permalink
    The pros and cons of a scripting language being implemented with Powder Toy
    Updated with suggestions in the thread. Last update: 21/10/2010

    Pros
    - Flexible, new elements could in theory be dynamically loaded from a central repository
    - Easier for noobs to get their new elements working.
    - Element and Engine code is separate.
    - With the influx of new coders (Who were unable to compile/or what have you) a wave of elements is likely to be created.
    - Engine updates can be separate from element updates.
    - May interest developers in the platform after creating their own elements.

    Cons
    - Will slow down and increase the size of powder toy.
    - Developers will have to learn two languages.
    (How ever I don't really see this as much of a problem, since a lot of developers already know quite a number of languages).
    - Requires a large rework of the current engine to properly support a scripted environment.
    - Might be buggy (Bigger chance if we're making our own, rather then using another language), requiring debugging.

    What's peoples thoughts?
  • TheWiseEyes
    17th Oct 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • devast8a
    17th Oct 2010 Former Staff 0 Permalink
    TheWiseEyes
    Quite possible.

    Though when I say slower I mean in comparison to properly written C code.
  • TheWiseEyes
    17th Oct 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • Felix
    17th Oct 2010 Member 0 Permalink
    TheWiseEyes:
    Well, yes, there is that.
    Con - If you put an error the whole game will crash, and no warning.

    ? Why would it.
  • Hellome
    17th Oct 2010 Member 0 Permalink
    Surly it could be programed to say 'error in line'line number' like in wxsand when you load a mod with errors
  • devast8a
    17th Oct 2010 Former Staff 0 Permalink
    Hellome
    Assuming, LUA or Python would be the scripting language of choice.
    Quite easily.
  • HolyExLxF
    17th Oct 2010 Member 0 Permalink
    devast8a

    LUA would be the best choice. LUA doesn't have to be OO (Python does), LUA integrates almost seamlessly with C, and it is has a much smaller library than Python would require to function.
  • Felix
    17th Oct 2010 Member 0 Permalink
    HolyExLxF:
    devast8a

    LUA would be the best choice. LUA doesn't have to be OO (Python does), LUA integrates almost seamlessly with C, and it is has a much smaller library than Python would require to function.

    How is it lua doesn't have to be OO an argument for Lua? And afaik you can program imperatively and iteratively in python.
  • Aizria
    17th Oct 2010 Member 0 Permalink
    1.) Python doesn't have to be written using OO.
    2.) How is OO a bad thing?
    3.) Python doesn't necessarily require much in the way of a library or libraries to run, in fact, if you only use the most basic core Python functions and such, you can write a Python program that doesn't require anything but a Python interpreter.
Locked by jacob1: necro