Wednesday, January 29, 2014

Heart Realm Update #010

I recently got back into working on Heart Realm after having been away from it for about a month or so. I had been working on another project which I started with the intent of it being a short term project, as in I don't plan on working on it as long as Heart Realm and would hope to finish it in a much shorter time.

Since the last update I had worked out how I would go about implementing Lua scripting into the game. I came across a Java library called LuaJava which I had some trouble implementing due to some compatibility issues. Turns out it was just something stupid. The .dll and .jar files were compiled to run with a 32-bit JRE, and I was running a 64-bit JRE. My initial solution was to run the make files provided with the source of LuaJava to make a 64-bit version, but I had no luck. I then realized that the problem was in fact the JRE version I was using being 64-bit. I had the 32-bit version on my computer but was not using, for some reason, so I switched the project over to using the 32-bit JRE and now it's all good.

With the implementation of Lua into Heart Realm I am currently working on converting over most data files into Lua scripts to allow for more depth in them. Right now I have the few enemy types converted to Lua scripts and I'm now working on implementing the AI as Lua scripts instead of having a whole bunch of Java classes. So far it's been a whole bunch of trial and error since I've never worked with Lua before, especially with Java so it's been tricky. Fortunately I'm starting to get the hang of Lua and LuaJava specifically. I'm realizing how great it will be not only for just simply static enemy, items, and equipment stuff, but for all kinds of things like adding extra effects to items or equipment that would have required a series of classes to get the same effect. I can use Lua for any UI related stuff if I'd like to, which I will probably implement at some point. There's a number of things I can now use Lua for in Heart Realm.


~ Rogue Templar

No comments:

Post a Comment