I got bored last night and figured I'd work on my old project Hylian Cartographer. By "old" I don't mean the cool looking one that I spent like forever on the rendering engine and posted all those cool screenshots, I mean the reaallly old one written in Java.
After literally 6 hours of torture (dead serious, 3am -> 9:45am), I've managed to set up a perfect plugin management class.
Hylian Cartographer (by itself) is only a single window with a toolbar, statusbar, and a desktop panel.
However, when its loaded up, the plugin manager scans the plugins directory (located in the same folder) for .jar files, scans them for the class "hylianCartographer.Plugin", loads the class via a custom URLClassLoader I wrote, instantiates 2 methods from that class called "register", and "unregister", and invokes the "register" method with the plugin api and plugin info classes as the arguments.
The register function fills out the plugin info class it was given with information such as the name, description, type, and location of the plugin (eg. location being "File>Import SMD"). The plugin is able to access any component of the entire application via the plugin api. What this means is that Hylian Cartographer is now 100% customizable and extendable
Once I clean up the PluginAPI a bit, I'll upload the main part of Hylian Cartographer and an example plugin, then go into details on how to make plugins.
I'm hoping that with it being cross platform and easy to modify, that members of the modding community will become interested in making HC the best it can be!
ah, I can read and understand it but I can't speak it (Actually I can read most languages, I guess I click with syntax)
I'm the same way with most assembly languages
Sorry about the lack of updates here guys I have been hard at work though. I've made a bunch of improvements. For example, I've simplified accessing members and methods of plugins, made it possible to access members and methods specific to individual plugins, and simplified communication between plugins. The only thing left that needs to be done is allowing plugins to declare global members and build menus using the open, save, import, and export filters that all plugins have.
But like I said before in the first post, Hylian Cartographer itself is just a shell with no functionality whatsoever. What it can and can't do is determined by the plugins the user uses and how those plugins communicate with each other. For example, someone might make an F3DZEX viewer plugin, and another person might make a filesystem viewer that searches for that plugin and if it exists, initializes the methods it'll be using and allows the user to view files by double clicking them. Or perhaps another person might want to add a F3D viewer for SM64, and they might hook the menu item for the filesystem viewer, have it determine if the rom is a SM64 rom, if it is build a list of files in the SM64 rom, and then returning control to the filesystem viewer.
sweet! And thanks for making that post, you reminded me that I still *have* to work on my game engine (tasks left: finish integrating bullet, make it more modular (I already designed the system), rewrite some stuff)
Sounds interesting you should make a topic for it.