* FAQ    * Search  * Register * Login 
Active topics
Unanswered topics

All times are UTC-06:00



Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Client-side vs. Server-side code in a D3-SDK gametype mod
PostPosted: Mon Jul 09, 2007 2:32 pm 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
I am (finally!) alpha-testing and working out the bugs in a new gametype mod I'm developing.

One of the issues I'm having is with controlling which pieces of code run for clients vs. which pieces run for the server. Specifically, I created a couple of custom packet types to go from the server to clients on certain events, but I think one of the client packet-receiver functions is running on the server (which causes all kinds of problems).

Am I correct in my understanding of the following?

- A dedicated server acts as \"Player 0\".
- A player server (i.e. a player starts the server through the D3 menu) acts as both a client and the server.

I'm using the DMFCBase->GetLocalRole() function (I think that's the one, I don't have my code in front of me at the moment) to distinguish between them. Or am I missing something? :?


Top
   
 Post subject:
PostPosted: Mon Jul 09, 2007 8:31 pm 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Wed Mar 15, 2000 3:01 am
Posts: 8826
Location: Seattle
I don't think you can rely on the player number to provide information about the player's role, if I recall correctly, for the very reason you mention: non-dedicated servers.

The best thing you can do is run a dedi and verify which machine is playing what role by using DMFCLog (?). The dedi will print to the server console, and the client should print as a HUD message.


Top
   
 Post subject:
PostPosted: Mon Jul 09, 2007 9:16 pm 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
Ah, thanks!

I was hoping for something \"quick & easy\" to use, but that should be simple enough to do for debugging.


Top
   
 Post subject:
PostPosted: Mon Jul 09, 2007 11:33 pm 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
Well, I have that solved, thanks! :D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Descent'rs have piloted these pages
 
The layout and contents contained within this site are © DescentBB.net 1997-2006.
Descent, Descent II are © Parallax Software Corporation.
Descent III is Outrage Entertainment.
Descent is a Trademark of Interplay Productions.

Miner Wars™ is trademark of Keen Software House s. r. o.
.


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group