View Single Post
  #33    
Old January 12th, 2012 (06:06 AM).
tinix's Avatar
tinix
PearlShipper & C Programmer
 
Join Date: Feb 2010
Location: Bratislava, Slovakia
Age: 17
Gender: Male
Quote originally posted by Darthatron:
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:
Spoiler:

Code:
 
 
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

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77