- Home /
How to read data from a constantly updating xml server?
I am currently doing a project using a Brightlogic Activefloor. It updates 60 times per second, and that data is represented on a local server in xml.
Essentially, the data is displayed in a two dimensional array, with each period representing a censor on the floor. An asterisk represents a force applied to that specific censor on the floor. I understand how to read text from a server, but how can I do it fast enough to dynamically update the game multiple times per second?
Answer by FortisVenaliter · May 18, 2016 at 03:48 PM
Well, first off, if it's that level of speed you're looking for, XML and HTTP are not the correct solutions. HTTP is not designed to be fast enough for real-time, as it is request based, and XML takes too much time to assemble and parse to be real-time friendly.
What you probably want instead is a separate program running on the server that can provide this data is a compact binary format, and pushes the data to connected clients on a regular basis. Even then you may have trouble getting 60 per second, but generally you won't need to. If you can get 10 per second, that's usually enough to use client-side prediction to tween between the data packets received and run at a convincing 60fps for the user.
Your answer
![](https://koobas.hobune.stream/wayback/20220612081047im_/https://answers.unity.com/themes/thub/images/avi.jpg)