Archived

This topic is now archived and is closed to further replies.

kenjin

question on dplay

Recommended Posts

kenjin    122
Hi When a good time to let the clients know that a player has entered the gaem. I think createPlayer is called when a player has joined a session. So originally I put it in there. But the problem is I think dplay send out a createPlayer when the server starts up and I had problems. Is there a better time to inform clients of a new player starting position? Also is it wise to update and send world positions to all clients eveery 100ms. Is this too fast?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I suggest you create 3 groups: Team RED, Team BLUE and Spectator. Joining a game puts you in the Spectator group by default. Otherwise, things get pertty hairy and fast at initialization time. It''s better to react to a custom message than use the default DP messages for initialization. When the server receives a command that a player wants to join a group and you include the player DPNID in the selected group, and you can use the CREATE_GROUP message to start the player in its default position of the selected team.

Share this post


Link to post
Share on other sites
cbenoi1    484
There is a boolean bit flag in the DPN_PLAYER_INFO structure that determines if the player is local or remote.

DPN_PLAYER_INFO.dwPlayerFlags & DPNPLAYER_LOCAL ? true : false;

-cb

Share this post


Link to post
Share on other sites
Pipo DeClown    804
quote:
Original post by cbenoi1
There is a boolean bit flag in the DPN_PLAYER_INFO structure that determines if the player is local or remote.

DPN_PLAYER_INFO.dwPlayerFlags & DPNPLAYER_LOCAL ? true : false;

-cb



Now that I know that.. Though it''s sometimes handy to know howmany players youre dealing with.

.lick

Share this post


Link to post
Share on other sites