Prevent showing Textures in dedicated sever mode?

Posted By: Germanunkol

Prevent showing Textures in dedicated sever mode? - 06/14/11 11:53

No one could answer my question so far:
If I decide not to open a video window (video_screen = 0 in the first frame) for my dedicated server, is there a way to prevent texture loading?

We have some very large textures. I don't want to increase the game size by saving every model twice, once with and once without skins, so I was wondering if there was a way for the engine to not load textures and only geometry.
Thanks...
Posted By: jcl

Re: Prevent showing Textures in dedicated sever mode? - 06/15/11 08:49

I know no direct way to switch off texture loading. You could use external textures, and replace them by small dummy textures of the same name in the server folder.
Posted By: Myrkling

Re: Prevent showing Textures in dedicated sever mode? - 06/15/11 13:55

Perhaps setting d3d_texlimit to a very small value could be a solution, too?
Posted By: darkinferno

Re: Prevent showing Textures in dedicated sever mode? - 06/15/11 14:14

d3d_texlimit seems good but i dont think it would reduce the loading time if thats what you wanted to reduce also
Posted By: jcl

Re: Prevent showing Textures in dedicated sever mode? - 06/15/11 14:25

d3d_texlimit has no effect on the server, as the textures are not created in video memory anyway. Only exception is when you do something with the textures, like locking or processing them.
Posted By: Germanunkol

Re: Prevent showing Textures in dedicated sever mode? - 06/18/11 08:09

Hm, so the textures are loaded on the server, but not into video memory?

Our serer and client folders are the same, we're using the same binary with different startup command line options, and since the files are all in .wrs archives the files are all automatically loaded. But we could make the server only call mdls ending in "_srv.mdl", and not assign any skins to those models in the first place...

I don't like the fact that this way we'll have to ship all models twice.

But I guess we'll have to try...
Posted By: Spirit

Re: Prevent showing Textures in dedicated sever mode? - 06/18/11 09:51

Just out of curiosity, why do you want to ship all models twice, is this only for saving some seconds loading time on the server?

In my experience, a game should be as simple as possible, all complications that you add can increase the likeliness of problems, especially in a multiplayer game.
Posted By: Germanunkol

Re: Prevent showing Textures in dedicated sever mode? - 06/18/11 13:44

If I can prevent it, I don't want to ship all models twice. But to my understanding, as soon as a model is loaded, its texture is loaded as well. In the game, the model's textures are pretty large and so the game uses lots of memory. To keep the (dedicated) server from using lots of memory, I want to prevent loading textures on it.

So I need to load different models with no textures but the same geometry, don't I?
Posted By: Pappenheimer

Re: Prevent showing Textures in dedicated sever mode? - 06/18/11 13:52

If your models got only external textures, it is easier to avoid loading the textures.
Just build an own wrs with all the textures, and build another wrs with very small dummy textures, that you put in the server's folders.
The dummy textures only need to be created once, because you only need one simple texture with different names, while the models still need to be different because of collision sizes etc.
Posted By: muffel

Re: Prevent showing Textures in dedicated sever mode? - 06/18/11 13:53

Whats about removing the skin after loading. this should solve in someway the memory issue, but would slowdown additionally the loading process.

muffel
Posted By: Germanunkol

Re: Prevent showing Textures in dedicated sever mode? - 06/18/11 14:13

Quote:

Just build an own wrs with all the textures, and build another wrs with very small dummy textures, that you put in the server's folders.
But the server and client are using the same folders! It's the same binary, as I said above.
If we use different folders for the two, then we need to reship all .wrs files again a second time, which will almost double the file size.
Quote:
Whats about removing the skin after loading. this should solve in someway the memory issue, but would slowdown additionally the loading process.
this would happen every round-restart and would slow down the loading process even more instead of speeding it up, I believe.
Posted By: Pappenheimer

Re: Prevent showing Textures in dedicated sever mode? - 06/18/11 14:31

Originally Posted By: Germanunkol
Quote:

Just build an own wrs with all the textures, and build another wrs with very small dummy textures, that you put in the server's folders.
But the server and client are using the same folders! It's the same binary, as I said above.

I know. What I meant is, that you send only the wrs with the dummy textures seperated from the game folders within the zip.
The dummy textures are supposed to be tiny.
Maybe, you can include two installers, one for client mode and one server mode, where in server mode the standard texture wrs will be replaced by the dummy textures. No different binary needed. Means: in server mode there are just different textures in the same folder.

Or: even better. Maybe, you can implement in the code that when starting as server the engine loads the textures from the dummy texture folder, and when starting as client load them from the standard folder - I'm not sure whether this is possible, though.
Posted By: Germanunkol

Re: Prevent showing Textures in dedicated sever mode? - 06/19/11 07:17

No, I don't think it can be done by code. That's why I asked here, and since jcl did not reply with "use code to load the right wrs files depending on whether you run as server or client" I assume it's not possible. Also, the manual's pretty clear on this:
Quote:
At engine start, all WRS resources found in the work folder are automatically opened, and the files in them become available to the project.

That's usually very good, but in my case makes things difficult.
Posted By: Sajeth

Re: Prevent showing Textures in dedicated sever mode? - 06/19/11 11:20

Originally Posted By: Germanunkol
That's usually very good, but in my case makes things difficult.

add_folder/add_resource is what you're looking for
Posted By: jcl

Re: Prevent showing Textures in dedicated sever mode? - 06/20/11 09:50

I can hardly imagine that the slightly shorter loading time of smaller textures is worth the hassle. How many seconds do you gain on level loading?
Posted By: Germanunkol

Re: Prevent showing Textures in dedicated sever mode? - 06/20/11 12:48

It's not the level loading time I'm worried about, I want the game to use less RAM. And I think there, the difference would be noticeable (but I must admit I have no tests done to back that up with).
© 2024 lite-C Forums