Copy link to clipboard
Copied
Hello, I'm developing a Flash game that utilizes LAN, and though I got it working for the most part, the problem is, I think there is packet loss issues... the way I have it set up is that each key pressed makes a variable for that "down", and when the key is not pressed, that variable turns into "up". Those are the variables I have sending to the neighbors. When those keys are pressed, depending on what they are, it moves their character around, attack, jump, so on and so forth. When I have both SWFs open on two separate computers and have them connect with each other, they read the movements just fine, like, on one computer if you pressed "jump", on the other computer, that character will also jump. However, there's certain times where it doesn't do that... sometimes you'll attack, but on the other computer the character won't do anything. It just seems like there's times where it doesn't pick up the signal of the key being "down", I don't understand why it's doing this. When you jump and move around enough, eventually the character will go off-course. Does anyone have any ideas on how to make the LAN connection not lose any inputs or signals at all? Thanks in advance.
Also, I was wondering if it were possible to have two connections from different IP addresses connect with each other, using Hamachi or something. Is there a way to do this at all?
Copy link to clipboard
Copied
Also, another thing I realized, people are saying that using RTMFP or Cirrus uses UDP and is not 100% reliable, while using TCP is much better... but how do I do that?
Copy link to clipboard
Copied
Socket in AS3 uses TCP. I've used socket on several occasions for games and other things and it's quite reliable.
Copy link to clipboard
Copied
That's what I've heard... how do I do that exactly? What do I change the "nc.connect("rtmfp:");" thing to?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now