How crazy is this idea?
by Peter Simard · in Torque Game Engine · 04/03/2006 (7:55 pm) · 6 replies
TGE is a great platform. Unfortunately it was originally designed for a distributed FPS that allowed users to mod it. To accomplish this, the datablocks get sent from the server to the client. Unfortunately if you are making an RPG (especially one with zoning) this becomes a huge problem. With every spell, item, quest, mob etc that gets added to the game, the initial load time increases more and more.
Because all RPGs are updated via patch files, this functionality can be removed. What I propose doing is:
Move all datablocks to a common directory and load them on the client and server
Remove the sending datablock phase
Instead of sending datablocks, the server instead sends the datablocks name (the sim name), and its ID on the server
The client assigns its local datablocks to the servers ID it receives
Doing this should keep all existing code working, and reduce the datablock send time time nearly nothing.
Am I going about this the wrong way, or would this be an effective solution?
-Pete
** edit spelling
Because all RPGs are updated via patch files, this functionality can be removed. What I propose doing is:
Move all datablocks to a common directory and load them on the client and server
Remove the sending datablock phase
Instead of sending datablocks, the server instead sends the datablocks name (the sim name), and its ID on the server
The client assigns its local datablocks to the servers ID it receives
Doing this should keep all existing code working, and reduce the datablock send time time nearly nothing.
Am I going about this the wrong way, or would this be an effective solution?
-Pete
** edit spelling
#2
I'm interested in doing the same thing eventually.
You'll want to understand that server/client ID stuff pretty well, tho.
Another piece which i'd like not to send over the wire is the mission file,
altho aligning the simIDs will be even trickier there, i expect.
04/04/2006 (1:20 pm)
Sounds reasonable.I'm interested in doing the same thing eventually.
You'll want to understand that server/client ID stuff pretty well, tho.
Another piece which i'd like not to send over the wire is the mission file,
altho aligning the simIDs will be even trickier there, i expect.
#3
Anyone aware of any issues changing a datablocks ID after it has already been created?
04/04/2006 (5:02 pm)
Not sending over the mission would be diffucult since the objects inside a mission file exist on the server, and they will need to be ghosted over. Datablocks on the other hand never change so they can be loaded by the client direct.Anyone aware of any issues changing a datablocks ID after it has already been created?
#4
What will happen when users start to discover they can modify item datablocks to their own needs?
04/05/2006 (12:16 am)
This might be a great idea, but if you are planning on going MMO, what about Security issues? have you tough in that?What will happen when users start to discover they can modify item datablocks to their own needs?
#5
I'm actually looking into another route right now. I'm thinking of moving all datablock definitions before the client or server is loaded. In theory the client and server will have the same datablocks with the same IDs.
04/05/2006 (12:23 am)
Assuming you program the client/server correctly security shouldn't be an issue. They will only have access to the precompiled DSOs, so they cant see the actual data. Even if they do find a way to change them it will only make things different on the client and wont change anything on the server.I'm actually looking into another route right now. I'm thinking of moving all datablock definitions before the client or server is loaded. In theory the client and server will have the same datablocks with the same IDs.
#6
@Peter - please let us know how this goes for you !
04/05/2006 (9:05 am)
@Jorge - i believe that's a security issue even if the server transmits the datablocks to clients as normal. a client can always modify anything in their local simulation, including datablocks. it's up to the server to be authoritative for stuff like the damage-power of my sword or whatever.@Peter - please let us know how this goes for you !
Torque 3D Owner Peter Simard
Default Studio Name