The Client/Server Model - is it necessary?
by Ed Fear · in Torque Game Engine · 05/28/2003 (11:57 am) · 10 replies
Now, I know that Torque is a very extendible engine and can be used for pretty much anything, so I'm sure that it's not necessary to use the client/server model.
But, is it really necessary? The game I'm working on makes no pretentions to be multiplayer, and working with the default client/server situation seems to unnecessarily muddy the water. So, I'm thinking, "why not just forget about that, and do client-only? Oh, but it would mean a hell of a lot of rescripting, and not really being able to use 'fps' as a base", which makes it sound less of a good idea.
What is the reality of this situation? Is anyone out there doing this, and if so, how?
Thanks very much,
--Ed
But, is it really necessary? The game I'm working on makes no pretentions to be multiplayer, and working with the default client/server situation seems to unnecessarily muddy the water. So, I'm thinking, "why not just forget about that, and do client-only? Oh, but it would mean a hell of a lot of rescripting, and not really being able to use 'fps' as a base", which makes it sound less of a good idea.
What is the reality of this situation? Is anyone out there doing this, and if so, how?
Thanks very much,
--Ed
#2
05/28/2003 (4:55 pm)
Badguy is right, it is far more than just "rescripting" the entire C++ engine is tightly coupled to the client/server model that you describe. there are hundreds of if ( server ) or if ( client ) lines in the C++ side of the code . . . and that does not even begin to address the fact that almost every object derives from NetObject somewhere down the hierarchy.
#3
d
05/28/2003 (7:52 pm)
One other benefit of the client-server model is it enables recording/playback support. Great for automated demos, etc.d
#4
just use the engine as a local client connected to a local server. Does exactly the same job. From a player point of view they'd probably wouldn't even notice.
05/29/2003 (7:19 am)
Ed I dunno why you'd wanna remove the client server model, if your really keen on creating a non multiplayer game,just use the engine as a local client connected to a local server. Does exactly the same job. From a player point of view they'd probably wouldn't even notice.
#5
In addition even local server play introduces a tiny amount of lag due to the tick latency.
So for a single player game, it would be nice to avoid this stuff. But, ripping it out would be a difficult task and would break demo recording.
05/29/2003 (8:19 am)
The network code requires you to maintain the datablock packupdate/unpack update functions, as well as the gamebase packupdate/unpackupdate functions and read/writePacketData. You also need to use isServerObject/isClientObject to make sure that certain code is only executed on the appropriate object. In addition even local server play introduces a tiny amount of lag due to the tick latency.
So for a single player game, it would be nice to avoid this stuff. But, ripping it out would be a difficult task and would break demo recording.
#6
Devon, it was just a general question really, to see if it was a mammoth undertaking or not - and it seems it is! I just wanted to get it sorted while I'm thinking of the overview of how stuff works together.
--Ed
05/29/2003 (8:53 am)
Hmm, thanks for the replies everyone.Devon, it was just a general question really, to see if it was a mammoth undertaking or not - and it seems it is! I just wanted to get it sorted while I'm thinking of the overview of how stuff works together.
--Ed
#7
05/29/2003 (1:36 pm)
So, right there are two mentions of demo recording. Is demo recording a default ability for any TGE based game, or does it have to be enabled? I would very much like to know how to record Marble Blast demos, for example. But, I would also like to record demos for my own games. How is it done?
#8
05/29/2003 (4:26 pm)
Check the torque head, it has a gui to play the recordings... and you record with a key... not sure what it is.. F something... check the bindings list.
#9
05/30/2003 (4:26 am)
F3 Start Record F4 Stop Record
#10
05/30/2003 (4:54 am)
Well, that is what I had found via researching the forums, (F3 and F4), however, it doesn't seem to work (in marble bast, at least). When you press F3, where does it write the file? Does it name it something.rec? Do you have to be in debug mode of some sort? I looked through the code last night for MB and torque and I couldn't find any reference to demo recording.
Torque Owner Badguy
it would take Far to much work in uncoupling the objects.
if it is just a single player game then it CANNOT muddy the water.
you need merely look past the scum on the top.