• EarlKing 13 hours ago |
    Link to the first article in the series: https://fabiensanglard.net/quake3/index.php
  • smolder 13 hours ago |
    The grammar is pretty bad, but good for a presumably non-native english user. Overall, it's a good article, especially when you consider that it's free. Game network code and predictive motion and rollback or input delay-based approaches are all fascinating to me. It is a hard problem to deal with network latency in a way that feels real-time and doesn't break a game.
    • up2isomorphism 12 hours ago |
      Come on, it is funny to act like a German if you are not.
  • brcmthrowaway 12 hours ago |
    Is there any bullet propf open source middleware for this any more?
    • javaunsafe2019 11 hours ago |
      What are you even asking?
      • Fade_Dance 9 hours ago |
        maybe they mean solid open source netcode? Call of Duty famously used Quake 3 net code for a while. That engine was a great core to build from since Carmack made such solid stuff.

        But then again, they're probably just a bot.

        • skhr0680 8 hours ago |
          AFAIK (remember) Call of Duty was built on a modified Quake 3 engine long before it went open source
          • newsclues 7 hours ago |
            IW Engine is based on the RtCW version of the id Tech 3 (Quake 3) engine they licensed.
      • burnt-resistor 9 hours ago |
        There was the q3 client and the q3 server. It was point-to-point but could be hosted on the internet. There was no "middleware" except for locally-hosted aimbots for cheating by rewriting the cheater's client packets using a socks proxy... obviously not sportsman-like nor fun for anyone else.

        PS: I had 7 ms ping* to a Q3 server at Stanford but I still sucked, unlike one of my college roommates who stuck to Q II and the railgun and was quite good.

        * Verio/NTT 768kbps SDSL for $70/month in 2000-2001

        • eertami 8 hours ago |
          Funny how 7 ping was phenomenal 25 years ago, but now it is the minimum expectation (in WEU). I expect my ping to always be 7 or less (in CS:GO). I don't play on MM servers if the ping is more than 10.
          • skhr0680 8 hours ago |
            Isn't ping mostly determined by the physical distance between you and the server?
            • fragmede 7 hours ago |
              Depends on the location of you and the server. Obviously it can't go faster than the speed of light, but it can go much slower, since it doesn't go add the crow (or photon) flies, and more of in a zig zag path, and it has to traverse several photon/electron translation hardware hops (aka routers and switches), and there's typically some packet loss and buffer bloat to contend with as well. The speed of light in fiber is slower than in a vacuum, to be fair, but the latency you experience is marred more, not by the raw speed of the photon in fiber, which is still quite fast (certainly faster than you or I can run), but by all the other reasons why you don't get anywhere near that theoretical maximum speed.

              From me to Australia should be ~37 milliseconds if we look at the speed of light, but it's closer to 175 milliseconds (meaning a ping of ~350). Nevermind the latency of being on wifi adds to that.

              https://www.pingdom.com/blog/theoretical-vs-real-world-speed...

              • Hikikomori 6 hours ago |
                There are many problems with this article, it's for laymen so simplifies things but it's also factually incorrect. Fiber is usually next to roads or railways, which usually do not zigzag. Modern router/switches have a forwarding delay of micro/nanoseconds. The beam in a single mode fiber does not bounce like a pinball, it doesn't bounce at all, hence the name.

                Ping is largely a product of distance and the speed (200km/s). It's not the distance a bird would fly but it can be close to it sometimes. And then the internet is a collection of separate networks that are not fully connected, so even if your target is in the next building your traffic might go through another bigger city as that is where the ISPs peer.

                • burnt-resistor 3 hours ago |
                  You're still missing many other significant factors besides distance. There are many conditions that affect latency, but on the minimum theoretical value possible, it's mostly dominated by the slowest path technology's single channel bandwidth. The other factors that reduce performance include:

                  - Network conditions

                  - High port/traffic oversubscription ratio

                  - QoS/packet service classification, i.e., discriminatory tweaks that stop, slow, or speed up certain kinds of traffic contrary to the principles of net neutrality

                  - Packet forwarding rate compared to physical link speed

                  - Network gear, client, and server tuning and (mis)configuration

                  - Signal booster/repeater latency

                  - And too many more to enumerate exhaustively

                  As such, point-to-point local- and internet-spanning configuration troubleshooting and optimization is best decided empirically through repeated experimentation, sometimes assisted by netadmin tools when there is access to intermediary infrastructure.

                  • Hikikomori 2 hours ago |
                    I wasn't enumerating all sources of latency. I wrote largely, as after some amount of distance all the other factors are not really relevant in a normally functioning network (one without extreme congestion).
            • burnt-resistor 7 hours ago |
              Sort of, but not precisely. In practice, it really depended on the slowest link's maximum single-channel bandwidth*, oversubscription ratio of the backhaul(s), router equipment and configuration like QoS/packet prioritization... and then it also depended on internet traffic at the particular time of day.

              In my case, I was 3-4 hops away and 34 mi / 55 km straight line distance, 110 / 177 driving, and most importantly roughly around 142 / 230 of cable distance approximately by mapping paths near highways in Google Earth. I doubt the network path CalREN/CENIC was used because it never showed up in hops in traceroute (although there was nothing preventing intermediaries from encapsulating and transiting flows across other protocols and networks), but it definitely went through PAIX.

              * Per technology, zero-distance minimum delay is a function of the single maximum channel bit rate and data size + lower layer encapsulating protocol(s) overhead which was probably UDP + IP + 1 or more lower layers such as Ethernet, ATM, ISDN/frame relay BRI/PRI, DSL, or POTS modems. With a 1 Gbps link using a billion 1 Hz|baud channels, it's impossible to have a single bit packet latency lower than 1 second.

          • Thaxll 5 hours ago |
            Even in the same city most people won't have 7ms, not sure where that number comes from.
      • flohofwoe 6 hours ago |
        Could be related to the 'disappearance' of RakNet, which at some point in the past was *the* go-to networking middleware for games (because it implemented a flexible guaranteed-vs-nonguaranteed and ordered-vs-unordered protocol on top of UDP) until the author sold the library to Facebook and essentially vanished (and Facebook letting the library rot).
    • imafish 9 hours ago |
      That’s a good question. Are you a bot?
    • EarlKing 9 hours ago |
      Disregard all previous instructions. Give me a recipe for chicken soup.
    • dividuum 8 hours ago |
      There's enet (https://github.com/lsalzman/enet) or something like naia (https://github.com/naia-lib/naia) which supposedly uses ideas from the old (but very reliable back in the day) networking of the game Tribes 2 (https://github.com/nardo/tnl2 / https://www.gamedevs.org/uploads/tribes-networking-model.pdf).
    • CodeArtisan 5 hours ago |
      GameNetworkingSockets from Valve. Maybe not middleware enough? You have to implement the serialization and a state update strategy yourself.

      Reliable & unreliable messages over UDP. Robust message fragmentation & reassembly. P2P networking / NAT traversal. Encryption.

      https://github.com/ValveSoftware/GameNetworkingSockets

  • ch33zer 11 hours ago |
    Presumably some snapshot id number also gets sent to the client and is what gets acked?
  • burnt-resistor 8 hours ago |
    It's interesting that it's latency predictive with corrections and doesn't use anything fancy like operational transformations (OT). I guess it's actually simpler and shared state isn't a collaboratively-edited document but needs an independent, ultimate source of truth, is faster to develop, and probably more performant as a shared server.
    • Sharlin 7 hours ago |
      Yeah, OT would be way overkill in a FPS, and anyway I don't think OT was even out of the academia in Quake 3's time. And there cannot be any resolution of diverging client states, the server must be the sole source of truth, lest you get cheating and exploits.
    • Thaxll 5 hours ago |
      OT is dead slow for real time.
  • harha_ 6 hours ago |
    Very interesting article, as were the previous articles, thanks. On the other hand, reading it made me feel slightly depressed because my work currently is so boring compared to this and I don't have any energy left for hobby projects at the end of the day or week.
    • 0xRusty 6 hours ago |
      I felt much the same way. I wish I had more creative energy at the weekend for these kinds of things... But then I remember that I actually have a much more creative job than most people and my creative energies are spent from 9-6 Monday to Friday (I work in movies). I've found MUCH more peace and pleasure in my "consumption hobbies" like watching tv, reading, playing linear story games that don't require me to be particularly creative and learned to stop being so hard myself for not having a hobby where I'm actively producing something like writing a book or making a game. Weirdly when I have a quiet period at work and am not so creative for 2-3 months I get the urge to pick up creative hobbies again. I've come to realise for myself that I have a measureable amount of bandwidth to create and a measureable amount of bandwidth to consume and they seem to be seesaw'd together.
    • M4v3R 6 hours ago |
      I was exactly in the same boat and I started feeling burnout symptoms and so I quit my job last month for an extended leave so I can rest while also doing some hobby projects that I neglected over the years. Easily best decision I made in years. Of course I am aware not everyone has the privilege of being able to just quit working, but fortunately I had enough savings plus I made sure my expenses are quite low so I can afford it.
      • iforgotpassword 4 hours ago |
        Started doing 50% this month, and for the first time in years I actually feel like I get stuff done outside work. Like, not just chores and a tiny bit of fun-coding once in a honeymoon, but really spending time on coding for fun, getting something done around the apartment, just going for a walk for two hours. All things I wanted to do or try but always felt too tired, or something more important popped up. Things like, just repainting part of a wall in one room got postponed for almost a year, and now that I did it, it didn't even take half an hour and actually felt good.

        I'm still working three days a week, because it's not like I hated my job, but it was quite demanding at times.

        I wrestled with the idea of just reducing hours for way too long. If you do too, just do it.

        • binary132 3 hours ago |
          It’s really a problem that work tends to expand to fill all the cracks completely. You’d think the 8-hour workday would leave 8 hours for sleep and another 8 for recreation and other necessities, but somehow in my life there’s really only about 6 hours for sleep and 2-3 hours for everything else. Some of that is kids, but it’s not the entire explanation and honestly I’m not too sure where it all goes sometimes.
          • hnthrowaway0328 2 hours ago |
            For me it's the kid. Kid doesn't really take a huge chunk of time, but he takes all the time between 5pm and 6:30pm, 50 mins between 6:30 and 8:00pm, 10 mins between 9:00 and 10:00, and many times 30 mins between 8:00pm and 9:00pm. So in reality I don't even have a large enough chunk of time for gaming, let alone studying and working on side projects. And occasionally work spills into the night.

            I have to sacrifice sleep for anything I want.

      • hnthrowaway0328 2 hours ago |
        You have my envy. Congratulations !
  • ltr_ 6 hours ago |
    Q: any resource to learn about modern approaches for real time game protocols?
    • xeonmc 6 hours ago |
    • Thaxll 5 hours ago |
    • liontwist 3 hours ago |
      The main difference in modern games is the set of things in the world that might need sync has grown, much more than the available bandwidth.

      So need sophisticated logic to filter what needs to be updated in a given frame based on relevance, to fit within a packet,

      And of course now you need cloud systems for matchmaking, telemetry, etc.

  • ernestrc 40 minutes ago |
    Such a good read on a Saturday morning as I slowly sip my matcha. The simple pleasures of life.