Under the hood

Medieval Realms 0.0.4 doesn’t introduce many player observable changes but does reflect a huge under-the-hood upgrade to the MR Plugin. Many players might have noticed that the server was crashing out a couple of times a day. These crashes were caused by the way the AXES program was written. AXES used a SQLite database and the implementation was causing something called a Java Virtual Machine crash in native code (caused, I suspect by a race condition). The more people on the server, the more frequent the server was crashing. Bad times. As rolling back the plugin after so many people had already set up AXES protection wasn’t really an option I wished to take, I had to with hasten rewrite the code. Eighteen hours of coding later and the database bridge was totally rewritten, and this time using MySQL. I then wrote a migration application to migrate the data from SQLite to MySQL so everyone’s AXES areas were brought across to the new plugin.

The upside of all of this is that the server is now totally stable and has not crashed out once since the upgraded code was made live. The downside is that everything else was put on hold whilst this critical issue was addressed.

Many of you may have noticed that I was in the process of introducing a currency system onto the server using ingots. This is now my main priority. Mainly as the currency is what players are going to use to buy and sell land with on the server! I am but one man, and I am doing this in my spare time on top of my full-time day job whilst paying off a mortgage and looking after my family. I only have so much time! So please bear with me.

The introduction of the currency system may take a few weeks at least. I want to make sure it’s right first time and is not going to cause any further headaches. In the meantime, protect your most critical assets with your four AXES claims. If you see me on the server, I will aid you with the LUA Area Protection script to set up temporary protection areas. Once the currency system is fixed with MR 0.0.5 these temporarily protected areas will be removed and you will need to protect them yourselves with AXES.

There are two more changes.

The first of which is the removal of player files from the server and a move onto a MySQL database design instead. Up to now, each players’ statistical information were stored in a Medieval Realms Player Object file, a process known as Object Serialization. This isn’t a text file! It is a binary file. It turns out that this approach isn’t easily extended and worked on as the files require a specially written program to access the data held within them.

Moving Medieval Realms completely onto a MySQL design makes a lot more sense! Specially as the database is now setup for AXES.

This upshot of this move does unfortunately mean that all player statistics will be reset. Rest assured this is the only time this will ever happen! Migrating data from within binary files would require me to write a migration application, which would effectively only ever be used once. I would rather invest that time in adding to the servers features. Putting a positive spin on this; if you’ve died on Medieval Realms your “times died” counter will be reset to zero.

The second big change I want to talk to you about involves the removal of Mithril Ingots as the ingame currency. After trialling the approach for a few weeks and receiving feedback from players I have come up with a much better method to purchase and sell land. Do not threat though, your ingots are still valuable! All will be revealed in 0.0.5!

Medieval Realms 0.0.4_6 introduces a taster of 0.0.5 with our new medieval styled currency system: Crowns! Beforehand players were rewarded with one Mithril ingot for every six hours of gametime (something that not everyone got due to serialization issues), now players will be rewarded instead with crowns on a greatly reduced timescale.

Initially, whilst we find our feet, each chunk of land will be worth 1,000 crowns. And each player will be given 4,000 crowns to start with (like the four ingots before). Please note that exchange rates are being designed to fluctuate with supply and demand. Those who have ingots still in their ingot safe – I suggest you use them up before Friday so you don’t lose out.

See you in the Realms!

Change log:

  • [Bugfix] Server stability issue fixed with complete code rewrite