Game Development Community

Splitting Client/Server

by genomegames · in Torque 3D Professional · 03/11/2013 (5:28 am) · 39 replies

Hello all!
We are trying to develop an MMO.
A Level of our game is loading too slow.
We think that the reason is each object processes on a client and a server.
Thinking, server would hold collisions of objects only and a client would hold all other things of objects to render them.
How to split client and server this way?
Or may be I don't understand this situation, and you have other great ideas about it.
Thank you!
Page «Previous 1 2
#1
03/11/2013 (5:52 am)
The server does not advance animation, but only set animation and player states. The rendering logic is entirely client side.
I believe you load huge amount of static data (datablocks), textures, meshes , UI resources , etc.
You should optimize your loading stuff - for example use texture compression.
Don't use huge diffuse maps, but use detail maps as well.

Using huge amount of data, you can easily run into memory leaks also.
#2
03/11/2013 (6:55 am)
Thank you for your answer!
As you say: we cannot make big levels? Only small?
#3
03/11/2013 (7:18 am)
When we start a game on a local computer a level is loading fast but on the other hand when we connect from a client to a remote server of the game a level is loading very slow
#4
03/11/2013 (11:03 pm)
"When we start a game on a local computer a level is loading fast but on the other hand when we connect from a client to a remote server of the game a level is loading very slow"

that happens when i test my level on same pc with seperate t3d instance.one as server and another 1 as client.

it could be happened for different reasons.do some test.

1st try to find out how fast empty terrian loads.
then just move your level files and shape files into empty terrain project.then try again.if it loads slowly then problem is in your shape files tsconstructor and materials file.or with texture file compressions (as said by ivan)
optimize them.

after that do another test.
just merge your script changes with empty terrain project.then try again.
if it loads slowly then problem is in script.
try to find out culprit.
also try to set better packet size and other $pref::server::xxx values.
#5
03/12/2013 (2:43 am)
We think that the problem is in a limit if objects that Torque has
When this limit overgrows problems appear
#6
03/12/2013 (3:09 am)
i remember ,there was a recent discussion on t3d's object limit for ghosting.

u have to increase GhostConstants enum and GhostIdBitSize
#7
03/12/2013 (3:26 am)
Yes, I have done that
And may be this is a reason of a slow loading?
Can not test this because I have a big level, if I reduce the level, a game loads faster but it isn't a solution
#8
03/12/2013 (11:00 am)
I can't find the details but some of the slow down usually has to do with the network settings in torque. In the old torque (tge, tgea),
the settings were set for something around a 56k modem or slower.

Tweaking the size of the packets, number of packets, etc dramatically impacts how fast the game loads up in client/server mode.

Although if you make them too high then lower bandwidth players will have lots of issues trying to login.

but I know the default settings for those things are super low.
Pretty sure you can still tweak the values just in the configuration and not touch any of the code.

There are other optimizations as well, AFX wrote a datablock caching system so you dont have to download them everytime, so that might be something too look at as well.

Those network settings use to be the key to better performance though, when I was doing testing with thousands of bots, I could get the level to load in just a few seconds just by tweaking the message settings.

wish I could remember the details but its been a really long time.
#9
03/12/2013 (11:52 am)
I was tweaking the size of packets, it didn't help, will try to do it again. Thanks for support
#10
03/12/2013 (1:27 pm)
hi i am working on mmo project too.
Textures, sounds, datablocks all loading from client side, with server check for compatibility.
The server determines the locations and procedures for controlling objects, animation orders etc.
So the basic premise correct management of objects.
e.g
a construction of a single castle count as 1 object like 1 barrel for the network (+ cols), use vissible cols for objects with very good lods.
a construction of castle walls + towers + doors + bridges ++ is many objects.
Use as much as possible single objects and all will go as normal.
I use large objects eg 1 house = 1 object and 1 object is 1 mesh, in large levels.
#11
03/12/2013 (9:24 pm)
This is a problem number two: you would collect many simple objects as one to get one complex. This makes troubles to a level designer.
#12
03/13/2013 (4:04 am)
Also, in stock T3D, you can only have about 4k ghosts in a zone. That includes players, ai, statics, etc, anything that can be ghosted. This is easy to extend, I just can't remember where I did it.

If your not culling your objects, then the server needs to relay everything in the zone to each client as well.

I put out a resource which culls AIPlayers to a set distance.

In regards to load time, remember that the server relays the datablocks, and then all of the ghost always. So if you have a lot of datablocks you might want to look at preloading them. As for the ghost always, well, you will probally need to be a bit creative in culling them.

Vince
#13
03/13/2013 (8:16 am)
@Vince
For the first: thank you for an answer.

"Also, in stock T3D, you can only have about 4k ghosts in a zone"
as ahsan said: u have to increase GhostConstants enum and GhostIdBitSize
I've done that
else if object index is greater than 4K it's not rendered

"I put out a resource which culls AIPlayers to a set distance."
Can you give a link to this resource?

How to make datablocks are preloading?
#14
03/13/2013 (2:34 pm)
Most games utilize complex objects. It is the basic principle of a mmo game. A good designer has no problem with this. Is the better way for easy Lods.
On game start make a level for player choice, load all datablocks.
Remove then load datablocks from level load, removed the deletion datablocks from memory after client mission exit.
For mmo game, t3d needs many changes, i am on 12k+ pages code this time.
3k of this pages is on engine, but really the result is very good.
Once finished with skills i do a presentation of the game, (1-2 monts).
#15
03/14/2013 (5:01 am)
This was my latest resource,

www.garagegames.com/community/resources/view/21756

It allows you to set the viewable distance at the player point.

Vince
#16
03/14/2013 (5:53 am)
Thank you very much, Vince
#17
03/14/2013 (2:17 pm)
Vince is very good resource, but view distance is very low for mmo game with large terrains++, I use
nearClip = "0.1";
visibleDistance = "2500";
decalBias = "0.0015";
I think for mmo the better way for Ghost controling is the pixel size on skins lods. Engine is fast to render show/hide skins. I use up to 17k objects this time. Any object with pixel size down of 16 is out of render (for a wolf this distance is ~ 150 meters). For static objects i use also and the imposter system (1 house is like 1 leaf).
#18
03/15/2013 (3:55 am)
the problem isn't the rendering, it's the network traffic. The resource I posted reduces network traffic.
#19
03/15/2013 (11:15 am)
I'm not talking about something different, an object that is not visible (is hidden) does not needs network updates. The method requires a little more cpu use.
#20
03/16/2013 (9:37 am)
@Dimitris,

It still gets network updates whether or not it is visible. Easiest way to prove it is to put a breakpoint into the pack and unpack and you will see that it still ghosts it even if it didn't change.

Vince
Page «Previous 1 2