A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Multiplayer using own computer as server

  1. #1
    Member
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    74

    Multiplayer using own computer as server

    Hello all, I don't know much at all about Servers and Connections in general, so I don't know if my plan is workable. I got this idea from playing a game on Garena, which creates a LAN connection between people from different countries...

    First the premise:
    These computers will not be connected in anyway, other than that they have internet access. They might even be using a dynamic proxy because of lousy ISP (like me).

    The connection at most will be 1-5 users talking to each other.

    The user would probably also have to install some platform. Like PHP and Apache, Python, .NET Framework, Java, etc.

    How this will work out is that, a user will designate himself as a server host. He will put up his IP address on a secure messaging board, so that people can connect to his game. The server language [eg Java] will connect to the host, and relay messages to Flash using a socket connection[?].

    Because I cannot maintain or afford a server, so I'm thinking this might work as an alternative? I do have a free MySQL hosting account, I'm thinking of using it to temporary store IP addresses of those hosting for people to connect to.

    Is it feasible? I also noticed Adobe Stratus, which seemed to be an easier solution.

    Please forgive my noobness if everything I said seems to be really straightforward, I don't really know much at all...
    My DeviantART gallery of drawings and games.

  2. #2
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    As of right now, Flash cannot initiate a socket connection directly with another Flash player.

    Flash Player 10.1 is going to be expanding on the RTMFP protocol a tad and allowing some connection directly with peers, but I don't know if it'll be enough to do what you want.

    You're also not going to be able to instruct players to set up an Apache and PHP server. There's just too much involved with that. Unless you know who these people are and can assist them in setting it up and installing the proper software and making sure nobody alters the PHP scripts to cheat.

  3. #3
    Member
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    74
    I agree Apache seems too much lol. How about maybe a native application like using C++/Java/C#, that listens out for connections? Can a socket server be installed as an application/background service, that way nobody would have to transform their computer into a server?

    Btw I'm building the game as a desktop application, maybe as AIR. But I reckon I'll just use C++ for all backend instead of AIR, that way probably can use the same .swf file for online, and when users want multiplayer, download it and a separate C++ application to desktop to play.

    Cheating wouldn't be much of an incentive, I hope, since my game will be casual turn-based strategy and will have no persistent stats. Kinda like cheating to win a chess game or snakes and ladders.
    Last edited by cardin; 01-22-2010 at 08:56 PM.
    My DeviantART gallery of drawings and games.

  4. #4
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    Yeah, you can do anything with C++ or C#, but that's a whole different ballpark. I doubt maybe people on Flash Kit would be able to assist with that.

  5. #5
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,136
    I'm not an AIR expert, but I know you can set up a socket server with it, no C++ necessary...

    http://www.adobe.com/devnet/air/flex...et_server.html

  6. #6
    Member
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    74
    Quote Originally Posted by joshstrike View Post
    I'm not an AIR expert, but I know you can set up a socket server with it, no C++ necessary...

    http://www.adobe.com/devnet/air/flex...et_server.html
    Wow that is very cool... Flash has really come so far now.
    My DeviantART gallery of drawings and games.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center