nQuake / server-linux

nQuake (QuakeWorld) server for Linux
http://www.nquake.com/
39 stars 14 forks source link

support bots in nQuakesv? #26

Closed mushis closed 6 years ago

mushis commented 6 years ago

We have a decision to make.

Shipping nQuakeSV with binaries that support bots will use more memory when running the server, even if they're not enabled. I guess the more the ports, the more memory. How much memory more, i don't know.

lets use this issue to discuss this.

meag commented 6 years ago

For reference: extra memory usage is 3680 bytes/entity, or about 2.8MB total, per port. There might be a small amount on top of that but the per-entity data is the bulk of it. There is a //FIXME comment to get that number down, as some fields are only for markers/items/players respectively, but that's what it is at the moment.

The extra CPU usage would be when bots are enabled, as the bounding boxes around markers are increased, and items fire trigger events, even if they have been taken... again it's not much if it's a duel but you notice it in a 4v4 or higher. It might start to be enough to affect other ports on the same server, especially on a VPS.

I'd say leave bots support removed for the moment, or include but as a separate qwprogs-bots.so, that the admin could easily rename and use if they wanted to.

liback commented 6 years ago

I guess we could leave bots in and put an option to enable them in the install script (with default value off in case people install in non-interactive mode). The toggle would rename the qwprogs.so if an additional qwprogs-bots.so exists.

liback commented 6 years ago

I added included three qwprogs files: qwprogs-bots-enabled.so/dll qwprogs-bots-disabled.so/dll qwprogs.so <-- same as qwprogs-bots-disabled.so/dll

I have an install script step to enable/disable in a branch but haven't merged it yet so for now people will have to do it manually.