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?
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?
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?
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.
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.
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?
Copy link to clipboard
Copied
yes, I'll try it.
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.
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.
Copy link to clipboard
Copied
sure, just use a timer to delay p2p transmission.