Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-04-2008, 03:17 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Item System Efficiency

I want to redo Zodiacs item system. It's currently a mess. Each weapon has a file. There is than another file for every suffix/prefix/combination available for that weapon. In short: it's disgusting.

The items the player has are then stored as so

clientr.item-Bronze Cutlass=4,weapons/sword/bronzecutlass

The descriptions for each item the player has seen are stored like this

clientr.muditem_Bronze Cutlass="Bronze Cutlass",weapon,sword,hadez-bronzecutlassicon.png,hadez-bronzecutlass.png,zodsword,12,46,"","level,8",0.4, 1230,Neutral,0,0,0,1212634527.719118118

First off: I'm going to remove the need for new files for suffixes/prefixes. That's easy enough to do without a new file. Secondly, I want to do away with the item descriptions in clientr. vars. Can make a cache of item descriptions which is downloaded when you connect. Can make it check if the cache has been updated.

My question concerns how to make the most efficent item system possible. Should I
  • Keep all these individual files and load from them when required? (harddrive access, lots of little files)
  • Create one large online cache file which can then be parsed for the item details (harddrive again, read time)
  • Load each file into a kind of object database so scripts can access the data directly (memory usage, no harddrive)
  • Make each item into a wnpc (soo many damn weapons)

Possibly even a combination of these (like load the online cache into an object database). I could maybe only make the server load an item into memory when it's needed and have it clear the object database every hour or something?) Maybe a SQL server would be the best option in the end. I'm leaning towards loading the items into memory but I don't know how much memory each vserver has available to it plus the harddrive access time on the servers could be so minimal it doesn't even matter.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.