Jump to content

  • Log In with Google      Sign In   
  • Create Account


How do Flash MMO web games exchange data for client/server.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Rich76   Members   -  Reputation: 178

Like
0Likes
Like

Posted 03 March 2011 - 02:48 PM

How are Flash MMO web games done? If I understand correctly, the client cannot maintain a socket connection with the server..? Is it about polling the server every x seconds, and sending and receiving JSON messages?

I know there are Flash servers out there, such as SmartFox Server and Red5 server, but I'm not sure how they exchange data from client to server in a MMO game..

Sponsor:

#2 Stelimar   Members   -  Reputation: 102

Like
1Likes
Like

Posted 03 March 2011 - 04:26 PM

Flash actually does have support for socket connections, which is how most of those types of games probably communicate with the server (SmartFoxServer, e.g., uses sockets, as well as probably most other servers built for Flash applications). There are some security restrictions, but most of these are easily taken care of with a policy file. For simpler games which don't need constant updates, you can make requests to the server, and use a server-side scripting language (e.g. PHP/ASP), just like you would with a Javascript/AJAX-based application.

A good tutorial for getting set up with Flash sockets and a Java-based server:
http://www.gotoandpl...2/xmlSocket.php

#3 tcarr9   Members   -  Reputation: 102

Like
1Likes
Like

Posted 03 March 2011 - 04:33 PM

The way that it works with ElectroServer and with EUP is that a persistent socket connection is established between the Flash client and the server (which is a Java socket server). The client listens for messages from the server, and sends requests to the the server when it wants to trigger an action of some kind, such as sending a chat message, joining a room, sending a position update, etc. We don't use polling or JSON; the ES5 api encodes the messages into binary for sending. You may find ActionScript for Multiplayer Games and Virtual Worlds by Jobe Makar useful for understanding the concepts. I'm happy to answer questions about ElectroServer on our forums.

#4 Rich76   Members   -  Reputation: 178

Like
0Likes
Like

Posted 03 March 2011 - 05:43 PM

Thank you guys :)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS