I made a small game were 2 players share a screen, they both edit the screen, but the screens are looking different at different times, how can i make both screens change at the exact time and stay accurate?
You should sync the user inputs. For example: Users A and B, if they both make a move at the same time, you decide which move first. ie. if A decides to move first, then you make screen change according to A's move, then update all player screens before you allow B to move, and also check if B is a valid move because A might made some move that prevent B's movemeng.
Here, anyone can have a look, im kinda proud of this project, i made an older version that was 10x the ammount of code. See if you can solve my lag problem that causes the games to varry.
The only way to "solve" lag is to have a lagless connection - and that's not possible.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read. Please Help Us To Save Ana
About the best you can do is constantly measure lag to each of your users (or have each user measure lag to the server) by pinging, but that uses a lot of bandwidth. There's no way to make lag an "event", or to trigger something if the connection lags.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read. Please Help Us To Save Ana
I don't know what games you think have "solved" the lag problem, but my wife is a dedicated gamer, and complains about lag all the time, on some pretty sophisticated gaming systems. Not even IRC networks, some of which are over 10 years old, can do anything about lag except to reroute servers - and you don't want to do that unless you have someone doing just that all the time.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read. Please Help Us To Save Ana