Java websocket host?

前端 未结 5 1913
滥情空心
滥情空心 2020-12-16 01:04

I\'m trying some multiplayer game ideas out at the moment and am trying to create a Java application to serve a web browser based multiplayer game.

My development en

5条回答
  •  感动是毒
    2020-12-16 01:22

    Rather than going the painful way of implementing the spec in Java, I'd suggest that you use an existing solution like jWebSocket.

    Also if you don't mind leaving Java land, I'd also suggest that you take a look at Node.js for your Server.

    Doing both Server and Client in JavaScript will save you lots of time and lots of Code, especially since JSON just doesn't fit that well into static land. Also creating multiplayer servers in Node.js is trivial, since the event based, single threaded model fits the whole thing pretty well.

    More information on WebSocket can be found in the FAQ. In case you want to get started with Node.js take a look at the TagWiki.

    shameless plug follows

    For two multiplayer games that were written using Node.js take a look at my GitHub page.

提交回复
热议问题