My Community
May 21, 2013, 05:19:49 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: 6/29/2011 RakNet 4.022 released.
Home
Help
Search
Login
Register
My Community
>
General Discussion
>
Programming
>
Heeeeeeeeeeeeeeeelp
Pages: [
1
]
« previous
next »
Print
Author
Topic: Heeeeeeeeeeeeeeeelp (Read 1037 times)
Rannion
Not-a-newbie
Karma: 0
Posts: 25
Heeeeeeeeeeeeeeeelp
«
on:
December 07, 2006, 07:58:48 AM »
I have rewrite my test bed with RakNet3.0 using the PeerInterface.
I have a server running in console.
I connect with one client and everything is working fine.
I connect with a second client and receive the first deserialize properly updating player positions etc...
The first client is working fine and can move but the second client is receiving the deserialize with nothing in the data.
The second client, when I'm moving is receiving the deserialize with nothing in the data. BUT the first client is receiving the deserialize properly so I can see the player moving !?!
Please help me ! Any idea why the second client isn't receiving the same data as the first one !!!
The server is doing this gReplicaServer.SignalSerializeNeeded(player, UNASSIGNED_SYSTEM_ADDRESS, true);
And then in the serialize it's alright because the first client is always receiving everthing properly !
Thx for any help
Report to moderator
Logged
Rak'kar
Administrator
Hero Member
Karma: 293
Posts: 6771
Re: Heeeeeeeeeeeeeeeelp
«
Reply #1 on:
December 07, 2006, 12:44:38 PM »
Maybe it's scoping? Did you add the 2nd client as a participant? You can trace through all this in ReplicaManager::Update . After you do the send, put a breakpoint there. The second time it goes through the loop (the second participant) is the one you want.
Report to moderator
Logged
Rannion
Not-a-newbie
Karma: 0
Posts: 25
Re: Heeeeeeeeeeeeeeeelp
«
Reply #2 on:
December 08, 2006, 06:30:33 AM »
I'm starting to look for that.
But then I quickly try to use SetDefaultScope(true) in both client and server at init time and then I'm not receiving anything anymore. Is that depreciated ?
After some investigations...
Found the problem. And this is something not obvious when implementing ReplicaManager.
I thought Serialize would be called only once and then braocast to all participants so I was flagging my data as sent straight away. Then that's why my first player was working just fine and the others were receiving an empty packet.
Then for now, after the update of the server ( all the Receive() ) I'm resetting my flags for all players. This is not a nice way to do it but everything is working as expected now.
Thx for your helps.
If you see a better way to reset my flag, don't hesitate.
You can flag this post as solved.
Report to moderator
Logged
Rak'kar
Administrator
Hero Member
Karma: 293
Posts: 6771
Re: Heeeeeeeeeeeeeeeelp
«
Reply #3 on:
December 08, 2006, 03:18:59 PM »
Serialize is called for every target, because you may want to customize the data-per target. I will clarify the documentation for that.
Report to moderator
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
RakNet
-----------------------------
=> Version Announcements
=> RakNet C++ Support
=> SWIG and C# support
=> General Discussion
=> Feature Requests
=> Games made with RakNet
-----------------------------
General Discussion
-----------------------------
=> Job Board
=> Programming
=> Anything Goes
-----------------------------
Echo Chamber
-----------------------------
=> Downloads
=> Feedback
Loading...