跳转到主要内容

Loading local FullClient

One of the most unique features of roBrowser compared to other web apps is the ability to load directly Ragnarok Online files stored in user computer.
Doing this will avoid the application to download files from a remote client, loading will be far faster, and you will save your bandwidth. The remote client is still available as a fallback if a file isn't found in local files.

It's mainly possible because Ragnarok Online data files are stored in a compressed file called GRF (Game Resource File) with a crazy size of 2Go. So loading just it to be able to extract all the data files is just awesome (specially in javascript).

In the past, loading this kind of file just crashed the browser because of too memory allocation, there were no way to stream the file and just parse part of it. But browsers vendors thought about it and implemented File.slice, a method to read junk of a file, without having to read it entierly.

At this point, it just required a zlib decompressor, and a custom DES decryption to be able to parse the file completely. I took the Mozilla PDF.js zlib decompressor with some small modifications to speed it up (the old one was using too much allocation when you can just re-use buffer) and developed a unpacker for the custom DES encryption.

So, about utilisation, it differ from one browser to another. 
In WebKit (Chrome, Opera) you can drag and drop your full client parent folder to the box to be able to parse all the files inside. It's quick, and easy. 
In Firefox, IE, and other browsers, it's a litte more difficult, there are no API to read files inside a folder, so you have to manually enter the folder, select all files (ctrl+A) and drag them to the browser.

If you are ever interested by the loader, you can check, there are some interesting hack to speed up things: