Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

There have been lot of cloud based frameworks released in past few years. They provide real-time communication among users but does not allow developers to write server side code. So, how can we use these frameworks to develop mulitplayer games.

I want to know how we can deal with network latency and write prediction algorithm to recover network lag.

share|improve this question
    
Make it local multi-player. Sofa gaming. Problem solved ;) –  Laurent Couvidou Apr 16 '13 at 8:42
    
Joke aside, I fear that the answer to this is simply "you can't do that". But I stand to be corrected. –  Laurent Couvidou Apr 16 '13 at 8:44
    
Could you add some examples of those frameworks? We might be able to give a better answer if we understand your problem domain better. –  MSalters Apr 19 '13 at 11:20
    
@MSalters github.com/suyashmohan/junglechaos This is a multiplayer game I made using one such BaaS framework, it does not involve server side code, but it do suffer a lot from network latency. I don't know how to write predication algorithm at client side along with all players playing as much as possible in synchronization –  Suyash Mohan May 9 '13 at 10:23
    
@LaurentCouvidou There have been some real time BaaS frameworks like photon, appwarp, etc that enables developers to write multiplayer games without writing server side code. They are good for casual games, but implementing a MMO is difficult with these frameworks, but being difficult does not mean its impossible :-) –  Suyash Mohan May 9 '13 at 10:29
add comment

1 Answer

I am not really familiar with cloud based frameworks nor using them for network related game development. However, I am familiar with ways on multiplayer game development, where you get to code the part of the game that will handle network packets.

It is more of a choice of the network protocol actually, TCP/IP or UDP.

TCP/IP is a good choice if your game do not require realtime updates, like turn based games (tic-tac-toe, chess and the like).

However, when we talk about speed and close to real time updates, UDP a lot more favorable. UDP is stateless, meaning that when you send something, you don't care whether if the user received the data or not, nor are you expecting a reply which reduces the overall size of the packet (no more additional headers) and it does not require a thread to wait for a response.

TCP/IP on the other hand works the other way around. It sends and receives, and during the receive period, the application/game has to wait for the response, otherwise a time out exception may occur which you might manually handle in code.

UDP works on fast update games because all the game has to do is to send its current state to everyone else, and everyone else just read whatever it receives and render them into the game.

About the question, "How to develop multi-player game without involving server side code?"

I'm not really sure it can be done. Sooner or later, whether UDP or TCP/IP is used, there always has to be a managing entity of all the packets running around the game (the computing unit that handles the current state of all users). I'm pretty sure that is the server, and that server requires some code.

I hope I hadn't misinterpreted your question. Cheers

Very good reference:

http://gafferongames.com/networking-for-game-programmers/

share|improve this answer
2  
I think he's asking for another problem, How to develop without write server apps/code reusing existing infrastructures –  Zhen Apr 16 '13 at 7:27
    
Thanks for the reply :-) But this is not what I asked, take a look at my code github.com/suyashmohan/junglechaos here I have developed a multiplayer game without involving server side, but it is not optimized it suffers a lot from network latency. I don't know how to write predication algorithm at client side along with all players playing as much as possible in synchronization –  Suyash Mohan May 9 '13 at 10:25
    
Wow, that's the first time I heard of such a service (BaaS). Thanks for the info :D. I was wondering about the latency part, it may be possible that the providers may cause the delays or lag. Based on my experience, it's best to code or at least have access to the game server code to have an opportunity to optimize it, since it is the one handling all data packets. –  nagloan May 15 '13 at 8:37
    
@nagloan For casual games, BaaS can be a good solution. Even for heavy games, one can try to write algorithms that involves prediction to handle the latency. The BaaS providers are working hard to reduce latency as much as possible. –  Suyash Mohan Jul 20 '13 at 6:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.