Page 42 of 115 FirstFirst ... 323839404142434445465292 ... LastLast
Results 411 to 420 of 1144

Thread: TPWC AI suppression system

  1. #411
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    981
    Author of the Thread
    Quote Originally Posted by Ollem View Post
    I believe we could still use the debug balls, but in stead of creating by default, attaching and then hiding/change color we should just create and delete them when applicable.
    Yes, there is overhead in creating and deleting, but it's a debug feature anyway..

    For debug purposes I've added a simple 'bullet radar' feature to 'tpwcas_fnc_localbullets' which creates dot markers on the map for every detected bullet, and deletes them after 10 seconds.
    (NOTE: this only works when 'tpwcas_fnc_localbullets' is spawned in stead of called, while 'sleep' doesn't work in 'call')

    I will try to see if same approach could perhaps be used to create colored debug balls in game

    Spoiler:
    Nice one. I've been looking at this page http://www.combinedarms.de/wiki/inde...9&languageID=1 to see if I can strip it down to display on screen text. Not having much luck yet.

    A better place for debug ball creation might be in tpwcas_fnc_ballhandler, where it doesn't have to happen in a time critical part. I'll try that out if you try your stuff.

    EDIT: So I tried it and creating balls on the fly looks shit. The ball is created but then you can see it whiz up to its position above the unit. Even if it's created, then hidden, then attached to the unit, then unhidden.

    I honestly can't see why the approach we were taking wasn't OK, and to be honest it's really starting to give me the shits.
    Last edited by tpw; Jul 4 2012 at 08:33.

  2. #412
    Ok I've done some quick tests of earlier script versions and what I've noticed is that from the very beginning the balls created a basic civ population every time. Hadn't noticed at that time because I always ran battles with civ pops anyway and there wasn't any extra overhead being generated from them.
    Up until 1.04, that civ population reaches a maximum figure then stops. I've also noticed that it falls as casualties are taken.
    Unfortunately on version 2, when you start implementing bdetect, the problem kicks in. The civ pop climbs to an initial figure, remains static only until the first casualty is taken and then starts to climb out of control until it reaches thousands. Hope this helps.

  3. #413
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    981
    Author of the Thread
    I wonder if it was due to an earlier bug where I wasn't filtering out dead and injured units properly. I vaguely recall problems in the past with this.

    Can you try running TPWCAS 2.03b script which correctly filters out dead/injured units from receiving debug balls:

    Spoiler:


    with bdetect 0.64
    Spoiler:

  4. #414
    Great mod, but I'm running this as a script version and an error calling for the "TPWC_AI_SUPPRESS_200\bdetect.sqf" when i start a mission. This other sqf was not included in the DLC. Am I missing something?

  5. #415
    Hi.

    After some extensive testing (2 hours mission test) i can confirm that i don't get any sort of degradation with bDetect v0.64 running alone.
    Also, other than for 3 minor typos in bdetect_fnc_eh_add() ("_x" instead of "_unit") i didn't found anything seriously broken.

    In the meantime i've drafted some features for v0.65:

    * enhanced data logging for debug purpose.
    * added "Killed" EH to deallocate previously assigned "Fired" EH and variables ( even if dead units don't fire, done just to make things as clean as possible ).
    * some more varnames polishing.
    * Minor tweaks.

    During testing i collected some interesting data, for example for a 10 minutes mission run (48 vs 48) i got in average:

    * Maximum number of bullets analyzed per frame: 59-64
    * Raw fired bullets: 5473-7518
    * Tracked bullets: 5347-7291
    * Bullet-close Detections: 12831-14170
    * Blacklisted bullet-unit tuples: 3566-5904

    It's interesting that Raw fired bullets (bullets collected by EH) is quite close to Tracked bullets. Since framework is not tracking more than 1 bullet for any unit each 0.1 seconds, that means AI units in ArmA2 rarely pull the trigger more than once in 0.1 seconds. This is important since it allows us to somewhat existimate the raw per-frame overhead for a single unit: assuming a frame is in average 0.02 seconds (pretty low end PC), any unit firing almost full-auto would add 0,2 bullets per-frame to be analyzed.

    So, if we want to keep per-frame processing on the safe end (under 10 bullets per-frame), we may theorethically scale up to 50 units shooting (almost full-auto) on the same spot in the same second. A fast PC should handle 100. That's for bDetect alone, here i'm assuming the load inducted by the custom callback function is almost negligible.

    A second interesting data is the Blacklisted bullet-unit tuple: as you can see it's saving quite some unneeded processing, so benefit is more than cost.

    UPDATE:
    Did a new test to check the load hypothesis. I've put 384 units on utes airport, within 1000 meters, all clashing in the same point at the same time.
    That was the worst scenario i could imagine.
    I've run the mission with both Vanilla ArmA2 and ArmA2 + bDetect active.

    I had a minimum of 13,0 FPS with vanilla ArmA2 and 11,56 FPS with bDetect active. So at worst the overhead of bDetect was 13%.
    It managed to analyze 15.700 bullets, tracking 8.900 of them and getting 35.000 close detections in 10 minutes.

    I then retried, same setup, but 542 units on the field.
    Minimal FPS were: Vanilla: 6,90 FPS, bDetect active 6,57. Overhead 5%.
    Consider that with such low overall FPS the builtin FPS adaptation routine of bDetect almost switches it off, hence the lower difference.
    It managed to analyze 19.000 bullets, tracking 7.500 of them getting 15.000 close detections in 10 minutes.
    Last edited by fabrizio_T; Jul 4 2012 at 11:43.

  6. #416
    ok I ran 2.03 from the script above and its stable.
    50 east
    51 west including player character
    301 civ at start (does not climb after casualties are taken. Actually decreases as they do. 298 after first casualty).
    The ball counter reads 210 until first casualty when it then reads 207.
    Thought I'd provide figures for you to make out what you will from them. Maybe they'll provide some insight into what's going on.
    Last edited by tadanobu; Jul 4 2012 at 10:38.

  7. #417
    Just got back from work and retest my performance problem.... It's fixed, magically. The computer probably just needed a bit of rest... (offtopic: those uav/ucav makers that says machine dont need rest/eat/sleep then they havent played ARMA)

  8. #418
    Releasing bDetect v0.65.
    I've create a bDetect thread and inserted download into first post, so people should not scan pages to test latest version and i don't litter here with code.
    See here: http://forums.bistudio.com/showthrea...tion-framework

    Changelog:

    * Added "killed" event handler
    * Renamed function bdetect_fnc_eh_fired_add() to bdetect_fnc_eh_add()
    * Renamed variable "bdetect_skip_mags" to "bdetect_bullet_skip_mags"
    * Fixed 3 typos ( "_x" instead of "_unit" ) in bdetect_fnc_eh_add()
    * Removed initial 5 seconds wait time before framework initialization, since it's easy to code the wait outside of the framework
    * Introduced variable "bdetect_fps_adaptation": (Boolean, Default true). Defines whether bDetect should try to keep FPS over "bdetect_fps_min", through degrading quality of detection
    * Tweaks to code and example syntax

    It may be the last version for a while (unless problems arise), since it's already stable, fully featured and reliable enough in my experience.
    If it's proved to be so in the next few days, i'll probably skip to v1.00, which would be the first production version, maybe in a week or so.
    Have a nice testing.

    tpw: v0.65 is almost backward compatible with all previous 0.6x versions. Even if it's not important anymore, i would only suggest to rename "bdetect_skip_mags" to "bdetect_bullet_skip_magt way s" in your own init.
    Also add some sleep if really needed at startup. Tha's all, that way v0.65 would be 100% functional.
    Last edited by fabrizio_T; Jul 4 2012 at 13:23.

  9. #419
    First Sergeant
    Join Date
    Oct 30 2009
    Location
    Brisbane, Australia
    Posts
    981
    Author of the Thread
    Quote Originally Posted by tadanobu View Post
    ok I ran 2.03 from the script above and its stable.
    50 east
    51 west including player character
    301 civ at start (does not climb after casualties are taken. Actually decreases as they do. 298 after first casualty).
    The ball counter reads 210 until first casualty when it then reads 207.
    Thought I'd provide figures for you to make out what you will from them. Maybe they'll provide some insight into what's going on.
    That's pretty much what I see. Every combatant on the map should get assigned 3 different balls (green, yellow, red), which are hidden or shown according to suppression status. Ideally with 101 units on a map there should be 303 balls, but as I mentioned this number always seems to be less for some reason. And since the balls are counted as civilians for some reason, then they should register as 303 civilians.

    The main things are:
    • the suppression is working whether the debug balls are correctly shown or not
    • the debug balls (civilians) don't multiply now
    • the script is stable


    I'm still looking for a bulletproof debugging display, but in the mean time perhaps we can stick with what we have.

    ---------- Post added at 23:25 ---------- Previous post was at 23:22 ----------

    Quote Originally Posted by fabrizio_T View Post
    Releasing bDetect v0.65.
    I've create a bDetect thread and inserted download into first post, so people should not scan pages to test latest version and i don't litter here with code.
    See here: http://forums.bistudio.com/showthrea...tion-framework

    Changelog:

    * Added "killed" event handler
    * Renamed function bdetect_fnc_eh_fired_add() to bdetect_fnc_eh_add()
    * Renamed variable "bdetect_skip_mags" to "bdetect_bullet_skip_mags"
    * Fixed 3 typos ( "_x" instead of "_unit" ) in bdetect_fnc_eh_add()
    * Removed initial 5 seconds wait time before framework initialization, since it's easy to code the wait outside of the framework
    * Introduced variable "bdetect_fps_adaptation": (Boolean, Default true). Defines whether bDetect should try to keep FPS over "bdetect_fps_min", through degrading quality of detection
    * Tweaks to code and example syntax

    It may be the last version for a while (unless problems arise), since it's already stable, fully featured and reliable enough in my experience.
    If it's proved to be so in the next few days, i'll probably skip to v1.00, which would be the first production version, maybe in a week or so.
    Have a nice testing.

    tpw: v0.65 is almost backward compatible with all previous 0.6x versions. Even if it's not important anymore, i would only suggest to rename "bdetect_skip_mags" to "bdetect_bullet_skip_magt way s" in your own init.
    Also add some sleep if really needed at startup. Tha's all, that way v0.65 would be 100% functional.
    Sniff, it'll be sad to not have your code expertise on this thread any more. Thanks Fabrizio_T, your work is absolutely incredible.

  10. #420
    Sniff, it'll be sad to not have your code expertise on this thread any more. Thanks Fabrizio_T, your work is absolutely incredible.
    Don't get me wrong, i've not leaving this thread.

    Just i was bored to fill pages with spoilers.
    With a seperate bDetect release thread no need for that anymore.

Page 42 of 115 FirstFirst ... 323839404142434445465292 ... LastLast

Similar Threads

  1. Suppression Effects
    By -Coulum- in forum ARMA 2 & OA - SUGGESTIONS
    Replies: 35
    Last Post: Oct 17 2011, 14:33
  2. Suppression
    By Alex72 in forum ARMA 2 & OA - SUGGESTIONS
    Replies: 1
    Last Post: Dec 30 2009, 04:26
  3. Suppression mode
    By BKnight3 in forum ARMA 2 & OA - GENERAL
    Replies: 4
    Last Post: Jul 16 2009, 22:19
  4. Suppression
    By hawk66de in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 1
    Last Post: Jun 5 2009, 22:41
  5. My AI Suppression Script...
    By Meathead in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 4
    Last Post: Jan 17 2009, 13:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •