Hi there guys,
I am currently learning to make a side scrolling multiplayer shooter with Construct, and I found the great plugin by scidave
I was making progress with it, and managed to replicate it and make a chat program on local and also a test with two players controlling a cube each (nothing fun yet).
The first version I made was to avoid the way scidave coded as I want to leave the code as future friendly as possible (the game will have 2 players, but looking to support up to 6 players).
The first versions basically have two Avatars both with 8 direction behavior and depending on the pNumber assigned by the server, pNumber1 will control the redbox and ignore bluebox's control, and vice versa with pNumber2. It works fine and all, but I noticed that even on local testing, there's a slight lag on both players.
The next version was done by a friend where he follow's scidave example, and surprisingly his version played much smoother. The only problem with this version is the that players, regardless of pNumber1 or pNumber2, will always be the redCube while the 'enemy' will always be blueCube. I hope this is not too confusing.
My question is that which method is better? I really liked scidave's method, for it seems to make the lag disappear almost entirely. Is there any other alternative that will be better to code for a multiplayer action game?
Here's the two cap files for both versions, in case you guys would like to see the mess I made :D. I appreciate any help or insight on this.
Sorry, I noticed I made an error on the link for the first one. It's fixed now.