TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Multiplayer Doom on Cloudflare Workers

76 pointsby CrLfalmost 4 years ago

4 comments

klaussilveiraalmost 4 years ago
This is exciting. I&#x27;ve always wanted to add proper networking support to my ioquake web port and now I have a good excuse: <a href="https:&#x2F;&#x2F;github.com&#x2F;klaussilveira&#x2F;ioquake3.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;klaussilveira&#x2F;ioquake3.js</a><p>Quake 3 networking is much more efficient and would definitely shine here. For the curious:<p><a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20190316154729&#x2F;trac.bookofhook.com&#x2F;bookofhook&#x2F;trac.cgi&#x2F;wiki&#x2F;Quake3Networking" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20190316154729&#x2F;trac.bookofhook.c...</a><p><a href="https:&#x2F;&#x2F;fabiensanglard.net&#x2F;quake3&#x2F;network.php" rel="nofollow">https:&#x2F;&#x2F;fabiensanglard.net&#x2F;quake3&#x2F;network.php</a><p>Not only it allows me to prototype for cheap, it actually allows cost to grow along with the userbase. Compared to something like: <a href="https:&#x2F;&#x2F;github.com&#x2F;HumbleNet&#x2F;humblenet" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;HumbleNet&#x2F;humblenet</a>
评论 #27199779 未加载
remramalmost 4 years ago
How is the communication between workers handled? Their blog post about websocket support only advertised the possibility persist state via their key&#x2F;value store, but here the workers handling different clients need to communicate with each other in real time. How is this done?<p>edit: Their &quot;Router&quot; class is a &quot;Durable Object&quot;. There is no trace of this in their code, this is configured separately when creating the worker. A durable object is a durable <i>JavaScript object</i>, unrelated to K&#x2F;V storage; it seems to essentially be a class whose instances act like service workers and can respond to requests using their persistent state. I guess there is special support for WebSocket endpoints in their Durable Object system so that a WebSocket endpoint can be sent to&#x2F;from the Durable Object.<p>Their docs are really not optimal, with many different iterations of the syntax mixed together (e.g. some thing only work with the &quot;Module syntax&quot; but every single example is written with the &quot;addEventListener syntax&quot;).
评论 #27198737 未加载
评论 #27199340 未加载
评论 #27198220 未加载
gzaloalmost 4 years ago
Really cool experiment!<p>I wish they had included a detailed costs breakdown, as it seems like it might cost too much to be viable.
mwcampbellalmost 4 years ago
Wouldn&#x27;t it be better to use WebRTC data channels for communication between instances of the game? If I&#x27;m not mistaken, that&#x27;s even based on UDP. Of course, that wouldn&#x27;t show off the new Cloudflare features nearly as much, though I guess Workers and Durable Objects could still be used to help the clients establish the WebRTC connection.
评论 #27202435 未加载