Jump to content
  • Advertisement
Sign in to follow this  
AfroFire

Multiplayer Flash?

This topic is 3984 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay, I know I'm not nuts. I have seen multiplayer flash games - the question I have to ask - How do they do it? My theory is that there is some sort of Java client running in the background that is talking directly to Flash - however, how does it do this exactly? I've googled around, but nothing really coherent is coming up. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Flash supports TCP sockets since version 5.
You have to write your own server to handle the connections though, and there's no way to connect outside the domain of where the movie is hosted (at least, not with Flash5).

Share this post


Link to post
Share on other sites
My naive first idea would be that it should be possible with some creative use of PHP/JSP/whatever scripts in the background. But then, I haven't used Flash since around five years ago.

Share this post


Link to post
Share on other sites
Quote:
Original post by lightbringer
My naive first idea would be that it should be possible with some creative use of PHP/JSP/whatever scripts in the background. But then, I haven't used Flash since around five years ago.

Well it's not exactly naive because you can do it like that, and it has been done in the past too.

The problem is though that HTTP cannot handle open connections, so the only thing you can do is sending packets all the time and hope for a useful reply. This obviously wastes a lot of bandwidth (not to mention the headers that get sent with every packet) and introduces a number of problems such as latency and the inability to register when clients disconnect. In fact it was a really ugly hack that fortunately was accomodated for by Flash (disregarding Java for the sake of simplicity).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!