Thread: rs cache utility written in rust

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 rs cache utility written in rust 
    Registered Member
    excl150's Avatar
    Join Date
    Jul 2014
    Posts
    123
    Thanks given
    46
    Thanks received
    30
    Rep Power
    97
    rs-cache

    I've made a simple-to-use basic RuneScape cache utility. It has some very basic reading capabilities and supports item/npc definition loading.
    The crate is currently (as of writing this thread) at version 0.6.4. The crate is passively maintained, meaning more features will be added in the
    future once I require them for my own server project.

    Links:
    You can find rs-cache on crates.io or on github.
    To get started try looking at the documentation or the README.
    The crate contains integration tests and examples to make using rs-cache as easy as possible, you can also find more examples in the documentation.

    The following features are currently provided:
    • Reading from the cache.
    • Huffman buffer access.
    • Checksum with simple-to-use validation.
    • Compression and decompression:
      • Gzip
      • Bzip2
      • LZMA
    • OSRS Loaders
      • ItemLoader
      • NpcLoader
      • ObjectLoader
    • RS3 Loaders
      • ItemLoader

    At this time there are no other crates that offer OSRS or RS3 cache utilities so I figured I would fill the void. This is my first crate and my understanding of RSPS's could be better.
    I wanted to share this crate anyway to make it easier for other people to start their own servers using rust and as a personal learning experience.
    More loaders are planned in future releases as well as support for writing to the cache (in both protocols).

    If you have any feedback that would improve any aspect of my crate, please let me know! You can do this by creating an issue.
    I hope this crate is of some use to anyone. Thank you for reading!
    Last edited by excl150; 09-02-2021 at 12:01 AM. Reason: Updated post to reflect crate changes.
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    rs cache utility written in rust



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    good shit

    Attached image
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by Scu11 View Post
    good shit
    mtsmts
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  6. #4  
    Renown Programmer
    Bartvh's Avatar
    Join Date
    May 2017
    Posts
    370
    Thanks given
    89
    Thanks received
    208
    Rep Power
    497
    Nice work! If I can give some recommendations after writing a cache library myself:

    1. Don't push your full cache to git. You can extract groups from the cache and push those for integration tests.

    2. Split domain codecs and file codecs. So put your "definitions" in a different crate. This makes it so you can re-use the core part for multiple different games.

    3. Use Jagex naming. See https://github.com/guthix/Jagex-Store-5 for more information or check the NXT/TFU artifacts.
    Reply With Quote  
     

  7. Thankful user:


  8. #5  
    Registered Member
    excl150's Avatar
    Join Date
    Jul 2014
    Posts
    123
    Thanks given
    46
    Thanks received
    30
    Rep Power
    97
    Quote Originally Posted by Bartvh View Post
    Nice work! If I can give some recommendations after writing a cache library myself:

    1. Don't push your full cache to git. You can extract groups from the cache and push those for integration tests.

    2. Split domain codecs and file codecs. So put your "definitions" in a different crate. This makes it so you can re-use the core part for multiple different games.

    3. Use Jagex naming. See https://github.com/guthix/Jagex-Store-5 for more information or check the NXT/TFU artifacts.
    I'm not sure if my core is reusable for other games because I'm reading the entire cache into memory, this way I can return slices.
    The problem is RS3's cache is too large so I might need something like a BufReader around a file handle for reading.
    At the moment I'm only trying to support OSRS but I might look into making it generic enough to support more different games.

    About splitting domain codecs and file codecs: do you mean as a sub-crate of rs-cache or as a stand-alone crate?

    These recommendations are really helpful, thank you!
    The repository you linked looks amazing with how detailed it is! I'm going to give it a look and apply some changes to my crate.
    Reply With Quote  
     

  9. #6  
    Renown Programmer
    Bartvh's Avatar
    Join Date
    May 2017
    Posts
    370
    Thanks given
    89
    Thanks received
    208
    Rep Power
    497
    Quote Originally Posted by excl150 View Post
    I'm not sure if my core is reusable for other games because I'm reading the entire cache into memory, this way I can return slices.
    The problem is RS3's cache is too large so I might need something like a BufReader around a file handle for reading.
    At the moment I'm only trying to support OSRS but I might look into making it generic enough to support more different games.

    About splitting domain codecs and file codecs: do you mean as a sub-crate of rs-cache or as a stand-alone crate?

    See, the repository I linked as an example. I have Jagex-Store-5 as a general purpose library for reading/writing data. It can be used for JS5 client/servers or for game specific implementations. I currently only support 1 game (OSRS) which is in a different repository: https://github.com/guthix/OldScape-Cache. It uses Jagex-Store-5 to read/write the data. Reading all the data into memory can be good for stuff like file servers but other than that it's probably not that useful. I created an abstraction for just reading raw data and reading files/groups/archives. You can then also support multiple back-ends like from memory, from disk or from a remote server.
    Reply With Quote  
     

  10. Thankful user:


  11. #7  
    Registered Member
    excl150's Avatar
    Join Date
    Jul 2014
    Posts
    123
    Thanks given
    46
    Thanks received
    30
    Rep Power
    97
    Quote Originally Posted by Bartvh View Post
    See, the repository I linked as an example. I have Jagex-Store-5 as a general purpose library for reading/writing data. It can be used for JS5 client/servers or for game specific implementations. I currently only support 1 game (OSRS) which is in a different repository: https://github.com/guthix/OldScape-Cache. It uses Jagex-Store-5 to read/write the data. Reading all the data into memory can be good for stuff like file servers but other than that it's probably not that useful. I created an abstraction for just reading raw data and reading files/groups/archives. You can then also support multiple back-ends like from memory, from disk or from a remote server.
    I did not think of that when I started building.. thanks for taking the time to elaborating more. This was really helpful and I'm going to look into applying this, thanks once again!
    Reply With Quote  
     

  12. #8  
    plz dont take my wizard mind bombs Women's Avatar
    Join Date
    Mar 2010
    Posts
    1,881
    Thanks given
    724
    Thanks received
    1,162
    Rep Power
    4763
    damn thank you coder
    Reply With Quote  
     

  13. #9  
    Donator

    Join Date
    Oct 2015
    Posts
    81
    Thanks given
    23
    Thanks received
    6
    Rep Power
    24
    Does this also grab anims for items from cache?
    Reply With Quote  
     

  14. #10  
    Registered Member
    excl150's Avatar
    Join Date
    Jul 2014
    Posts
    123
    Thanks given
    46
    Thanks received
    30
    Rep Power
    97
    Quote Originally Posted by IntArray View Post
    Does this also grab anims for items from cache?
    No, I have not yet looked into getting animation ids for items. I'm using the RuneLite client as reference and I believe they refer to them as SequenceDefinitions.
    I'm working on adding all of the definitions but lately I got a bit distracted with other stuff. I will get to sequences in the future though, I just don't know when.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. runite | 667 server written in Rust
    By lepaco in forum Projects
    Replies: 9
    Last Post: 05-03-2017, 09:04 AM
  2. Npcs Cache... *Bit wtf in side*
    By T X in forum Tools
    Replies: 11
    Last Post: 03-08-2009, 02:23 PM
  3. How do I make a text be written in red in a HTA program??
    By k1ng 0f k1ngs in forum Application Development
    Replies: 1
    Last Post: 01-16-2009, 12:01 AM
  4. RS Cache Extractor
    By Elid in forum Requests
    Replies: 2
    Last Post: 09-01-2008, 09:43 PM
  5. Command Maker purely written in java (beta)
    By quest rs in forum Tools
    Replies: 7
    Last Post: 03-02-2008, 01:39 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •