View Single Post
Old January 12th, 2012 (6:06 AM).
tinix's Avatar
tinix tinix is offline
PearlShipper & C Programmer
    Join Date: Feb 2010
    Location: Bratislava, Slovakia
    Age: 20
    Gender: Male
    Posts: 86
    Originally Posted by Darthatron View Post
    Ugh. That would take so much effort to implement. It's going to be open source. People can just edit it.
    Well I dont really think it would be painful at all. Before I posted that idea Ive tried to throw together a little program in C# that would load an assembly that has specified entry point and invoke the entry point of assembly. (Essentialy the idea of plugin system was an DLL written in .NET language with specified entry point that would get invoked from the main program) The code for loading the DLL is 6 lines long:

    string path = Assembly.GetEntryAssembly().Location;
    string[] s = path.Split('\\');
    path = path.Remove(path.Length - s[s.Length - 1].Length, s[s.Length - 1].Length);
    Assembly a = Assembly.LoadFile(path + "test.dll");
    MethodInfo m = a.EntryPoint;
    m.Invoke(null, null/*Here could go pointer to main form, or exposable data structure or whatever*/);

    This would need little modifications to work in the editor but it is the essential part of it.
    And to your response that it will be opensource. That is a good thing, but plugin manager is useful anyway, because if you will release a new version with lets say important bugfix in compiler code, some people could be using modified branch of editor with ASM compiler and syntax highlithing for example. If the modification would be plugin the person that is using it just needs to load it in new version. But if it would be a fork of the source, then they would need to wait for a day or two for new modified version or give up their modification and upgrade instantly. So you need to consider this fact.
    Pokémon games I own:
    Pokémon Diamond
    Pokémon Platinum
    Pokémon Ranger: Shadows of Almia
    Pokémon HeartGold Version