Rts camera server updates
by Vijay Myneni · in RTS Starter Kit · 11/24/2004 (1:00 am) · 4 replies
Howdy,
I'm mucking around with the rts camera (adding middle-mouse click-drag pitch and yaw, adding smooth accel/deceleration for the movement, and an altitude-sensitive movement rate), and I've pretty much got it all working. But I'm seeing all this server updating going on with the rtscameraupdates, and I'm wondering if I need to keep it in? Does the server need to know about the camera for it to work properly?
It seems to be working fine if I turn that stuff off, but I'm wondering if I'm messing it up for multi-player modes, which I don't have the capability to test yet (just one computer). I don't know that much about scoping and stuff, so I just wanted to ask if anyone could think of reasons (other than to prevent camera-related cheating, which doesn't matter to me) for keeping the server updated on the camera.
Thoughts?
Thanks!
Vijay
I'm mucking around with the rts camera (adding middle-mouse click-drag pitch and yaw, adding smooth accel/deceleration for the movement, and an altitude-sensitive movement rate), and I've pretty much got it all working. But I'm seeing all this server updating going on with the rtscameraupdates, and I'm wondering if I need to keep it in? Does the server need to know about the camera for it to work properly?
It seems to be working fine if I turn that stuff off, but I'm wondering if I'm messing it up for multi-player modes, which I don't have the capability to test yet (just one computer). I don't know that much about scoping and stuff, so I just wanted to ask if anyone could think of reasons (other than to prevent camera-related cheating, which doesn't matter to me) for keeping the server updated on the camera.
Thoughts?
Thanks!
Vijay
About the author
#2
11/25/2004 (10:24 pm)
Cool, thanks. Ya, looks like you're right about that. Guess I have to put the code back in.
#3
Note though, that for testing, you can compile a debug build and open up a server and clients on the same machine.
11/26/2004 (10:40 pm)
Vijay, if you don't care about camera-related cheating or visibility, you can certainly change or remove the camera update scheme. You'll also want to replace the Visibility Manager then. This stuff can get a bit hairy, so you may not want to dive in until you can test.Note though, that for testing, you can compile a debug build and open up a server and clients on the same machine.
#4
You guys did an awesome job adding the RTS stuff in that you put all the code changes in new files. I can find and remove (or modify) the stuff I don't need pretty easily. What could have been a nightmare is actually turning out to be pretty easy. Not to mention I'm learning the engine really well in the process.
11/26/2004 (11:30 pm)
I'm letting the visibility manager do its thing for now, but I rewrote the RTSCamera's OnCameraScopeQuery to just call the parent function, making it essentially work like rendering from a Player's point of view. This way I can get non-RTS ghosts to display (I'm using the regular FPS player).You guys did an awesome job adding the RTS stuff in that you put all the code changes in new files. I can find and remove (or modify) the stuff I don't need pretty easily. What could have been a nightmare is actually turning out to be pretty easy. Not to mention I'm learning the engine really well in the process.
Torque Owner Gregory "Centove" McLean