Removing Networking

Expanding and utilizing the engine via C++.
  • 1
  • 2
16 posts Page 2 of 2
kent
Posts: 35
Joined: Sun Sep 04, 2016 11:54 pm
by kent » Sun Sep 25, 2016 2:19 am
I've been thinking about this for a couple of weeks. Short answer is, no. You can not strip out Torque's networking nor can you really "point" the Torque networking towards an Oracle system. There is no situation in which Torque networking code is actually unused.

Torque networking is by definition a connection between a Torque client and a Torque server. The structure is baked in one step below the top level of torque's game object class inheritance tree and forms the basis for all interactive and updatable game components. It is the mechanism used (among other important things) to update and synchronize a high-level object's tick-based mathematical simulation and framerate-based interpolation/rendering.

Objects are basically designed as two halves. Each half expected to operate in a specific space where the server side updates data as needed (and *only* as needed) and the client side uses that data to maintain a simulation's rendering and media output. A game object must have both to function. So there really is no such thing as a non-networked Torque game. What appears to be single-player is functionally just a networked game with a local client attached in which the server does not accept external connections. As far as game objects are concerned, the client/server interchange involved with keeping objects updated and rendering them is no different than if the client were attached over the internet.

Which gets to what you are trying to accomplish. As far as preventing people from connecting to future multiplayer servers through some sort of hypothetical script hack, it would simply take nulling out a couple of engine functions that handle finding and connecting to external servers. Likewise, the engine capacity to host multiplayer could be disabled in a similar fashion.

As for the Oracle thing ... what does the Oracle system do? What information does it provide/manage and what is the anticipated client update frequency? Are you planning on requiring the single-player version of the game to have a connection to the Oracle server?

Any way it goes, unless you want to rewrite pretty much the entire engine the Oracle server will need to update the Torque simulation somehow while still letting Torque networking do it's thing. I'd say maybe create a custom network link between Oracle and the Torque server to update the master simulation as desired. If real-time control of the sim is needed, latch it into the main loop and get an Oracle sync/update just before all the objects tick or something. In that case any changes as the Torque server interacts with Oracle that impact the visual sim would be seamlessly pushed through to the client(s) regardless if the client is local or remote.

Thing is, you're adding a ton of potential latency any way you do it. The more frequently Oracle updates Torque, the more latency will accumulate. For stuff that would only happen a few times per session - like saving/loading games, managing lobbies, etc. - the issue wouldn't be a big deal at all. For functionality that controls/impacts the sim in real-time, it seems like the issue could cascade pretty damn fast. Weather or not it is a good idea has a lot to do with which end of the spectrum your envisioned use sits on.

If you are dead-set on linking the technologies with a sub-second update interval, I'd recommend only considering it for a multi-player situation with Torque compiled into Linux alongside Oracle on a server so the link between the two can be accomplished via a local connection (or engineer with a seriously high-bandwidth physical pipe). For something like that, I honestly think performance might prove to be an interesting (but perhaps not insurmountable) challenge.
Jay Copeland
Posts: 11
Joined: Thu Aug 11, 2016 11:13 am
by Jay Copeland » Tue Oct 25, 2016 3:25 pm
The Oracle system is intended to do a few major tasks wherein the primary function is storage. There are three Oracle systems we have spread across three server blades at the moment, all tied into the game intranet. There's one for accounts and account data, one for game data storage, and one for game update management (rolling out patches and major content updates).

To clarify ... and let the cat out of the bag as it were .. this is a MOG. Not an FPS or anything standard which I see Torque used for. A lot of the assertions being sent from the server won't update much beyond a set necessity, the only major things will be player positions and their impacts therein on the world ... of course all being managed on an authoritative basis.

The use of the Oracle system specifically is because we can implement (and have tested to a rough 65% success rate, the other 45% yielding mostly network issues ... yet TBD) a system wherein most patches to the game can be applied and distributed without taking the server offline. Sort of killing off the concept of weekly maintenance downtime.

Now, if there's a way I can implement ALL of that using only Torque networking tied into say just a MySQL database, or a way to sort of separate the Torque server from Torque client to accomplish this stuff, I'll hear it out.

Wayyy back when I first started with TGE I had bought the MMO kit, but that has essentially become useless as there's no more real documentation and it's just plain incompatible now, and I don't know if I can pull off converting that or if it would just be better to go from scratch or something.
Azaezel
Posts: 384
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Oct 25, 2016 4:42 pm
hrm... authserv might be able to get away with a variant of https://github.com/Azaezel/Torque3D/com ... 9be880R249 + https://github.com/Azaezel/Torque3D/com ... 4c77af5R63 though the position storage bit.. that would indeed most likely involve digging into the guts a bit,,,
Bloodknight
Posts: 94
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Fri Oct 28, 2016 7:58 am
A lot of the assertions being sent from the server won't update much beyond a set necessity, the only major things will be player positions and their impacts therein on the world ... of course all being managed on an authoritative basis.

