I have come to a point where I don’t know how to proceed so I ask my fellow monkeys, maybe someone knows how to get that Banana
It’s basically about how to design my Scripting-API/Interface. This is related to everything: The GUI, some Plugins/AddOns and even AI Design.
Being an ex-WoW-Addict and modder for racing games like world racing 2, having scripted some hl2 scripts I want my game to be as open as possible.
What did I achieve so far?
Because I was too lazy to write tons of interfaces/helper functions and because it was AI related I simply made a directory where I threw in all AI Behaviors and they got compiled during runtime.
Currently this isn’t a problem for me because compilation is faster than loading the map, but it also comes with a drawback: I need to package the way bigger jdk over the jre.
Honestly, if somebody with some knowledge in programming wants to create a plugin, he could compile the files and replace/drop them into the jar aswell, I guess you could even set up ant/gradle to do so.
The WoW approach
WoW uses LUA Scripting along with their own wrappers for their GUI (which I like, it’s just quite some work).
This would be good because I currently use Lemur and t0neg0d-side-by-side.
I also like how WoW has the default UI as “Addons”, so I could code “backend-indepently” aswell and maybe reuse that code for other games I plan to do in the future.
The downside of this is I’d need a proper
eventManager.registerEvent(Event.OnPlayerDead, thisproc); for each event. When supporting java one could simply access the linked list (I know I am lazy )
My new Idea
Another thing I see is the lack of libraries, say, one wants to code some window which announces the current stock-exchange values in chat or in a GUI Frame. He would have to code http requests and json parsing in lua (if possible at all) or the GUI in Java, which are things I dislike.
So I thought about allowing both, the lua and the java scripting both using the same interface.
This way one could add his network/json in java and the GUI in lua.
I only wonder how the communication between the two should work?
So I don’t know what I wanted to achieve with this post but I am happy about all input.