A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: [F8] LAN Game using SharedObject?

  1. #1
    Qwaizang:syntax_entity_ Q__Hybrid's Avatar
    Join Date
    Aug 2005
    Posts
    270

    [F8] LAN Game using SharedObject?

    Don't hurt yourself laughing at me, but is it possible to use a local and remote SharedObject to build the network protocol of a LAN game?

    The game would send integers and 32bit color values, small stuff like that. The values passed would be read from the remote SharedObject and all movies connected to that SharedObject would update their game states according to the information.

    The remote SharedObject would merely hold small bits of information, while the SWF of the game would use those bits to puppet function calls that would make action in the game happen.

    Feasible, or no? I'm only shooting for a max of 8 players, nothing bigger.
    Qwai•zang \kwî-'zan\ n [origin unknown] 1 : abstract designer, esp. of complex real-time experiments, c. 21st century

  2. #2
    Truimagz.com everfornever's Avatar
    Join Date
    Sep 2006
    Location
    St. Louis
    Posts
    1,306
    to be honest...... I have very good hosting, and I have a highscore feature, and just getting those to load, using loadVars which Im told is a fast way to do it, it stalls out alot.

    So I dont know, from my experience flash seems to have problems some times online....

    But like you said LAN any time i run the call locally, it works in a flash, so fast I dont even see my load dots come up, so Id say your good.

  3. #3
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    Look at localConnection instead, basically what you're planning is saving and loading a cookie every frame.

    Squize.

  4. #4
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471
    I thought it was impossible to create LAN games in flash?
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  5. #5
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    no way. Any socket server will allow for LAN games.

    i thought shared object and local connection were only local. Meaning the data is only accessible to the computer the swf is on, not to other network users
    lather yourself up with soap - soap arcade

  6. #6
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471
    *scurries off to learn about socket servers*
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  7. #7
    Axis Games Djugan's Avatar
    Join Date
    Oct 2003
    Posts
    238
    You can only load data from a SharedObjects files into the same .swf that created/updated that specific SharedObject.

    So unless you find a way to created a medium between the multiple .swfs that are running--which I don't think you can do since you don't have access to the SharedObject file outside of the .swf--there will be no way for the multiple .swfs to communicate with each other.

  8. #8
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Quote Originally Posted by Squize
    Look at localConnection instead, basically what you're planning is saving and loading a cookie every frame.

    Squize.
    Wait a minute, are you saying that this localConnection thing lets two .swfs on the same LAN communicate with each other? My understanding of it was that it let two .swfs on the same machine talk to each other. Can anyone elaborate on this?
    http://www.birchlabs.co.uk/
    You know you want to.

  9. #9
    Senior Member lapo73's Avatar
    Join Date
    Jun 2003
    Location
    italy
    Posts
    395
    Quote Originally Posted by tidenburg
    *scurries off to learn about socket servers*
    this might help -> http://www.gotoandplay.it/_articles/multiplayerCentral/


    Lapo
    www.gotoandplay.it
    Flash game developers community
    www.smartfoxserver.com
    Multiplayer Flash Server

  10. #10
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    Yeah I was wrong, sorry ( Working with local connection atm for my profiler app and just got it in my head. Putting it down to a knee jerk reaction against using sharedObjects )

    Had it in my head that if there was one "server" swf on a page, and all on the other copies of Flash chatted to it they could share info on different machines. Imagine it'd be possible with a bit of cgi to hold it all together, but not very viable.

    Squize.

  11. #11
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    sorry this might be a little off topic. But does anyone know if its fairly easy to initiate a connection between two swfs on two different computers on a network using the new Socket class in AS3. Or am i completly misunderstanding the use of the Socket class. Basically i want to know if you need a socket server + Socket class to establish a connection between two swfs, or can you just use the Socket class
    lather yourself up with soap - soap arcade

  12. #12
    Senior Member lapo73's Avatar
    Join Date
    Jun 2003
    Location
    italy
    Posts
    395
    You need the socket server.
    The flash player can exclusively act as a client not as a server, so in other words it is not capable of handling incoming connections. (do not confuse it with incoming traffic, that one can (of course) be handled)

    hope it helps

    Lapo
    www.gotoandplay.it
    Flash game developers community
    www.smartfoxserver.com
    Multiplayer Flash Server

  13. #13
    Junior Member
    Join Date
    Jun 2004
    Posts
    21
    Actually I have done a lot of testing using php and flash for multiplayer games . What he wants would be easy .

  14. #14
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471
    Quote Originally Posted by lapo73
    Thanks
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  15. #15
    Member
    Join Date
    Oct 2000
    Posts
    93
    You can also package your swf with Zinc. You can broadcast UDP packets and create a LAN game with Zincs extended functionality. Or create a server as mentioned. I just wrote a java server myself.

    Additionally, the commercial servers available usually allow you to have up to 10 users connect at a time, so thats also an option.

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