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: Question about Network FPS (EDIT: I did it! Read last reply for info)  (Read 979 times)

3DPredator

« on: January 16, 2013, 12:55:52 PM »
So the last days I've tried to make a multiplayer fps game,
but it looks like the client can't use the mouse. Only
EOI with the Network IDs work for Client controls.

Does it exist any way making it possible for a client
to control like the camera/movement of a character
in a multiplayer game made in 3D Rad?

Thanks for answering :)
« Last Edit: May 03, 2013, 05:30:08 AM by 3DPredator »
« Reply #1 on: January 16, 2013, 02:14:24 PM »
you're correct... there is no mouse related net functionality...

what i wound up doing was using the net global array and stored the mouse x,y,z there (at an offset for each client)...

on the server i polled for the mouse x,y,z and used that just as if the mouse on the server was being used to control the respective object...

i hope this helps...

--Mike

3DPredator

« Reply #2 on: January 17, 2013, 08:33:05 AM »
Thanks mike for the quick answer :)

Can you tell me what this global array script thingy does exactly?
Does it send like the orientation for the client cam to the server,
or something like that?

A little unclear answer.
« Reply #3 on: January 17, 2013, 08:48:12 AM »
you're quote welcome...

Quote
Can you tell me what this global array script thingy does exactly?

yes i could... but i'm sure that the 3DRAD Scripting Object Reference will give you a more detailed and complete explanation...

just add a script object to an empty project... double click and open it...  click in the help button  (upper left)... and sclick on Script Object Reference when the help page comes up...

once you get there, Find (ctrl F) and enter "global" (no quotes)... the first found reference should be iGlobalStringSet() which should give you a good idea of the global string array concept...

--Mike

3DPredator

« Reply #4 on: January 17, 2013, 09:19:25 AM »
I found a lot of scripts with the function iGlobalStringSet.
And It didn't look good. A boy like me that can only script
basic will never manage to script a mouse controlable cam script
that works over Lan/internet..

So my day is turning dark :/

Please, it is impossible to gain something that big
with my small scripting skill.

Do you have a script or anything that I can start out with?
You are the best if you can help me.
« Reply #5 on: January 17, 2013, 10:03:34 AM »
well as long as you limit yourself you're never gonna be able to do what you want as far as this topic is concerned...

why not try taking a small step outside of your self imposed box, and increasing your scripting capabilities... a small step at a time...

you may surprise yourself at what you can do...

first, break down the task into smaller, manageable sub tasks...
write out in plain english the steps you need to do in order to accomplish each of these that you want to do...

get a scriptable mouse cam working... just the logic... no script...  make sure you understand what is happening...

then think it out... the mouse controlled cam reacts to inputs from the mouse... right? well, if you can send these inputs to the server, from the client, then you effectively are doing the same thing as if it was a single player mouse controlled cam...

the trick is getting the inputs from the client to the server...

this is where the global string array comes in...

you take it from there...

--Mike

3DPredator

« Reply #6 on: January 24, 2013, 01:01:19 PM »
One more question.
In the default NetWorkString demos the server sends text to the client.
So I was wondering if it was possible to send the displayed value for
a valueprint to the client instead of "Hello World"? Like changing the string
text to OUT_0/Displayed Value in the Server Script. So if I made a script that makes the counter
increase/decrease by mouse it may be possible to send mouse movement
from server to client?

3DPredator

« Reply #7 on: May 02, 2013, 03:35:49 PM »
Today I finally did it!
After weeks of research and testing out scripting
I finally gained results :)

I wanna thank you Mike for your tips
and for making me try scripting!

Today me and a friend tested my fps project over
the internet, and it worked very well :D
http://youtube.com/watch?v=aCnYgivU3Ic
Once again thank you :)
« Reply #8 on: May 03, 2013, 08:14:56 AM »
congrats... i knew you could do it  :)

--Mike
« Reply #9 on: May 03, 2013, 12:30:59 PM »
i love the video is very funny ;D good work it looks nice, and you don't have lag on the server and the client, amazing work ;)
« Last Edit: May 03, 2013, 02:44:05 PM by Facujk101 »
See my web:
Pages: [1]