Hello. I'm glad that the mod lives even without my help. Recently I received a letter from one guy about Contra. He told me that the mod is not reliable and disconnection happens often. This is why I need to explain you how the game works and why disconnection happens.
The game uses peer-to-peer connection. It means that each player has both client and server running on his computer. The game is played synchronously. Lets think about it. All computers have all units in their memory. They move units synchronously by their own. All movement must be absolutely idential everywhere. Data transferred by network is not coordinates of all units. It is commands only. If units do something not synchronously on different comuters - mismatch problem will appear. This is why framerate is fixed - it is 30 FPS. Fast computers must do everything exactly like slow ones. Which factors can make units to move and act different way on different computers? Here are they:
1. Data loss in network. This can be solved by using VPN. You can use VPN over LAN too (Google it if you don't know how).
2. Not deterministic calculations. Floating point numbers are calculated different way on different hardware. Solution must be in the engine already. So, we should not care about it.
3. Undefined variables.
This 3rd oprion is the most problematic. Because here mod makers can make errors. Each time when you have a link to something which does not exist - it is undefined link. Each computer will put random number there and it is the reason why we will see a mismatch. So, entire code must be checked. This is what can help:
- If a module has a link to something which does not exist - mismatch or crash will happen.
- If a module has a number of variables but you set only some of them and skip another ones - missmatch will happen.
I already made INI checker and uploaded it long ago. Here it is http://contra.cncgui...Eng/checker.php It helps to find links to non-existing things.
But undefined variables is a problem. You need to check all code and add all variables to all modules. The game usually sets zeroes to all module variables which are not defined in the code explictly. But there can be possible bug in the engine which does not set something to zero. But we don't know which parameter of which module is not defined by default. This is why setting all variables for all modules can be a solution. It is extremely hard to do manually. This is why a programm which makes everything automatically is needed.
Edited by Creator, 27 May 2017 - 11:47 AM.