A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: Multiplayer flash game

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    24

    Cow Icon Multiplayer flash game

    Ok, just as a starter, first person to say that I need 3 years in college and the regular "you won't be able to do it" sh*t will be sniped through their bedroom window... shall we start

    Ok, so I'm looking to make an arena style game where the players can move around, beat the living crap out of each other, etc.

    So the way I was thinking about doing it was when someone joins then it will create a new object on the other person screen, whenever they move the x and y will be sent and the object will move, if they attack then an attack(); function will be fired on the other persons screen.

    Now I think I'm getting this whole thing and I think I'm not at the same time. I read a tutorial on how to make a chat room and it seams like its just a whole bunch of firing commands at other computers.

    So my question is, am I on the right track or is there a better way?

    Thanks in advance.

    Also, I posted this in the XML forum just because it seamed to fit best here because... there is a lot of XML lol.
    Gholzarekool

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    your question might be more suited to the Games section of the forum.

  3. #3
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    have you tried searching -_-

  4. #4
    Junior Member
    Join Date
    Aug 2006
    Posts
    24
    Why the hell would I post a topic if I didn't try searching? I may only have 20 posts but that doesn't make me stupid.
    Gholzarekool

  5. #5
    CostomJunky Xploder's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    635
    Quote Originally Posted by gholzarekool
    whenever they move the x and y will be sent and the object will move
    Here is the part I'm worried about. You need to make sure that the least possible time is spent sending updates. If you keep sending the x,y positions, the updates will be queued up and the position updates will be delayed. So what you need to do, is find a way to send the least possible updates. When a player presses a button, just send the change of state. The changes of state are broadcast to all connected PCs. Each PC creates a "World" with all the objects. Moving objects are pushed into an array and are updated depending on their state. Hopefully parallel dimensions won't be created due to the different PCs perfomance, internet connection speed, and what not. That is why you have to factor all that in and use time-based animation instead, with latency calculations. Hope this gets you on the right track.

  6. #6

  7. #7
    Junior Member
    Join Date
    Aug 2006
    Posts
    24
    ya I was looking at nonoba but they only support AS3 and I don't know it, I only know AS2, I also looked at come2play but it looks kind of sloppy. Any other recommendations?
    Gholzarekool

  8. #8

  9. #9
    Funkalicious TOdorus's Avatar
    Join Date
    Nov 2006
    Location
    Nijmegen, Netherlands
    Posts
    697
    If I remember correctly, gotoandplay had a good section on multiplayer. It's one of the "check when you finally will be able to pull stuff like multiplayer of" sources I got laying around.

  10. #10
    5+5=55 Schfifty Five's Avatar
    Join Date
    Jun 2006
    Posts
    698
    Quote Originally Posted by gholzarekool
    ya I was looking at nonoba but they only support AS3 and I don't know it, I only know AS2, I also looked at come2play but it looks kind of sloppy. Any other recommendations?
    If you're willing to learn how to make a multiplayer game, why not learn AS3 while you're at it?

    There aren't really any great options for AS2, but like someone else suggested, check out the gotoandplay multiplayer section:
    http://gotoandplay.it/_articles/multiplayerCentral/

    Also, I think I read somewhere that Nonoba is planning on supporting AS2 in the future... so keep an eye out for that option.

  11. #11
    WohOoooooo zompo's Avatar
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    138
    I think you should look into some socket server for the diffrent movements, for example http://www.smartfoxserver.com/


    Try out my game http://alpha.bombwar.com - Alphakey: fkaplha

  12. #12
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    1) i don't think using smartfox will really be that helpful in learning, you better look into the kirupa chat tutorial using php sokets! But incase you are in a hurry, i would suggest palabre, as it is simple yet good for learning how the actual thing works!

    2)Once you understand the concept of sokets, don't jump to make your arena game....rather try and recreate a chat(or avatar chat) program from scratch! This way you will have a better understanding of what you need to do!

    3) For the arena game, the server-client system will be a little different! Generally in this type of games, you would want the server to actually "play" the game! I mean, all players send their keystates to the server, the server performs the actions, and relays back the result to the client! This will help you maintain consistency through out the game, and will also make things a little more...err....secure!

  13. #13
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793
    Sooo... do you have a 1 player client working yet? Don't you think you should? (1 player on the local computer running around and shooting. Get that working, then next step is adding multiplayer)

  14. #14
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    i think your intro to us was hilarious for some reason!

    anyways just as advice why not have them take in turns so that the computer doesn't lag?

    BTW it IS possible to do this because i have seen it done before so i'll bury any of the bodies you snipe.
    LOL!!!

  15. #15
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    try making things like highscore charts and stuff not so real time before you get into real time note of advice, thats what i'm doing.
    if i figure out how to do it, ill say.

    BTW a_modified_dog thanx for helping with the highscore chart

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