1. #1
    I want to post something Monguse brought up in the Paint Schemes Thread.

    It is an explanation (based upon experiences) how the NetCache folder works and how a small tool would help to increase the use of user made skins in the IL2 online flying comunity:

    First of all thanks for resurrecting this thread as this is sorely needed for everyone not just servers.

    Before I continue let me say to Mysticpuma2003, yes I do find time (at times) when I'm not skinning.

    Let me explain the benefits:

    1. No lag
    2. No lag
    3. No lag

    I think that about covers it.


    The negatives.....

    None that I can think of at the moment.


    How does it work and how we found out:

    Gozr one day decided to start a Historical Server were most of us hard core history enthusiast could congregate. One of the requirements was historical skins. As you and everyone else knows, historical skins is at the forefront of what most of us create, and without a venue like a skin DL server it becomes an exercise in futility.

    The story is like this. Before the Historia Server went full bore, Gozr, Toad and I sat on the tarmac on three separate nights trying to figure how skin DL worked ; more importantly, what events occurred, when and how.

    On the third night we were looking at the net cache and rifling though bitmaps when Toad asked if I had his pilot skin. I said what "do you look like", Gozr said I found it and he read out the weird bmp number. That's when it hit me D'oh!

    The bmps are translated to the same name and have identical names across every machine that requested the picture from the originator.

    Let me explain.

    The Originator would be a person that had a skin that no one had. That person is flying on a server/coop whose (server/coop) settings allow for skin DL. A conversation is requested from the server to the Originator, requesting the skin. Once the skin is requested by the server, the server IL2 host (using internal code) creates a GUUID file. When the complete file is downloaded to the server , the server then dispatches the skin guuid to all participant who are requesting the skin (see below 1a).

    (1a) Participant on the server must have Skin Download button turned on in their game network setting.


    Here is a small ASCII picture with sequential numbers of what probably happens:

    ...4*..............2*...........3*
    User 3 <--> Server <--> User2
    .................^
    .................| 1*
    .................|------> User1 (Originator) Skin request

    Double arrows denote conversations to the server and back to the originator's machine
    Sorry for the dots...

    The picture above explains the typical conversation, "Do you see my skin yet" , "No not yet".


    So were does lag come from?

    1. Step 1* - Your machine lags when you are downloading the skin to the server.
    2. Your machine lags when you have downloaded a skin and the screen refreshes.

    You do that with 30 people and well... we have lag, simple as that.

    So how do you get rid of lag and enjoy the immersion with historical skins? One way is to share the Net Cache, silly but doable. The other way would be to rifle though the entire Netcache and fish out the skins you want to share, not a good option either.

    A stop gap measure would be to have the skinner provide 2 skins, one for the intended folder, the other for your personal net cache. Now with the later we still have a small problem, rather than downloading a zipped 1 meg file now you are downloading two 2 meg files (hopefully zipped). However, that would increase bandwidth usage for your system but also for those that provide skins for the community.

    So what's the best way? In my opinion the only sure way of reducing lag to a minimum would be to have a small executable that could copy and convert a bitmap names into their respective guuid name allowing the end user decision to have lag or remove much of it.


    This would also allow servers/coops to host mission specific skin packs, have the user download
    the skin pack, have the program copy and convert the files and place them in the net cache folder.

    I want to thank everyone here, especially my patient friends that allowed all of this to be figured out.


    Let's see were this leads.

    'Guse

    As a side bar note, have more skins comming ...
    See the original topic here:Monguse's NetCache Topic

    It would be great to get an official statement if such a tool could be made or at least the key for converting the skin filenames into the "GUUI"- names could be made public to help us developing such a tool.

    Thanks!
    Simplex and Monguse
    Share this post

  2. #2
    I want to post something Monguse brought up in the Paint Schemes Thread.

    It is an explanation (based upon experiences) how the NetCache folder works and how a small tool would help to increase the use of user made skins in the IL2 online flying comunity:

    <BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">First of all thanks for resurrecting this thread as this is sorely needed for everyone not just servers.

    Before I continue let me say to Mysticpuma2003, yes I do find time (at times) when I'm not skinning.

    Let me explain the benefits:

    1. No lag
    2. No lag
    3. No lag

    I think that about covers it.


    The negatives.....

    None that I can think of at the moment.


    How does it work and how we found out:

    Gozr one day decided to start a Historical Server were most of us hard core history enthusiast could congregate. One of the requirements was historical skins. As you and everyone else knows, historical skins is at the forefront of what most of us create, and without a venue like a skin DL server it becomes an exercise in futility.

    The story is like this. Before the Historia Server went full bore, Gozr, Toad and I sat on the tarmac on three separate nights trying to figure how skin DL worked ; more importantly, what events occurred, when and how.

    On the third night we were looking at the net cache and rifling though bitmaps when Toad asked if I had his pilot skin. I said what "do you look like", Gozr said I found it and he read out the weird bmp number. That's when it hit me D'oh!

    The bmps are translated to the same name and have identical names across every machine that requested the picture from the originator.

    Let me explain.

    The Originator would be a person that had a skin that no one had. That person is flying on a server/coop whose (server/coop) settings allow for skin DL. A conversation is requested from the server to the Originator, requesting the skin. Once the skin is requested by the server, the server IL2 host (using internal code) creates a GUUID file. When the complete file is downloaded to the server , the server then dispatches the skin guuid to all participant who are requesting the skin (see below 1a).

    (1a) Participant on the server must have Skin Download button turned on in their game network setting.


    Here is a small ASCII picture with sequential numbers of what probably happens:

    ...4*..............2*...........3*
    User 3 &lt;--&gt; Server &lt;--&gt; User2
    .................^
    .................| 1*
    .................|------&gt; User1 (Originator) Skin request

    Double arrows denote conversations to the server and back to the originator's machine
    Sorry for the dots...

    The picture above explains the typical conversation, "Do you see my skin yet" , "No not yet".


    So were does lag come from?

    1. Step 1* - Your machine lags when you are downloading the skin to the server.
    2. Your machine lags when you have downloaded a skin and the screen refreshes.

    You do that with 30 people and well... we have lag, simple as that.

    So how do you get rid of lag and enjoy the immersion with historical skins? One way is to share the Net Cache, silly but doable. The other way would be to rifle though the entire Netcache and fish out the skins you want to share, not a good option either.

    A stop gap measure would be to have the skinner provide 2 skins, one for the intended folder, the other for your personal net cache. Now with the later we still have a small problem, rather than downloading a zipped 1 meg file now you are downloading two 2 meg files (hopefully zipped). However, that would increase bandwidth usage for your system but also for those that provide skins for the community.

    So what's the best way? In my opinion the only sure way of reducing lag to a minimum would be to have a small executable that could copy and convert a bitmap names into their respective guuid name allowing the end user decision to have lag or remove much of it.


    This would also allow servers/coops to host mission specific skin packs, have the user download
    the skin pack, have the program copy and convert the files and place them in the net cache folder.

    I want to thank everyone here, especially my patient friends that allowed all of this to be figured out.


    Let's see were this leads.

    'Guse

    As a side bar note, have more skins comming ... </div></BLOCKQUOTE>

    See the original topic here:Monguse's NetCache Topic

    It would be great to get an official statement if such a tool could be made or at least the key for converting the skin filenames into the "GUUI"- names could be made public to help us developing such a tool.

    Thanks!
    Simplex and Monguse
    Share this post

  3. #3
    Willey's Avatar Senior Member
    Join Date
    Dec 2001
    Posts
    1,804
    I'd like to add another suggestion:

    It would be nice to have netcached skins just in 512 size. That basically means, that every 1024 skin, which is shared with others, is internally reduced to 512 size beforehand. That saves 3/4 of the bandwith used for skin loading and the same amount of time. Back in the time when we had no 1024 skins, I saw a lot more skins online. A very lot of players had their own skins, and most of them were visible after some 20minutes max. Nowadays still a lot of ppl have their skins, but always it's like "do you see it already?", because it literally takes ages to transfer them.
    Not to mention a whole lot of my cached skins are not complete which raises another problem. I join a server, a certain player has a custom skin mapped to his plane. After 15 minutes we both leave the game and join another one and play 45 minutes before leaving again. Supposing it takes exactly 60 minutes to transfer the skin, I'll have a 25% complete and another 75% complete version of it - instead of a single one, which is 100% complete (which is when it gets visible).

    A 3rd problem is the total lack of compression...
    Share this post

  4. #4
    Its there also an option to have all the skins on each of the clients? then there is no need at all for the system to transfer skins?
    Share this post

  5. #5
    IAF_Phantom,

    Ah if it were that simple.

    From what we could tell, it does not matter my buddies and I have the same skin names in the same folder as we fly the same aircraft. For some reason, the engine goes though the same procedure everytime.

    'Guse
    Share this post

  6. #6
    Badsight.'s Avatar Senior Member
    Join Date
    Jan 2005
    Posts
    2,437
    <BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Monguse:
    For some reason, the engine goes though the same procedure everytime. </div></BLOCKQUOTE>its crazy , but True!

    SO MUCH skin DLing could be 100% avoided if the game just named a skin the same for all users

    we could be seeing custom skins near instantly - with zero Lag!

    but noooooooo . . . . . . . Murphys Law!
    Share this post

  7. #7
    dbillo's Avatar Senior Member
    Join Date
    Apr 2005
    Posts
    1,257
    What about skins that are included in the game, but are not default? Does the game server have to go through the process for those situations as well?
    Share this post

  8. #8
    If I may, I'd like to clarify [the engine] "renaming" skins:

    One possible option would be to have the engine retrieve the root file name (minus the folder name) being requested. As an example the engine would look for:

    ..\P-51D-20NA\52ndFG-2ndFS-QP-Q-Marie.bmp

    rather than,

    C:\Program Files\Ubi Soft\IL-2 Sturmovik Forgotten Battles\PaintSchemes\Skins\P-51D-20NA\52ndFG-2ndFS-QP-Q-Marie.bmp

    Keeping in mind the developer is not guaranteed the same drive or root folders are identical on all installations. However, "PaintSchemes\Skins\P-51D-20NA" is guaranteed.


    Continuing on this subject, once the skin folder and skin are retrieved the engine would then copy from the local host the skin and copy the file with its correct guuid name to the local machine net cache.

    Pretend now that the engine is allowed to do this, in this perfect world, the only requirement would be for everyone including the server to download the same skins and not rename them (1a).

    In my opinion, if the engine was modified to take the above in consideration, skin download would be almost automatic (as long as it would take to send and receive a packet of information copy the file and refresh the screen). The only draw back to this would be you could still have some lag and burps while the screen refreshes for everyone as people join.

    Regardless of the "quick fix" the best alternative would be to have a utility that users could run before joining the game, ensuring their net cache is ready for their use.

    By the way, the sledge hammer approach of harvesting the Net Cache was performed before a TeamUSA match. Those team members that downloaded the harvested cache had ZERO lag during the match.


    About default skins:

    The default skins are "hard coded". That's to say that every IL2 engine contains the same default skin. If the server has download off and the user has skin download on, your machine will request a download protocol (conversation). Once conversation is started, the server responds with "Server not accepting skins" and your system places the default hard coded skins on every plane on the server.

    The same is almost true when the server has skin download and the user does not. In that case the users machine by-passes sending any request to the server and just displays the default skins for all available planes.

    I want to make sure that everyone understands I'm not in the development group and no I did not spend the night at a "Holiday Inn", my background is in Software Architecture and Development.

    I'm confident what we found about skin DL is 99.85% accurate. As far as protocols, it's a very educated test.

    The only one that can answer what happens behind the scenes, would be the development team.


    Regardless of this request, I fully enjoy this sim.

    Thanks development team.

    Monguse



    Footnotes:
    (1a) If the machine can not find the correct file name the now current process would be invoked.
    Share this post

  9. #9
    Bearcat99's Avatar Senior Member
    Join Date
    Oct 2002
    Location
    USA
    Posts
    16,022
    The problem with that comes in if you have two skins with the same name... How would the engine chose which one to use? Unless it automatically did what windows does when you create a new folder.... You know how when you have a new folder and then you create another one.. it names the secnd one New Folder(2)......

    All great ideas though........
    Share this post

  10. #10
    Badsight.'s Avatar Senior Member
    Join Date
    Jan 2005
    Posts
    2,437
    <BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Monguse:
    The same is almost true when the server has skin download and the user does not. In that case the users machine by-passes sending any request to the server and just displays the default skins for all available planes. </div></BLOCKQUOTE>not in every patch!

    that isnt a constant : O

    either v2.0 or v3.0 actually dowloaded skins to you even if you had skin DL set off , if the host had it on you were sending , & recieveing players bitmaps
    Share this post