-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity state/location network synchronisation #20
Comments
I got dis |
Current implementation (sans interpolation) is in the netTest branch for anybody who wants to check it out. |
Almost done, just need to implement other player interpolation |
@bobsayshilol We (@lightsoda) had a try at adding netcode to a new scene (level_testing) whilst attempting to merge netcode, @Slimliner's contributions to #21, and @fatmandu's terrain from #4 A couple of items of note were identified:
|
I'm guessing you mean disconnect not connect, which I have added to the wiki page. I will bind this to a button until we have a menu system. FixedUpdate() doesn't need to be edited until we have a functioning movement script, then I'll port it from local multiplayer to LAN multiplayer. |
Oops, yes ^_^
I'd rather see us do something in the interim so that we can can get a build out faster if ironing out an input system takes any significant amount of time (that said, @ErikBehar said in IRC that he has something that's close to being ready for testing) . |
With respect to synchronization, Golden is currently working on synchronizing the act of hitting a players' ball (golfing). More broadly and Golden's work being an example, the network guys are disassociating scripts made for 'prefilled' scenes into scripts that can be attached as features onto objects that were created elsewhere. I think offline is going in a similar direction. One grand networking issue I'm seeing is that player creation and some menuing and level switching(working on it) all happen in the networkManager scripts and that should be split up into more scripts. |
@bobsayshilol @thegsm @Goldenheaven @osse101 @MaritalWheat I'd like to see more discussion here in this issue of stuff that impacts on networking. I spotted in IRC that @osse101's recent horn related commit didn't quite work, but this information has not been relayed to somewhere where it would be visible to Osse or anybody else who wasn't in IRC at the time. If we can be more diligent with communication, this will help things roll much more smoothly. IRC discussion is great (higher bandwidth communication is pretty much essential), but notes on direction changes and discussion outcomes need to make their way up here to GitHub where things are less transient. |
The horn wasn't playing in the past because I didn't include it in the buggy prefab (oversight) when I changed the switched the online carts. #183 put the horn sound back on the buggy and told it to play again. Now with @bobsayshilol 's change in #188 no IHonked messages are sent, so no one gets horns :( and I don't see why that is. And I can't host more than one game at a time now. What's up with that. |
The intention is that the horn should be played via the new audio manager that @GSM has been working on. This hasn't been documented yet though (I think most discussion is in #62 at the moment). To offer whatever clarity can be cleaned from the IRC log, here's the relevant discussion:
|
I believe I can hear the issue now. I'll agree to testing with other people because of things like in this case the music is too loud to notice the sound of a horn being farther away. I also want to ask what the design for a spectator is. What are they and what can they do? issue #190 |
Music volume options will hopefully make their way back into the game soon :) At this point, I'm not certain that everybody is on the same page with regards to spectator functionality. My expectation is that they will be a connected network client with no cart or ball to synchronise across the network, who will be able to make use of text chat and operate a local free floating camera ( #190 is probably the best place for ironing that out though). |
Added a response-RPC call inside of MyName so the server broadcasts the change to the clients. |
Just to clarify on the previous point: myInfo.name is what is sent to the server, so unless the server changes the name for some reason it will always be correctly set. Other users that join on the other hand will be given a temporary name (ie "Some Guy") until the server receives a message from them telling it what their name is, and then in turn tell the other clients connected. |
In client-to-client RPC messages, NetworkMessageInfo.sender will be the server. This was the source of my hardships with ChatBubbles. |
I hate that "feature" aswell -_- |
This pull adds two more RPCs. GolfSwing adds an impulse vector-force to the server ball. This suffers the usual ball synchronization stutter being worse on weak connections. Also PlayerSwap is now sent to clients too so everyone should be synced for animations now. |
Update from the last comment now that #214 is in: RotatePlayer is out as a message because it looked bad. Rotating is fully done user side and the result of aim+shoot is passed to server in GolfSwing. |
Issue: spectators have networkManagerClient, netLobby, and netChat as network relevant scripts. Errors occur if they are sent RPCs that aren't included in those scripts like PlayerSwap. |
Added DeclareWinner as a server-to-all message which just sets some playerHasWon type variables. On NAT punchthrough failures, players were getting stuck on a Trying to Connect screen meaning they didn't get a proper chance to connect and hit the failureToConnect event, so I put a timer on that. Removed the local force applied to balls hit by golf club so they don't have a large movement vector that has to be undone when the server's ball syncs. The swing animation is also only applied after receiving the GolfSwing message and things seem to look nice that way. I was also thinking of adding the player's latency to the animation timing for things to line up better. |
From @bobsayshilol in IRC (also related to #235):
|
Started working on the interpolation script today. Currently it's not stable enough to be pulled back in, but I'll fix that when I get back next week. |
Awesome ^_^ |
Implement the real time synchronisation of game entities' state and location between host and connected network clients (#18).
The text was updated successfully, but these errors were encountered: