Re: C#/C plugins for Sphere
Reply #19 –
I have to say, I'm not liking this whole fat plugin idea. It's great from the point of the view of someone using the editor, as they can just install one DLL and have it automatically work in the engine, but the issue comes with distribution. When I go to distribute my game, do I really want to add bloat by including design-time code with the engine? Probably not. Let's not forget that more code is usually needed for the IDE side than the engine side...
This is one of the reasons recent versions of Visual Studio actually separated the design-time components from the runtime stuff, to reduce the size of the redistributables.
I for one would still distribute the engine-only plugins as well. It's quite simple to make them--that's all I have right now. That's also why making a core TS plugin that needs any .NET or Mono or anything other than V8, SDL and maybe OpenGL, and possibly a separate sound library to work rubs me the wrong way. I would be willing to have the fat binaries need .NET, since the editor would also need .NET. But if .NET or Mono was needed to make this idea work, I would make absolute certain that engine-only versions also existed of all the plugins I make.
As far as the editor plugins, it makes as much sense to have both the engine and editor function at once, since what good is editing something if you can't run it? And from my experiments, it seems much simpler to make something that qualifies as a TurboSphere plugin than an editor plugin, too. Every single failed attempt I had to make a fat plugin still worked as a TurboSphere plugin.
At the same time, I know that most engine plugins won't be more than 1 MB, and just about every one should be less than 100 kb. I don't know about the editor, but almost the entire bulk of what TurboSphere requires to work, including itself, is the graphics and audio libraries and V8--and V8 is a vast majority of that size anyway. And the biggest plugins, the graphics plugin (and although I do not know for certain, I believe the sound plugin as well), generally won't need many editor-side functions at all, since editing images should probably be a generic plugin (and be used for image files, fonts, windowstyles, etc.), and for most audio files I wouldn't expect the editor to do much of anything to the files anyway.
In fact, I can fit the entirety of TurboSphere (all the binaries, or alternatively all the source including the V8 source) on a single floppy disk with room to spare. It's not much bloat at all as we have it now. And we can always move away from this system later if we choose. We could always have some plugins that are fat and some that are only distributed as separate files if we wanted, too.