Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 2 of 2

Thread: Server Side on PHP for a flash multiplayer game....ISSUE!

  1. #1

    Server Side on PHP for a flash multiplayer game....ISSUE!

    Hello everybody, i'm fede torri, and i'm a newbie

    Let's talk about my problem.

    I've written a real-time flash multiplayer "Draw my thing" game...it's a test, nothing commercial ;-)

    So, even though i'm quite good at flash, it was my first incursion in the server-side world, and i found some problems

    The main one, is that my server interprets the load of requests i'm sending via flash as a Denial of Service, and quickly shuts down the var passing, therefore slowing down my multiplayer game.

    What i have, is a FLASH 1 local swf, wich passes variables to a server WRITER.PHP, wich writes vars to a server-located STOREVARS.PHP, wich are then retrieved by a second-pc local FLASH2 2 swf

    WRITER.PHP (about 400 bytes) is accessed 24 times per second (by flash 1), and will fopen and fwrite STOREVARS.PHP (about 200 bytes), wich is opened 48 times per second (24 by storevars, and 24 by flash2)

    Probably HTTP packet vars, with php as server-side is not the right option.
    Or either i should find a better way to connect 2 PC,
    or either again i should find a server wich won't interprete a few php requests as a DoS

    Can anyone point me in the right direction?
    Thanks a lot in advance!!!

    Fede

  2. #2
    48 requests a second, for only 1 client... i think a normal response would be a denial of service, since its not human to access a page 48 times a second... and you will prolly get a DoS at any other host.

    this method you are using is called polling... wich is possible with some multiplayer games that only require a few requests a minute.... but with live-feed things like this, you're better off using a socket...

    a socket allows direct communication with an already opened connection...

    some links:
    How sockets work
    PHP5 Sockets with Flash 8

    You can never underestimate the stupidity of the general public.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012