How to get a Web Application to communicate between users

I am developing a multipalyer web Application for Anti-Chess. It would be hosted on Google App Engine.

I have a few questions:

How do I get two different users who have opened the webapp on their browser to communicate moves with each other. P2P or through the server. If through the server, can I store some moves on it (specifically talking about GAE), to test bots later?

How to implement this P2P/Server connection. As a developer I know jack about Networking. But I hav heard of things like Socket programming, HTTP request etc, what can/should I use. And where can I read up on that!

If I don’t go for GAE, would it cost me too much to get some server space and hosting capabilities? And people tell me that then deploying the application is tougher than on GAE. Is that so. Where can I read up on deploying the web Application on Servers.

Where does the code for networking go? I will be using Django with python as the web framework, front-end would be HTML, CSS, and JavaScript. Should I make a separate module for the networking methods and then introduce a method calls wherever needed in the game play?

Someone suggested me on using Unity software for developing. Is it good, Does it make it simple to do work? Will it cover all the parts of the development, the front end and the back end and the deployment?

Note: I am a first timer in web Application, I have coded games before, but always without GUI. And also with no multiplayer over the network capabilities!

If you want to communicate state between two participants in a game, one relatively simple way to do it would be to have a web service which allows each player to PUT the resource that represents the shared game state, with verification to make sure that they don’t make illegal moves (or modify the other player’s moves). This is an example of the logical flow:

  1. Assign each player a token, after they’ve authenticated (using an email, for example).
  2. Allow a player to invite another to play a game. This could take the form of sending a message to the other player, to which the other player could respond.
  3. If the invitee accepts, create a shared resource to which those two users have permissions, and communicate the URL to both player resources.
  4. Allow the web app to PUT representations of the game state to the shared resource. In the case of chess, a simple example would be to have a shared PGN file to which both users could write.

If you’re interested in this approach, which would be an example of “SOA,” or “service-oriented architecture,” you might try SOA with REST or RESTful Web Services. This architecture is server-client oriented, not peer-to-peer; that has the advantage of being much simpler to implement.

You could implement your web services as separate routes within your Django project, and have AJAX calls from your Javascript front end which actually perform the actions related to the game state. I think Unity would be overkill for what you’re trying to do; it’s more about graphical games.

2

As it’s a web application, you can’t communicate directly between clients, you must involve the server (in fact, to prevent cheating through hacked clients, I’d never implement anything like this as a p2p system, unless no state is ever sent to the server at all).
A REST or JSON call is probably easiest to achieve, each client sending its state to the server at regular intervals and getting validation and updated state of other clients in reply.

Well Time is a great “answerer”! Please bear with me as it is the first time I am answering my own question, and I am not much sure of First/Second/third person!

What can be done is: (I will answer to the specific questions I posted in the same order as asked)

  1. Through Server: One first has to understand, that the web browser only loads the HTML,CSS and JavaScript. With the help of HTML and CSS you can make the UI look like whatever you want it to be. The JavaScript enables you to add the dynamic part to it (the part which changes).
    Using AJAX would be better! Learn HTML, CSS, JavaScript, JSON for dummies here.
    Through P2P: It wouldn’t be so great! For this, one would have to write all the game functions in JavaScript (something I would not chose over Death). And as I didn’t read up much on it, I don’t have much idea.
    GAE supports storing data, but you can only write it to a database (upto 1 GB of data) and not to files. I still have to study about exporting the moves database from GAE to my hard Disk (as in downloading) and reset the database so that I can reuse that space by periodically downloading the database contents.

  2. To learn the client side of HTTP requests after learning HTML, CSS, and JavaScript one can learn this here (in the first lecture itself, of the udacity course).
    I will list the server side of networking in point 4.

  3. Yes, hosting is costly, as compared to free, it is too costly, especially for a student like me, who doesn’t intend to generate revenue of ads/sign ups!

  4. The server side can be dealt with the Django framework, which can be learnt on djangoproject.org or various other web resources (preferably crash courses, for small webapps like mine). Other than that, I can really not comment about the learning curve and ease, as I haven’t yet got to that point.

  5. Unity is! OverKill!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật