node.js real-time game

前端 未结 3 1327
野的像风
野的像风 2020-12-31 17:08

Is it possible to create a real time game with node.js that requires twitch reflexes. How high is the latency? How low can it realistically go?

3条回答
  •  离开以前
    2020-12-31 18:08

    HTTP servers are typically optimised for throughput/bandwidth over latency. node.js is unlikely to be an exception, and HTTP is intrinsically poor for low latency anyway due to the structure of the protocol.

    One informal benchmark using node.js supports this, showing latencies of hundreds of milliseconds. By comparison most twitch games support latencies of no more than 30 or 40ms, ideally less.

    Therefore I'd recommend dropping the twitch aspect if you can't drop HTTP.

提交回复
热议问题