Jump to content

[MySQL/RuneScape] My RuneScape Storage Solution


GhostSnyper

Recommended Posts

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...

 

http://www.offtopic.forum/data/MetaMirrorCache/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:

 

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:

 

http://www.offtopic.forum/data/MetaMirrorCache/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!

 

http://www.offtopic.forum/data/MetaMirrorCache/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

~GhostSnyper

http://www.sucksbbs.net/data/MetaMirrorCache/a93f4ef4fcc890cf1176696b63e0a9c2.jpg

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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

~GhostSnyper

http://www.sucksbbs.net/data/MetaMirrorCache/a93f4ef4fcc890cf1176696b63e0a9c2.jpg

Link to comment
Share on other sites

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.

Kind Regards,

Tyler.

vBNT Radio Manager

 

http://www.sucksbbs.net/data/MetaMirrorCache/08a610cb65a9498230ae5c3ab0c64b45.png

Link to comment
Share on other sites

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.

http://www.sucksbbs.net/data/MetaMirrorCache/4b7c167989fcb2576ec6734d8fc09f65.png

"I never see what has been done; I only see what remains to be done.." - Buddha

 

| My Profile | Message Me |

http://www.sucksbbs.net/data/MetaMirrorCache/afe9fc48e7c419d8083d4c0f4a15ee85.gif

Link to comment
Share on other sites

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

~GhostSnyper

http://www.sucksbbs.net/data/MetaMirrorCache/a93f4ef4fcc890cf1176696b63e0a9c2.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...