Have you ever wondered how real-time games can keep multiple clients in sync even when there are large latencies between users? How can you see other players reacting to your actions near instantly, in spite of the fact that the communication between your computer and the server is not instant?
Eric recently made a game engine with real-time networking. His article breaks down lessons learned and what you’ll have to consider if you’d like to do the same.
A client can then visualize their experience through a series of images displayed to their screen. In most games this entails things moving around (like players and physics objects) and animations unfolding.
If we target 60 images per second, which is standard, that gives each client 16ms between frames. That is a shockingly brief 0.016s. To keep that in perspective, light can barely make it across the continental united states in that time, yet we have to keep two clients in sync through networks that may span more than half of the circumference of the globe?
Check out the issues and remedies in the article here on Medium.
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.