开发者

Implementing a turn-based web game [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but t开发者_C百科his question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

I want to implement a turn-based game for the web. My first choice right now is Battleship. Nothing too complicated but still something decently fun. Some of the features I want are being able to invite players to games, being able to chat with potential opponents, and being able to chat with your opponent once you've started a game. I'm thinking that I'm going to need some sort of push notifications in order to update your opponents board, keep track of stats, etc. I've done a little research and right now what seems would work best is using something like Comet. I was looking for some suggestions on what languages to use and where I should start.

Thanks in advance!


I'm currently making Tic-Tac-Toe webbased using <canvas> for painting and WebSocket for chatting and multiplayer playing. The latter allows you to have a live connection to a server which can directly send all data to the opponent. It's certainly exciting. I use Nugget for the server (C#).


i think it depend on many things.

i have some suggestions, but maybe somebody has better.

i started to code a game x-o. (dont know the name in english) you have to put five o or x in a row. this is also turn based. i had only few hundred codes in php and little more in javascript, but the game was very slow. in 2player mode, the request-response hit the 1-2 seconds sometimes, but the server was on my desktop. so no transfer time is needed actually.

i think if you create a lightweight game, with easy calculatons php is very good, easy to develop, also OOP.

but i think the best way to create a native server side program in c++ or c#.

i am very insane and i am addected to speed :D so i created a simple implementation of c++ sockets and ajax communications, and i redirected my apache webserver particular diretory to my program, and i responded with my progrram, so i was able to create 4-5 milisecdifference between request and response.

if you want to create a little more big game for aboute 100 player, i think native program is better, because you can store data in the RAM you dont need to execute mysql querys for every time, you can easily store dat, but you have to create a interface to communicate via HTTP.


I would take a look at nodejs (nodejs.org). Node is a highly scalable server-side evented io framework built on top of the V8 javascript engine. There is a node library called socket.io that makes browser push communication very easy. There's also a new service being developed at nodesocket.com that will make deploying your project painless.

You might also want to check out something like processing.js (http://processingjs.org/) for drawing your game on a browser canvas.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