[MySQL/RuneScape] My RuneScape Storage Solution

GhostSnyper

Active Member
Joined
Jul 29, 2010
Along with my server I've been developing, i've come up with a design for database storage that will allow for very quick way to retrieve items. The whole design is complex, so for now, I'll be showing you how it looks database-side.

As you know, most old school servers use a file called item.cfg, which stores all information about items. It looks like this...

1bafaa063f130dff27b621deffc66497.jpg


This is a HUGE wast of space, because of the way it's formatted. That style of configuration, which is used in more than 80% of sources uses the following style:

Code:
item = [item ID] [Name of Item] [Description of item] [lowalch value] [high alch value] [next 10 numbers are stat bonuses]

Now because of this style, it allows weapons and armor to be configured in there; unfortunately, 95% of the items listed in there do NOT require status modifications. Keeping that in mind, for 95% of those items, we just wasted 8-10 bytes of data. Not a lot, but in a programmer's sense, that is unacceptable.

Now I've taken some time to develop my new concept. It's a work in progress, but I've got two tables fully set up, and with data in them (one of them is complete).

Now As I've mentioned about the item,cfg, not every item needs bonuses, so I've made a table specifically for the base information about the items. It looks like so:

8aa74161755f139d42f9276d0057d380.jpg


Now that alone just cut the storage requirements of the item configuration file in HALF! Also, if you've noticed, the database solution doesn't have _ for spaces, as you see in the configuration file. I'll go into detail about that in my next thread.

Continuing on, I had to find a proper solution for the offensive and defensive items. If you will notice, there are several files on top of that that that help describe these items. A good example is 2handed.dat... It's a file whose sole intention is to list to two handed items; it's all clutter. I've taken a solution and took it a step further. Rather than having attack speeds hard-coded into the server, save space and make it dynamically loaded from the database!

8728ad1a1e98d015856acfeb4d30722c.jpg


Now that isn't finished, because I am writing a program that can get their proper bonus values from the RuneScape website. If that doesn't go well I'll have to ask around to see if I can get the accurate bonuses


That's all I got to show right now. The other parts of the database are currently in the design process, so I don't wanna sow anything premature
 
Oh? What do you mean, mike?

From what I have been able to research, I think they use a form of oracle database. I don't know what or how they store their data, but I'm implementing my best efforts at what I think they'd do to manage their data
 
Professionalism at it's best. Well done. You've done so many pioneering things to sources. I think it's about time you start putting them all together to make one uber JAVA source.
 
This is coming along nicely now Ghost, I remember speaking to you while you was just starting to develop the system. Good luck in the future, it's looking great.
 
I'm putting together the mock design for the rest of the system today. Let's see if I can't get some things done this evening
 
It's very worth it... half assed system loads 4x faster using the standard rsps method.. Still runs slow. Going to fix that

In the end, it's going to take 5 times longer to load, but that's the compromise when you have <1ms load times
 
Back
Top