3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Network Script  (Read 1190 times)

« on: February 25, 2013, 05:02:49 PM »
Tis step one in my quest to make an all-in-one networking script. One script to rule them all!
I haven't seen this done yet, perhaps because I didn't find it. So if it has been done, link please.
This is a merger of Jestermon's server/client car scripts. The car is script-controlled.
Compile. Then run two instances. Make one the server, the other the client. Note how it doesn't crash :) (fingers crossed)
Run a third instance as another client to crash the server. Or not. Up to you.
I'll be back with an update when I get multiple client & car object support working.
« Reply #1 on: February 25, 2013, 05:50:09 PM »
It may be worth your while to look at Sandboxie at http://www.sandboxie.com/
This sandbox software (free version also) allows you to run any programs inside a sandbox. This is nor a virtual machine, but a truly sandboxed solution.
You can run one version of 3DRad in a sandbox, and another copy of 3Drad normally. This will allow you to run both client and server development together, and just Alt-Tab toggle between the 3DRad editors. This can save you hours of headaches.
Good luck with your new network project, it's always good to see new innovations in this forum.
« Reply #2 on: February 25, 2013, 06:52:11 PM »
Looks handy for those questionable downloads as well. Thanks for the tip.
« Reply #3 on: February 26, 2013, 04:29:25 PM »
Or you could try the one created by RGR over at the 3dfoundry which allows you to run multiple instances of 3drad at the same time: http://3dfoundry.net/forum/index.php?topic=83.msg472#msg472
New 3DFoundry:3DFoundry.tk
« Reply #4 on: February 26, 2013, 07:39:16 PM »
Thanks. Interesting options.
« Reply #5 on: February 28, 2013, 06:28:25 PM »
one script to take into account every sort of multiplayer game that the world might need... lemme know how that works out, will ya...


--Mike
« Reply #6 on: February 28, 2013, 07:06:49 PM »
 :D of course, sarcastic bastard! Alright, at least some kind of multiplayer general-purposeness.
I admit I'm having trouble organizing everything involved. It's not gonna be finished anytime soon.
« Reply #7 on: February 28, 2013, 07:37:12 PM »
glad to see you got the gist of my post...  biatch ;D

--Mike
« Reply #8 on: March 03, 2013, 01:42:49 AM »
chronocide :

Is this networking code have anything to do with our co-project ?

I ask cause i have the networking and chat already coded & i also have the process needed to deal with server names with 3drad ( http:/myhost.com:4567 )  3drad's client wont except this.

It will only allow 254.222.0.222 type address.

So i found a way to use the ping command outputting it's results to a text file ( because it resolves the address to it's 0.0.0.0 counterpart) then read in and extract the address 3drad needs.

« Last Edit: March 03, 2013, 01:45:27 AM by TinSoldier »
« Reply #9 on: March 03, 2013, 01:49:57 PM »
Of course. Something to synch directional looking and moving.
First I'm applying mouse & keyboard control with the operation of multiple cars, for multiple clients.
« Last Edit: March 03, 2013, 02:43:24 PM by chronocide »
« Reply #10 on: March 03, 2013, 03:31:25 PM »
yes... one step at a time... lay down the logic, then code against it...

i've got  mouse look working over the wires, but not as precise as i'd like it...

it's been a while but from what i recall... my system is based on everything happening on the server... all the physics, rotations and movement... the use of net aware objects (meshes and event objects) will help reduce the additional logic required to be coded...

the key inputs from the clients are stored in the net global array and automatically are available to the server, just as if the client player were  actually controlling his server counterpoint on the server...

the values stored are used to initiate input as if the client were pressing the keys or moving the mouse on the server...

here's what the server side code looks like for a particular character...

Code: [Select]
    iNetFloatArrayReceive();
    if(iNetFloatArrayGet(1)==1){
      key=1;
    } else {
      key=0;
    }
    float turnY=iNetFloatArrayGet(2);
    Quaternion orient;
    iQuaternionFromEulerAngles(orient,0,turnY,0,"xyz");
    iObjectOrientationSet(OBJ_0,orient);
    iObjectOrientationSet(OBJ_66,orient);


sorry... i can't locate the client code just yet...

--Mike

« Last Edit: March 03, 2013, 03:43:43 PM by Mike Hense »
Pages: [1]