I've been struggling with this for a while and it was the reason I stopped development of my game for 1/2 a year, it got me quite down.
The game is pretty much all these apart from the multiplayer aspects not working very well.. which is bad, 'cos it's not much of a single player game <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">.
Some of you who were around in the 90s might remember Wireplay and the awesome selection of games they had for us to play (on a 56k modem mind). One of those games was Rumble In The Void.
The game is still available (I think I have a copy of the original or 2 somewhere) to play as single player, but you can never again play it multiplayer.. because you'd need the wicket.vr1 to work... and it only works with a working server that was made for the game.. and none of the code was ever released.
So I took it upon myself to remake the game in its entirety. I could obviously rip some of the assets from the game such as individual sprites and sounds but that's all I had to go by. By using Construct 2, I took all of the parts of the game and reasembled, making sure to keep the gameplay mechanics and general "feel" of the game as close to the original as I could.
It took me several months to do in 2014 and I just lost heard when the multiplayer (which was the entire point of the project) just didn't seem to work quite right. Now this is where you can help me!
Here is the project so far, (http://heiach.wix.com/ritv-remake) you might even see someone else online at the same time as you!
I put together the rudimentary multiplayer using various tutorials I found on Scirra and Construct 2 forums.. I'm using the socket-io plugin and using Node.js to run the "server" which is really just a glorified notepad file with .js plonked on the end.
I have a number of problems and I hope you guys can help me get past them so that those of us who adored the games in the 90's can play it together once more, maybe even have tournaments like we once used to!
I have very little knowledge of coding in javascript or whatever the server is coded in, I've just been putting snippets together and getting intelligent friends to help me get past the various errors that crop up.
The "server" file I am using can be found here (https://dl.dropboxusercontent.com/u/198 ... erver35.js) if you want to have a look at the mess I've made!
I used tutorials on how to use the socket-io plugin and took it from the basic program I was supplied with (I think it was 2 ducks shooting eachother?) to what I have now.
Here are the problems I am currently having:
(1)
I'm finding it very hard to get data from each of the clients, but I have sorta managed to do it.
The way it seems to work is client I have made sends out a burst of information every 0.05 seconds to update all of the clients in the game of the ship position, orientation and what animation frame the ship is using (ie which ship the player is using). Like so:
http://i.imgur.com/yvAUsFz.png
I have tested various timings for that and found that if I had it send out the burst at 0.10, the other ships would look choppy to other players, the positions weren't updating fast enough... 0.05 seems to be working okay though (the current version on the website I supplied is using the 0.10 version if you want to see it being choppy).
If I send out the burst every 0.01 then it just seems to cause a massive backup of all of the information and everything lags and goes out of sync, very, very quickly!
(2)
Retaining client information...
I got a lot of lag if I sent out too much information in the 0.05 bursts, so I put all of the less essential information in a burst that goes out every 2 seconds instead:
http://i.imgur.com/q7EAdei.png
The problem is that this information only seems to exist when the burst happens.. and because this burst contains the information about player names (which are displayed next to the ships) everyone's names flash every 2 seconds.
This leads me on to my 3rd issue..
(3) Displaying client info
I'd ideally love to be able to list all of the players that are currently online and also to list the current top scores in the game so we can see who is winning etc...
But it's hard to do with the information only existing once every 2 seconds.. and even then, I've yet to successfully be able to get the game to be able to translate and display this information...
Please can you guys help me?
Edit:
Oh yeah, I have a 4th problem too.
(4)
The bursts don't get received if the client isn't active, ie the browser the game is running in is minimised or if the client program running on the desktop isn't the active one at the time... this means that as soon as the client *does* become active again, all of the signals that they missed suddenly all happen at once, it's like watching a movie in fast-forward.. and this obviously will/does cause a lot of syncing issues too...