The Last Outpost

Member Services => Engineering => Resolved Support Requests => Topic started by: MStickney on November 15, 2014, 03:06:25 AM

Title: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: MStickney on November 15, 2014, 03:06:25 AM
I am just wondering if there is anybody who has been diving into the map RPG_Voy4 to see why the alerts cause the connection issues, it's such a great map and it is because of the alert thing that makes it barely viable for RP (such a shame).

If any coders want to try to make a fix? I would try but I feel I would break the map in the process.

I am not a map coder so I have absolutely no idea what the difficulty level for making those fixes is.
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: Martin Thompson on November 15, 2014, 05:54:39 AM
The problem is that the map itself cant be modified unless you have the source .map file (its part of making a map, the editor creates a .map file which the map editor can read, then it compiles it to the .bsp format which the game can read but cant be modified anymore, the .bsp is what the creator of the map usually ships).

The alerts causing the map to lag is probably because of the entities activating. Maps with many entities (usable things like doors, panels, everything you can activate or stuff that rotates) tens to push the game engine to the limit. RPG-X uses the old Quake3 engine which wasn't build / optimized for a lot of stuff going on (its all coded in C lol, and the code is a jungle). There is little we can do about it im afraid unless the original editor of RPG_Voy4 modifies the map and releases an update.
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: Serris on November 15, 2014, 09:17:16 AM
I know exactly what's causing the problem.

RPG_Voy4 uses a new feature called shader remapping to handle its alert system, presumably to cut down on the number of entities in the map. It allows you to change shaders that are applied to models and textures after the map has been loaded into memory. Unfortunately, RPG-X's implementation of shader remapping is decidedly less than perfect. The new shaders aren't loaded into memory at start-up with the rest of the map, so every time you have to change the alert status, both the server and the clients connected to it have to seek those files on their hard drive and load them into memory. This causes the lag spike, because the server and client are constantly reporting their state of loading to one another and generating an ungodly amount of network traffic until the files are in memory. With constant switches, the server has a tendency to drop large numbers of players in order to stabilize itself.

Unfortunately, without some tuning of the map or this aspect of RPG-X's code, there's nothing that can be done about this.
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: Telex Ferra on November 16, 2014, 11:48:36 AM
It seems like changing RPG-X to allow multiple shaders to be loaded into memory at once wouldn't be too difficult, as long as some restrictions were put in place to prevent someone from loading too many.

Using some sort of hashtable it could probably be made much much faster. Though I think introducing that into the code might be slightly more difficult.
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: SFC3 on November 16, 2014, 11:54:35 AM
This map is very viable for RP, this bug just pauses the game for a few moments.

I would recommend some advanced notice before setting alert status, OOC or IC, either way
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: Telex Ferra on November 16, 2014, 02:03:42 PM
Quote from: SFC3 on November 16, 2014, 11:54:35 AM
This map is very viable for RP, this bug just pauses the game for a few moments.

I would recommend some advanced notice before setting alert status, OOC or IC, either way

As Serris points out, with more clients connected to the server, it's very likely that the insane number of messages exchanged between server and client will cause the server to drop somebody.
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: Serris on November 16, 2014, 02:09:47 PM
Quote from: Telex Ferra on November 16, 2014, 02:03:42 PM
Quote from: SFC3 on November 16, 2014, 11:54:35 AM
This map is very viable for RP, this bug just pauses the game for a few moments.

I would recommend some advanced notice before setting alert status, OOC or IC, either way

As Serris points out, with more clients connected to the server, it's very likely that the insane number of messages exchanged between server and client will cause the server to drop somebody.

I tested this with eight players. It's stable as long as the alert statuses aren't changed more than once per minute.
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: MStickney on November 17, 2014, 12:11:12 AM
Okay that's good, so between combat scenes you can togle the sound on/off, whitch causes no lag, just the lights (to my knowledge).
Title: Re: Fix the alerts on Voy4? (Don't know where else to put it) [CLOSED]
Post by: Serris on November 18, 2014, 12:05:45 PM
Quote from: MStickney on November 17, 2014, 12:11:12 AM
Okay that's good, so between combat scenes you can togle the sound on/off, whitch causes no lag, just the lights (to my knowledge).

You're free to swap the alerts as long as you're braced for the lag spike and don't switch between them more than once per minute.