Welcome, Guest! Login | Register
Development tid-bits
Info
Report
366 Posts

So i had an idea well setting up a 3drad multi-player project.. something that never crossed my mind before.
Iv'e always been a fan of the one project multiplayer setup, 1 project that acts both as client & server..
Recently it donned on me that it's so much easier to do this with 2 separate projects being client & server.. the scripting is far less complicated.

I also realized ( haven't tested this idea yet) that when using a PCar that the server project DOES NOT require EventOnInput objects for the client pcars.

You see the PCars have the networked control ID's builtin to it for a network project use, if the EOI objects are in the server project, their input is ignored run-time and they aren't even used in the server project.. they serve no purpose unless used for some other input besides PCar control.

This is a major boost to a 3drad projects performance .. imagine having a 8 multi-player project where all 8 players have lets say 6 EOI controls each just for the PCar, thats 8 * 6 = 48 EOI objects, all in your server project FOR NO REASON cause their input  is ignored run-time.

I haven't validated yet that this is actually true, but i will validate this setup in the next couple days to be sure the EOI objects can be left out of the server project.
Created on: 1 month ago
Info
Report
192 Posts

Sounds good. more performance can definately not hurt 3d rads status
Created on: 1 month ago
Info
Report
129 Posts

Interesting stuff. How did you check if the server or client was running? How do you get the client's ID specific stuff?
Created on: 1 month ago
Info
Report
366 Posts

PlayerID = iNetLocalPlayerMachine();  this returns -1 if not in network mode, it returns 0 if your the host, otherwise it returns your client ID in a networked project. it can be used on both server & client projects.

Also to check for any client being active you use iNetPlayerId(int) (int = 1 to 65535) will return clients assigned ID if conneted, or -99999 if not connected.
** can only be used on the server
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
129 Posts

How do ya assign client IDs? Do you use a counter or some 3DRad scripting functions?
Created on: 1 month ago
Info
Report
366 Posts

We cant assign user ID's.. 3drad does this internally .

EDIT: about the only thing we can do is if you wanted to assign users to specific teams, what you can do is use input redirection using 3drads internal networked array.

Soooo you can allow or manually redirect EOI data to a specific player or team player.
Also if you setup the networking properly, lets sy you have a red & blue team, you could assing player ID 1 to as a red player, ID 2 as a blue player, 3 as red again, repeat for the rest.. this sort of prevents players from all joining the red team and leaving the blue team almost unused, it would kinda of force a balancing process between colors.

But using input redirection allows customization of players and which team each player would play for.. thats one way to handle it, there are a couple other ways to do team selection aswell.
Created on: 1 month ago
Edited on: 1 month ago
Reply
Preview
Post
Or use the advanced reply form here...
Sponsored