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

P2P synchronizing for fighting game online?

New Here ,
Aug 30, 2012 Aug 30, 2012

Copy link to clipboard

Copied

hi, recently I been making a fighting game online using this p2p and I found that when a user drops a package while vs'ing other the hole intire game "skips" or jitters on that user. I need the game to be " synchronized " so that both user's game can stop at the same time when somone drops a package and both game playing at the same time.

I choose p2p because it is less laggy and less frame lag in game. Which is really good.

so how would I make all users "synchronized" when there are vs'ing each other? and what codes or tips need to done?

TOPICS
ActionScript

Views

1.7K

Translate

Translate

Report

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
Community Expert ,
Aug 30, 2012 Aug 30, 2012

Copy link to clipboard

Copied

this will get you started (but you may have a lot of work to do):  http://playerio.com/documentation/tutorials/building-flash-multiplayer-games-tutorial/

p.s.  how are you limiting each p2p network to two players?

Votes

Translate

Translate

Report

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
New Here ,
Aug 30, 2012 Aug 30, 2012

Copy link to clipboard

Copied

This fighting game can have up to 6 in one room vs'ing each other. Its call Combat Tournament Online btw.

I havent limit it yet the p2p network because im still developing the aspect of the game and its not important right now. Whats importanting is the sync'ing the game online.btw isnt there a listener for sync?

Votes

Translate

Translate

Report

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
Community Expert ,
Aug 30, 2012 Aug 30, 2012

Copy link to clipboard

Copied

there's no magic anything to ensure sync and because of latency issues it's not possible to sync all users in real time even for a server-based game.  with p2p games you have even less chance of sync'g.  the best you can do is approximate sync'g. 

and, the techniques used to approximate sync'g can be very complex.  start by reading that article.

Votes

Translate

Translate

Report

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
New Here ,
Aug 31, 2012 Aug 31, 2012

Copy link to clipboard

Copied

Well in my game someone is the "host" in that room and that host in the room is where all the gameplay happens. All the rest of the user just send button data and receive there location/animation/effects etc. They are call followers. This keeps all user's gameplay happen exactly what suppose to happen(Everyone follows the leader)

My problem is when the host drops a package to the follower.The Follower's gameplay stop when a package drop detected but not the host, because the Follower isnt dropping packages to him. So he sees the gameplay skippy and choppy. Im not trying to "sync" all users. I'm trying to make the host gameplay to stop when the folllower detected a package drop from him or host detected a package drop from any follower. So that everyone sees every frame of the game correctly. I'm not sure if approximate sync is the answer.

Votes

Translate

Translate

Report

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
Community Expert ,
Aug 31, 2012 Aug 31, 2012

Copy link to clipboard

Copied

did you read that article?  do you see the technique that institutes a delay for all players to allow a cushion for network problems?

Votes

Translate

Translate

Report

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
New Here ,
Aug 31, 2012 Aug 31, 2012

Copy link to clipboard

Copied

yes, I'll try it.

Votes

Translate

Translate

Report

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
Community Expert ,
Aug 31, 2012 Aug 31, 2012

Copy link to clipboard

Copied

good luck!  there's nothing easy about real-time games.

hopefully, you've already created some turn-based p2p games which you should do before embarking on real-time games.

Votes

Translate

Translate

Report

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
New Here ,
Aug 31, 2012 Aug 31, 2012

Copy link to clipboard

Copied

I have a problem , since Im testing this game on the same pc I have No net connection problem or lag so I can't tell if im doing it correctly. Is there any way to make add in some lantency/random package drop to make my connection act like a real connection between these two flash players?

P.S: I DONT want to keep asking my friend to beta test with me.

Votes

Translate

Translate

Report

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
Community Expert ,
Aug 31, 2012 Aug 31, 2012

Copy link to clipboard

Copied

LATEST

sure, just use a timer to delay p2p transmission.

Votes

Translate

Translate

Report

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