The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


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