Translation, all the server will be doing is everything.

The torque server will interface pretty securely with all of your 3 different servers pretty easily. There is clear separation of client and server so thats secure, and if you believe you have a network developer thats smart enough to create a better networking system than the torque one, then they should be smart enough to know how to spend 10% of that time adding extra security to that system instead of re-inventing the wheel.

You seem to be fixated on an area of security which tbh is probably unachievable in real terms, regardless of which engine you use, even if you write your own. There are ways of course, but then you are heading somewhat down the same path as starforce and the same sort of destructive issues. Simply put, security and inconvenience are partners in crime, the more secure you want something the more you inconvenience your users, this will remain a truism until the day night cycle of the planet ends.
Jay Copeland
Posts: 11
Joined: Thu Aug 11, 2016 11:13 am
by Jay Copeland » Wed Nov 02, 2016 7:19 pm
Bloodknight wrote:
A lot of the assertions being sent from the server won't update much beyond a set necessity, the only major things will be player positions and their impacts therein on the world ... of course all being managed on an authoritative basis.

Translation, all the server will be doing is everything.

The torque server will interface pretty securely with all of your 3 different servers pretty easily. There is clear separation of client and server so thats secure, and if you believe you have a network developer thats smart enough to create a better networking system than the torque one, then they should be smart enough to know how to spend 10% of that time adding extra security to that system instead of re-inventing the wheel.

You seem to be fixated on an area of security which tbh is probably unachievable in real terms, regardless of which engine you use, even if you write your own. There are ways of course, but then you are heading somewhat down the same path as starforce and the same sort of destructive issues. Simply put, security and inconvenience are partners in crime, the more secure you want something the more you inconvenience your users, this will remain a truism until the day night cycle of the planet ends.


Quite right.

I'm not exactly fixated on an area of security that is unachieveable, I very well understand that as long as the server can be accessed through internet, there will be security risks that will need patching. Thus is the nature of networking. I wanted to ask here on the forums because I was led to believe that an internal system such as Torque's connected and worked into a system such as our Oracle system would be a bigger security risk than what is considered normally acceptable (for patching, etc.) Personally I love Torque's networking system, but running a few of the features from the Oracle system I find invaluable to give up for simplicity sake for the network dev. I'm starting to feel the guy just doesn't want to put the work in to get Torque to work with our Oracle system :x ... so without saying more about that, we'll see where that goes.

Thank you, @
User avatar
Bloodknight
, for confirming it's certainly possible, even more than acceptable, to hook the two systems together. I've got another network dev coming on board and I'm going to see what he has to say about ... hopefully contrary to ... what I've heard so far.

Azaezel wrote:hrm... authserv might be able to get away with a variant of https://github.com/Azaezel/Torque3D/com ... 9be880R249 + https://github.com/Azaezel/Torque3D/com ... 4c77af5R63 though the position storage bit.. that would indeed most likely involve digging into the guts a bit,,,


I'll have a look at these, and see what my new network dev thinks. Maybe you'll inspire something from him. :lol:
kent
Posts: 35
Joined: Sun Sep 04, 2016 11:54 pm
by kent » Tue Nov 08, 2016 8:06 am
Torque networking doesn't necessarily do what you are talking about. It's only purpose is to accept controller inputs from the client and feed back the bare minimum needed for a client to properly render it's current simulation. The facility is so completely different in design and function from Oracle you should almost treat it's use of "networking" as a homophone.

It sounds like the tasks you are trying to accomplish with Oracle are things not implicit in the engine that would need to be built for every individual game any way it goes. A common approach is to use server-side data files (processed in script) to maintain static information. For a single player game, of course, that means local data files on a user's machine.

I'm not going to call it trivial, but changing from accessing locally-stored files to extracting equivalent data from an external server is a reasonably typical task. This isn't significantly different to accomplish for a Torque app than it is in any other context. It should just be a matter of writing a handler to expose the desired data from the Oracle side and calling it at the appropriate times in the game process to retrieve/store data as needed.

Updating values in the torque server will implicitly update clients if any changes impact game objects which are significant in a client's context/scope. There are potential implications and security concerns with how this is accomplished, but that is an entirely different set of questions and concerns than securely maintaining authoritative static game data. For an online-only game, there is no reason Oracle should be exposed at all from the client's perspective. In your application, Torque's design seems to provide the benefit of reducing potential network exposure footprint significantly.

The updating without downtime part is an interesting question. I assume this would be a server-side update that doesn't distribute a new client app? Hypothetically it seems totally doable. Something like: alert the clients to enter a "suspend" mode so they don't disconnect, save server state, launch updated exe, restore server state, "unsuspend" clients. You could probably even pull the bulk of it off with pure script.
  • 1
  • 2
16 posts Page 2 of 2

Who is online

Users browsing this forum: No registered users and 1 guest