Friday 29 July 2016

libGDX and Editor update

Over the past year I've made some significant changes to the Zaria framework and the Zone Editor. Polish, improvements but also I slimmed down it a bit.

Zaria has been working for a very long time on top of jMonkey Engine 3.0. As amazing as that engine is it proved a bit troublesome at times. Quite a bit of my game projects hit significant delays, because functions that would be expected to just work, would not. All 3d projects hit problems with physics, stable rendering of shadows or general performance. All of these can be worked out of course, but my ambition was never to write a game engine, it was to create a framework for quick development of cRPGs (along with such games).

Given all that I decided to take a step back and more conservatively look at what can be done. It would seem that for the time being scaling down and developing a 2d game was a good way to go.

jME3 is great 3d engine, but is not particularly good for 2d projects. I decided to look at the other big Java game engine/framework - libGDX which had very good 2d support (as well as some other really cool features like HTML5 support).

Switching the backend is never simple. So it took a while to decouple Zaria from jME3. The benefit of that is that Zaria and the Zone Editor is now agnostic in regards to backends. It can be used for any Java game engine and all specific code is now put in separate libraries. It also made development for Android simpler as I abstracted all desktop specific code as well.

There are many things still to do. Fixing jME3 support to work with the new abstracted logic (I've been working exclusively with libGDX for now), adding a plugin architecture to the editor, so custom, engine specific editors could be added easily, while still making the core editor engine agnostic, adding netbeans/eclipse plugins for common Zaria actions and types, improving documentation and howtos. However this drastic change was good for the whole project. Made me think what it is actually supposed to be doing and how to implement it in a clean way.

Along the way I managed add two new features to the editor that I really like. One is suggestion support to the script editor, to make scripting even easier:


Now when scripting Ctrl+Space will show a dropdown with all possible functions that can be used at the given moment (pretty much like any IDE).

Another thing is I added support for Value and Function types. These can be used by different definitions provide a value (like how far the fireball can go in regards to character magic stat). However because thet are definitions by themselves, they are easy to tweak from the editor. Plus the CurveFunction got its own custom editor (strongly inspired by the libGDX Particle Editor):


You can add points which will define the function, zoom in and zoom out. Currently three types of functions are supported: Linear Interpolated, Spline Interpolated and Polynomial.

And yes I did (finally!) change the color scheme to dark.

I'm continuing to work on the project. New cool things are coming.