Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flash Networking "Packet Loss" Issues? / How to Connect to Different IP Address?

Explorer ,
Nov 10, 2014 Nov 10, 2014

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?

TOPICS
ActionScript
348
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 10, 2014 Nov 10, 2014

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 12, 2014 Nov 12, 2014

Socket in AS3 uses TCP. I've used socket on several occasions for games and other things and it's quite reliable.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 12, 2014 Nov 12, 2014
LATEST

That's what I've heard... how do I do that exactly? What do I change the "nc.connect("rtmfp:");" thing to?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines