Raised This Month: $51 Target: $400
 12% 

[L4D2] SIPool - Aim to improve performance when spawn SI (Experimental)[2024.04.18]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Paimon
Member
Join Date: Jul 2021
Location: Zootopia
Plugin ID:
8641
Plugin Version:
2024.04.18#145
Plugin Category:
Technical/Development
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A Client Pool for SI Bots, used to avoid lots of CreateFakeClient() operation
    Old 02-18-2024 , 22:07   [L4D2] SIPool - Aim to improve performance when spawn SI (Experimental)[2024.04.18]
    Reply With Quote #1

    Description:

    This plugin is a library that allows you to create special infected bot by SIPool.

    The plugin's aim is that when your server needs to create special infected bots very frequency.
    Such as create 28 SI bots in 0 seconds, CreateFakeClient() will consume lots of cpu and network resources.
    But use SIPool can avoid lots of CreateFakeClient() operation because the plugin use pool to manage the SI bots that already created in the past and avoid them being kicked by the director.
    When you try to request the bot, SIPool will pick an available bot from pool unless the pool is empty.

    And after my test(28 SI with 0 seconds), the result showed that:
    NO SIPool, the server's tickrate decrease from 100 to 80 LESS when CreateFakeClient() from a for() loop;
    WITH SIPool, the server's tickrate decrease from 100 to 90 MORE when RequestSIBot() from a for() loop;

    And the plugin still needs to test, only myself can not make the plugin be pefect, so any advice and criticize reports are wanted.

    Q: How does SIPool work?

    SIPool will prevent the engine from kicking dead SI(Special Infected) bots and keep them death until next spawn,
    for example, a charger bot dead, SIPool will change it's status to ACTIVE to avoid it being kicked,
    and add it to charger pool, next time you RequestSIBot for a charger,
    SIPool will pick an available client from charger pool and make it respawn,
    teleport to target position, then return it's index to the plugin which calls RequestSIBot.

    Q: Why can SIPool enhance the performance?

    I think the main reason is that SIPool avoid lots of CreateFakeClient operation.
    SIPool makes the SI bot to be a player in coop mode, just like versus, dead SI won't be kicked but wait for respawn,
    so no new client connect and boardcast to everyone in server, these will save lots of cpu and network resources.

    Usage:

    See si_pool.inc and sptest.sp.

    Support:

    Harry's L4D Infected Bots(SIPool fork)

    Update:
    2024.04.18#145
    Fixed array index out of bounds.
    Update L4DInfectedBots(SIPool fork) to 2.9.5

    2024.04.01#124:
    Fixed all bugs mentioned here(Issue#5)
    The fixed bugs will list as follows:
    1. Server crash when changelevel
    2. SI crouch after spawn
    3. Add tank to pool
    4. Server full for connecting player(may be fixed)
    5. Index out of bounds
    6. Better way to manage SIPool

    Spoiler


    Source:

    You can ALWAYS find latest source at my GitHub:
    Paimon-Kawaii - L4D2-Plugins/InProgress/SIBotPool

    Download:
    Attached Files
    File Type: zip SIPool_v2024.04.18.zip (18.6 KB, 26 views)
    __________________

    Last edited by Paimon; Yesterday at 05:10.
    Paimon is offline
    NekoYa4r
    Junior Member
    Join Date: Mar 2020
    Old 02-19-2024 , 05:23   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #2

    Wow, will this plugins conpatible with Infected bot harry fork? Because i'm currently running a 16 slots coop server and it spawn a lot of SI at the same time therefore my server tickrate is really unstable.
    __________________
    Sorry for my bad english
    NekoYa4r is offline
    Paimon
    Member
    Join Date: Jul 2021
    Location: Zootopia
    Old 02-19-2024 , 05:59   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #3

    Quote:
    Originally Posted by NekoYa4r View Post
    Wow, will this plugins conpatible with Infected bot harry fork? Because i'm currently running a 16 slots coop server and it spawn a lot of SI at the same time therefore my server tickrate is really unstable.
    Unfortunately, currently none of the plugin is conpatible with SIPool because all the old plugins need to rewrite with SIPool in order to get the function work.
    __________________
    Paimon is offline
    WhiteSails
    Junior Member
    Join Date: Sep 2022
    Old 02-19-2024 , 07:22   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #4

    Author, can you speak Chinese?
    WhiteSails is offline
    Paimon
    Member
    Join Date: Jul 2021
    Location: Zootopia
    Old 02-19-2024 , 08:08   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #5

    Quote:
    Originally Posted by whitesails View Post
    author, can you speak chinese?
    可以,请问有什么问题么?
    __________________
    Paimon is offline
    Paimon
    Member
    Join Date: Jul 2021
    Location: Zootopia
    Old 02-20-2024 , 01:11   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #6

    Updated.
    __________________
    Paimon is offline
    Paimon
    Member
    Join Date: Jul 2021
    Location: Zootopia
    Old 02-20-2024 , 02:09   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #7

    Quote:
    Originally Posted by NekoYa4r View Post
    Wow, will this plugins conpatible with Infected bot harry fork? Because i'm currently running a 16 slots coop server and it spawn a lot of SI at the same time therefore my server tickrate is really unstable.
    I have made a SIPool fork for harry's L4D Infected Bot and I have put it here.
    For current only support L4D2 because SIPool only support L4D2 now.

    Only test at my server(30 SI 0 seconds with single survivor), the test result is that:
    At the moment SI spawn, 95 more tickrate the server has at round start.
    With the round continue, lots of SI got lagged and killed by plugin, 85 more tickrate the server keeps.
    For the average performance, the server should keep 90 tickrate if SIPool works as expect.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4dinfectedbots.sp - 15 views - 248.1 KB)
    File Type: smx l4dinfectedbots.smx (62.5 KB, 14 views)
    __________________

    Last edited by Paimon; 04-18-2024 at 00:12.
    Paimon is offline
    NekoYa4r
    Junior Member
    Join Date: Mar 2020
    Old 02-20-2024 , 06:32   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #8

    Quote:
    Originally Posted by Paimon View Post
    I have made a SIPool fork for harry's L4D Infected Bot and I have put it here.
    For current only support L4D2 because SIPool only support L4D2 now.

    Only test at my server(30 SI 0 seconds with single survivor), the test result is that:
    At the moment SI spawn, 95 more tickrate the server has at round start.
    With the round continue, lots of SI got lagged and kill by plugin, 85 more tickrate the server keeps.
    For the average performance, the server should keep 90 tickrate if SIPool works as expect.

    SIPool need to redownload because I have updated it.
    PHP Code:
    L 02/20/2024 18:30:44SourceMod error session started
    L 02
    /20/2024 18:30:44Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240220.log")
    L 02/20/2024 18:30:44: [SMUnable to load plugin "l4dinfectedbots.smx"Native "SIPool.Instance" was not found 
    __________________
    Sorry for my bad english
    NekoYa4r is offline
    Paimon
    Member
    Join Date: Jul 2021
    Location: Zootopia
    Old 02-20-2024 , 08:36   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #9

    Quote:
    Originally Posted by NekoYa4r View Post
    PHP Code:
    L 02/20/2024 18:30:44SourceMod error session started
    L 02
    /20/2024 18:30:44Info (map "c2m1_highway") (file "D:\Dedicated\L4D2\left4dead2\addons\sourcemod\logs\errors_20240220.log")
    L 02/20/2024 18:30:44: [SMUnable to load plugin "l4dinfectedbots.smx"Native "SIPool.Instance" was not found 
    Fixed.
    Please redownload SIPool and l4dinfectedbots.smx
    __________________

    Last edited by Paimon; 02-20-2024 at 08:43.
    Paimon is offline
    ggyylike
    New Member
    Join Date: Mar 2022
    Old 02-21-2024 , 05:44   Re: [L4D2] Special Infected Pool (Experimental)
    Reply With Quote #10

    Quote:
    Originally Posted by Paimon View Post
    Fixed.
    Please redownload SIPool and l4dinfectedbots.smx

    sourcemod-1.10.0-git6502
    sourcemod-1.11.0-git6954
    [SM] Unable to load plugin "l4dinfectedbots.smx": Native "SIPool.Instance" was not found

    After using two versions, the error still appears. Please ask the author to fix it. Thanks.

    用了两个版本还是显示错误,还请作者修复,谢谢。
    ggyylike is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 17:55.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode