Results 1 to 5 of 5
  1. #1
    BlackRayquaza's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    574
    Reputation
    10
    Thanks
    186
    My Mood
    In Love

    Post [INFO] The stat exporter

    Lets take SD as an example for the stats.

    67 stats for player + 3 stats for the entity class.

    So lets assume you have 50 players on your server.
    Thats 50 * 70 (67 + 3) = 3500 stats, exported every tick for just the players.

    Then you also have all the loaded objects (excluding the static objects) for all players, you can look at the classes for that and figure out the total stats for that, if you want. (EDIT: Quests are always loaded)

    Now try to figure out why 3500 stats being send to the client, each tick, is a bad idea.
    Last edited by BlackRayquaza; 04-25-2016 at 05:54 AM.
    YEP cock

  2. The Following User Says Thank You to BlackRayquaza For This Useful Post:

    Stellar Spark (04-25-2016)

  3. #2
    Stellar Spark's Avatar
    Join Date
    Jun 2013
    Gender
    female
    Posts
    724
    Reputation
    35
    Thanks
    799
    You can use some form of redundancy mitigation, such as exporting each stat alongside an ID (which I assume is a byte).

    In this case, you'd have to add 8 bits to the usage of each and every stat, minus the ones that DON'T change. Probably between ticks, you're going to more often change in Experience, Fame, HP, and MP. (let's assume Fame, HP, and MP are int-32, and Experience is int-64)

    Per tick, the average player in realm will then spend 3 * (32 + 8) + (64 + 8) = 192 bits in StatExporter bandwidth, as opposed to the usual 70 * 24 = 1680 (rough estimate) bits you'd have to send without redundancy mitigation.

    This is about a 88% improvement in bandwidth usage.

    Another option (which I plan to implement in Phoenix) is using ordered bits to determine object redundancy. This doesn't add any extra possible bits, but it is a lot more hack-ish considering you have to work with the rudimentary BitStream tools that C# has to offer.

  4. The Following User Says Thank You to Stellar Spark For This Useful Post:

    BlackRayquaza (04-25-2016)

  5. #3
    ReySharlLel's Avatar
    Join Date
    Aug 2015
    Gender
    male
    Posts
    206
    Reputation
    10
    Thanks
    1,537
    first in as3 you can speficy the order of bits little/big endian, since we have source client why not change it in client so server in c# no need to reverse bits so we can work better

    the best would be make server in java since c# dont seems to know what network byte order means, and want to implement its own shit

    and now who said you need to send all stats ?? this stupid, save a reference of sent stats, then implment a stat queue sytem when something change in server, you add to that queue(in player) the stat changed and its value

    edit: best is to rewrite server from 0 i showed it to my teacher he said it is disaster lel
    Last edited by ReySharlLel; 04-25-2016 at 08:44 AM.

  6. #4
    BlackRayquaza's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    574
    Reputation
    10
    Thanks
    186
    My Mood
    In Love
    Quote Originally Posted by ReySharlLel View Post
    first in as3 you can speficy the order of bits little/big endian, since we have source client why not change it in client so server in c# no need to reverse bits so we can work better

    the best would be make server in java since c# dont seems to know what network byte order means, and want to implement its own shit

    and now who said you need to send all stats ?? this stupid, save a reference of sent stats, then implment a stat queue sytem when something change in server, you add to that queue(in player) the stat changed and its value

    edit: best is to rewrite server from 0 i showed it to my teacher he said it is disaster lel
    Never said you have to send all stats, I just said it does. Just curious to see the communities reaction and/or solutions to the current situation. Btw, im already rewriting the server.
    YEP cock

  7. #5
    BlackRayquaza's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    574
    Reputation
    10
    Thanks
    186
    My Mood
    In Love
    Okay, so I played around with this a bit.

    Here is: 1 Player in realm after 3500 ticks (350 secs)


    3 Players in realm (different locations) after 4500 ticks (450 secs)


    And 3 Players in realm (same location) after 7500 ticks (750 secs)
    Code:
    [05:26:02] [Player] TickId: 7189, Ticks: 7462, Stats: 10000335, Average Stats/t: 1340
    Conclusion: Shit networking.
    YEP cock

Similar Threads

  1. Replies: 14
    Last Post: 02-18-2014, 05:47 PM
  2. Howto save the stats in 'barracks'
    By tester501 in forum Call of Duty Modern Warfare 3 Help
    Replies: 6
    Last Post: 11-10-2011, 10:29 AM
  3. [Tutorial] Saving the Stats created by Unlockers
    By kdugrt in forum Call of Duty Modern Warfare 2 Tutorials
    Replies: 11
    Last Post: 07-17-2011, 02:03 PM
  4. Did IW just patch all the stat editors?
    By Relentz in forum Call of Duty Modern Warfare 2 Discussions
    Replies: 4
    Last Post: 07-02-2010, 08:37 AM
  5. [info] The Truth About Retail Codes
    By Randomness1865 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 09-15-2007, 11:29 PM