Over the course of two years I have written many bases for a variety of builds. and through this time I have never used one for a project that was successful. I always wanted to create a base that could have the simplicity of taking a plugin written by another developer or from a previous project, and adding it to server. Although this sounded like the right way to go, I had many things to learn; so I kept writing more bases until I developed a style and understood the RS client as well as I could. Of course staying within the realm of Java was a bit stupid, because the limits to what you can do in Java became very apparent as time went on, so I looked into doing a server in a different language. The issue I always came across though with each language I tried was the comparison of Java's ease to port to other operating systems. (And also to add onto this, the fact that nearly the entire RSPS community knows Java very well compared to say C or C++.) So with the stage set I went about researching each scripting language, I tried each one and investigated their syntax, speed and difficulty to integrate with Java. I came to the conclusion that Lua, for its speed and basic amount of features for what I needed was the right choice. Although my original idea of Gamma was from I originally planned, the plugin system has not changed. Please note, Gamma is still subject to change as it is an ongoing project.
Please note that features are currently in development, and refined features will be reported as they become available. I do not want to see questions as in, why are these sections incomplete when I have yet to fully refine my design and implement their systems. I rather not lie about what has not been finished in short.
3rd Party Libraries
[Only registered and activated users can see links. ] [Only registered and activated users can see links. ]
Core Resources
With Gamma, the expected development process is to develop using Lua only; by using the Gamma Java API. Although the server is expected to run from Java, the structure in which the server is run is made so that java functions can be executed in Lua, Lua libraries that are ported to java for other plugins to use.
Gamma Scripts -
Because of some cross platforming issues, plugins may require an external script to load properly. These scripts are only for plugins and do not have have any other function within the server.
Example Script*:
Code:
--Check if the path has been initialized
if PATH_INIT == nil or PATH_INIT ~= true then
--Create and set the directories
SCRIPTS_DIR = "C:/Users/Hadyn/Projects/Gamma/bin/scripts/"
PLUGINS_DIR = "C:/Users/Hadyn/Projects/Gamma/bin/plugins/"
--Create the PATH_INIT var and set to true
PATH_INIT = true
end
*This script has been removed but I left it up as an example.
Lua Package -
Spoiler for Lua Objects:
LuaFunction
LuaEnvironment
LuaLibrary
Spoiler for Factories:
FunctionFactory
EnvironmentFactory
LibraryFactory
In Development...
Plugins
Plugins will be loaded on application startup, using a YAML file the application will load the plugin dependencies and libraries before the plugin is then initialized. Each plugin will have its own LuaEnvironment which is pushed to the environment.
--Check if the path has been initialized
if PATH_INIT == nil or PATH_INIT ~= true then
--Create and set the directories
SCRIPTS_DIR = "C:/Users/Hadyn/Projects/Gamma/bin/scripts/"
PLUGINS_DIR = "C:/Users/Hadyn/Projects/Gamma/bin/plugins/"
--Create the PATH_INIT var and set to true
PATH_INIT = true
end
I have tried and always have issues, its better for now to have them set their own directory for the moment being until I come up with a solution. Setting your install path on Linux should not be a problem. Thanks for mentioning this so that others can understand why I did this.
Fixed the problem, but I need to implement it a little better.