FOnline Development > Questions and Answers
Source codes of FOnline Reloaded 2nd season (only server executable)
(1/1)
Powerack:
Hello to everybody. I would like to start working on FOnline: Reloaded S2. I have a few ideas on how to make a little bit of it. For example, autostart server (no need manual start) when program runs and compression of saved positions would be appropriate. I would use zip compression. Just for example: unpacked save has 46 MB, packed 1.1MB. It seems to me unnecessary to store that amount of data. My server saves the game after 1 minute due to possible problems. In a day it makes about 5 GB of data, because not all the positions remain on the disk.
If possible, I would like to obtain the FonlineServer.exe (season 2 - version 0506-EC or newer) source code for adding the required features.
Wipe:
--- Quote from: Powerack on January 06, 2019, 03:53:02 pm ---autostart server
--- End quote ---
FOnlineServer -start
--- Quote from: Powerack on January 06, 2019, 03:53:02 pm ---My server saves the game after 1 minute
It seems to me unnecessary to store that amount of data
--- End quote ---
HHHMMMMMMMMMMMMMM, i think i found a problem :P
Anyway, complete FOnline repo can be found here; just compare commits dates with old xp-dev repo until you find a match.
Powerack:
I just wanted to point out that the position would be better to compress. These are data files with a large number of empty spaces. After archiving, the resulting values are up to 45x lower. I think developers could implement a zip library, for example. In any case, I will try.
Wipe:
Well, good luck, just remember that worldsave size won't stay the same all the time.
As game grows (both in content and playerbase), so will worldsave; each and every time world is saved, engine will have to waste time on compression, while in reality you'll need only very small % of nicely compressed files - when you restart server. Just take notes how many files are created, and how many are actually used.
I'd rather work on external tool/script which takes care of compressing worldsaves once engine creates them; just making sure N most recent files are left as-is, so they can be loaded after restarts. Having tool/scripts is simply easier to maintain in the long run - if you ever decide to update engine, you'll still have desired functionality, without need for porting engine changes. Same if you decide to work with team which, for any reason, cannot implement your changes. As a side-bonus, it could be adjusted to work with any other application generating files constantly, not just FOnline server.
Just my two caps ;)
Kilgore:
Yeah, just make a script that runs periodically, compresses worldsave files then deletes them, or whatever else you need.
The only problem that remains is when you use SSD and large worldsaves (>100MB) being saved every minute can result in hundreds of GB of disk writes every day, then the drive would last only several months... the good news is that large SSD are cheap nowadays.
Navigation
[0] Message Index
Go to full version