Page MenuHomeFeedback Tracker

APERS mine dispenser deviates to the left [DEV BRANCH]
Reviewed, NormalPublic

Description

The mines dispensed from the mine dispensers tend tend to be launched towards the left. Expected behavior would be a even distribution of mines from the center line.

See screenshots below for reference.



Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
1703
Category
Explosives
Steps To Reproduce
  1. Place a mine dispenser, for testing purposes on the middle of a stripe
  2. Touch off the bomb
  3. Lo and behold, the vast majority of mines go left.
Additional Information

Reproduced on 1.77.142584 of the development branch.

Event Timeline

LHHuman created this task.Aug 12 2017, 5:28 PM
Mocane added a subscriber: Mocane.Aug 15 2017, 10:02 AM

I can't reproduce that the mines always gather on the left side. The pattern is random though and the majority of mines can gather on either left and right side.

LHHuman added a comment.EditedAug 15 2017, 10:09 AM

Strange, I tested it locally on the editor, and in numerous tests they always went left. Is it possible that it keeps using the same seed (Edit: in the same session), resulting in the same pattern?

I used the Mine Dispenser 6 times and took screenshots of the resulting minefield patterns (by using the new mine detector interface). Here it looks like the pattern is different every time with sometimes more mines on the left side and sometimes more mines on the right side. I can currently not find any issues with this :-)

Alright, thanks for your effort. I'll check it out on my end later, and see if I can still reproduce it.

Thanks for being vigilant! I'm curious to your results B-)

LHHuman added a comment.EditedAug 15 2017, 9:22 PM

Alright, the results are in, and there in fact IS a bias to the left, on my machine at least. I've set up a test mission, and my conclusion is that ~2/3 mines will land to the left, rather than the expected ~1/2 mines.

Tested using the following mission:

How to use the mission:

  • Spawn and fire a perfectly centered mine dispenser using the "Fire" action.
  • Count the mines using the "CountMines" action. Will be displayed as a hint in the upper right corner of the screen.
  • Do not run into the mines. (Unless you enjoy slideshows)

Mines are counted by iterating over allMines, and comparing distance between two triggers, both distanced equally from the center line.

Screenshot of test results for reference:

Note: this was done on a newer version, v1.77.142613

Edit:

After looking at the screenshot, and think for half a second, I found an explanation for the phenomenon. You can see the dispensed mines gather in lines specific angles from the dispenser. It seems there are 14 angles, 5 being on the right and 9 on the left. If each angle has one mine fired, it would result in a 9/5 ratio to the left and right. That's actually way closer to the ratio I said earlier.

After skimming trough the config, I found this specific entry that I think may be of interest: configfile >> "CfgAmmo" >> "APERSMineDispenser_Ammo_Scripted" >> "submunitionConeType". It has been set to the following value:
submunitionConeType[] = {"randomupcone",14};. My guess at what the value does is divide a cone into 14 random angles.

The bug would be that the angles are always the same, be it due to the values being cached, a seed being reused, or some other reason.

Edit 2:

After another round of testing, specifically restarting Arma, I discovered that these angles are determined once per Arma session. Restarting Arma results in different angles, but the same in each session. I've tested this by using the mission above, firing a couple of times, then saving the mission, restart Arma, and resume.

My conclusions:

The pattern of mine dispensers are currently randomized, using a pattern that is reused in a session. The result for this is that if the pattern is unbalanced towards one side, it will always be so for that session.

I would expect behavior to be:

The mine dispenser would use a balanced pattern, this could achieved by either:

  • Using a fixed pattern (with equal angle intervals)
  • Generating a new pattern every time a dispenser is fired
Mocane changed the task status from New to Acknowledged.Aug 16 2017, 11:18 AM

Thanks for this extensive research and repro.

Mocane changed the task status from Acknowledged to Reviewed.Aug 16 2017, 12:06 PM
Mocane claimed this task.Aug 16 2017, 12:31 PM