Data Visualization of All Weapons in Frogue
Creating All Weapons
In game development, especially for shooters or loot-based systems, understanding the full range of possible weapons is critical. Whether for data visualization, balancing, or statistical analysis, being able to enumerate all possible weapon configurations and their probabilities enables precise tuning and informed design decisions.
The Roller Abstraction
At the heart of our system is the Roller
interface, which abstracts how randomness is handled during weapon generation. It includes methods like:
-
getBoolean(probability)
– returnstrue
with the given chance. -
getInt(weights)
– returns an index based on weighted random selection. -
getRandomMod(mods, currentMods)
– picks a weighted mod not already used (if it's markedonce
).
In normal gameplay, we use the RandomRoller
implementation, which simply wraps around standard random utilities like MathUtils.randomBoolean()
to generate diverse weapons with realistic probability distributions.
The EnumeratingRoller
: Systematic Weapon Generation
To analyze the entire weapon space, we created the EnumeratingRoller
. Instead of picking random values, it systematically walks through every possible outcome. It simulates the same decision process as RandomRoller
, but replaces randomness with a deterministic sequence of choices, much like an odometer:
-
Each decision (e.g. true/false, selecting a mod) becomes a digit.
-
The system increments these digits to explore every valid combination.
-
It also tracks the probability of each path, so we can compute the expected distribution of outcomes as if they were randomly rolled.
Using this system, we can export data like:
Weapon hash
Probability
DPS
-
Accuracy at multiple distances
This data feeds directly into spreadsheets, graphs, or tuning tools—making it easier to visualize imbalances, identify outliers, and refine weapon design based on real coverage, not just sampling.
Stat Calculation
- To compute DPS, we divide the total damage dealt after unloading one magazine by the total time to consume that magazine (which also includes the reload time).
- To compute accuracy, we calculate the probability of hitting a circle whose radius is equal to the radius of a zombie's hitbox.
- Limitation: Recoil is not taken into account. Since managing recoil depends on player skill, it's not easy to incorporate.
- Frog has a larger radius.
- Capsule shape (which all character hitboxes use) is easier to hit than a circular target since it's elongated in the vertical axis.
- To compute DPS at a given distance, we simply multiply DPS by accuracy at that distance.
Data Visualization
Now that we have enumerated all weapons in the game, we can analyze and visualize it.
DPS Distribution
This histogram visualizes the distribution of damage per second (DPS) at a distance of 10 for all weapons in Frogue, categorized into rifles and pistols. The DPS values are binned into 20 equal intervals, and each bin’s height is weighted by the probability (P) of a weapon, reflecting how likely each DPS value is to occur. The sky blue bars represent rifles, while the orange bars stacked on top represent pistols. The overall distribution appears to roughly follow a normal distribution, centered around 40 DPS, with a small number of high-DPS outliers exceeding 100, representing rare or exceptionally powerful weapons.
Top-10 Weapons at distance=10
HashName | P | DPS | Acc1 | Acc5 | Acc10 | Acc15 | Acc25 | DPS1 | DPS5 | DPS10 | DPS15 | DPS25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2293 | Pistol SpeedloaderMag BurstFire BurstFire | 0.000360 | 125.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 125.0 | 125.0 | 125.0 | 125.0 | 125.0 |
698 | AK SpeedloaderMag Woodstock Overclocked LongBarrel | 0.000423 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
400 | AK ExtendedMag Woodstock LongBarrel Overclocked | 0.000423 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
222 | AK NormalStock LongBarrel Overclocked | 0.000705 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
1735 | M4A1 SpeedloaderMag Woodstock LongBarrel Overclocked | 0.000423 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
787 | AK SpeedloaderMag NormalStock Overclocked LongBarrel | 0.000423 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
1766 | M4A1 SpeedloaderMag Woodstock Overclocked LongBarrel | 0.000423 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
1379 | M4A1 ExtendedMag LongBarrel Overclocked | 0.000094 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
1112 | M4A1 LongBarrel Overclocked | 0.000157 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
431 | AK ExtendedMag Woodstock Overclocked LongBarrel | 0.000423 | 96.2 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 96.2 | 96.2 | 96.2 | 96.2 | 96.2 |
According to this data:
- Double-burst-fire pistol is surprisingly effective, having the best DPS value.
- Overclocked + Longbarrel combination is the best for rifles.
DPS Distribution: Varying Distances
This figure compares the distribution of damage per second (DPS) at two distances (10 and 25 units) for all weapons in the game, using a weighted histogram where the weights correspond to each weapon’s probability of appearing. Both distributions share the same bin edges to enable a direct visual comparison. The blue bars represent DPS at distance 10, while the red bars represent DPS at distance 25. By overlaying the two histograms with partial transparency, the figure illustrates how weapon performance changes with distance.
The plot reveals several key trends. As distance increases from 10 to 25 units, the DPS distribution shifts noticeably to the left, indicating that most weapons become less effective at longer range. This shift is especially clear in the accumulation of weapons in the sub-20 DPS range, which now makes up almost half of the total probability mass. Additionally, the distribution at distance 25 appears more irregular and noisy, deviating from the roughly normal shape seen at distance 10. Despite this, a small cluster of high-DPS outliers remains, suggesting that some powerful weapons retain their effectiveness at long range. Interestingly, a subset of weapons consistently delivers around 60 DPS in both distributions, implying that their performance is largely unaffected by distance due to high accuracy.
To put this into context, here's the same plot for accuracy values:
Approx. 30% of weapons retain >90% accuracy after increasing the distance from 10 to 25.
Least Accurate Weapons
Unsurprisingly, these involve the "Scattershot" modifier, which increases the bullets fired per shot at the cost of accuracy. Although they have above-average DPS values (67.6), their effectiveness fall off drastically, even at a modest distance of 5.
HashName | P | DPS | Acc1 | Acc5 | Acc10 | Acc15 | Acc25 | DPS1 | DPS5 | DPS10 | DPS15 | DPS25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
742 | AK SpeedloaderMag NormalStock Scattershot Scattershot | 0.000529 | 67.59999 | 1.0 | 0.208333 | 0.104167 | 0.069444 | 0.041667 | 67.59999 | 14.083332 | 7.041666 | 4.694444 | 2.816666 |
831 | AK DrumMag Scattershot Scattershot | 0.000059 | 67.59999 | 1.0 | 0.208333 | 0.104167 | 0.069444 | 0.041667 | 67.59999 | 14.083332 | 7.041666 | 4.694444 | 2.816666 |
653 | AK SpeedloaderMag Woodstock Scattershot Scattershot | 0.000529 | 67.59999 | 1.0 | 0.208333 | 0.104167 | 0.069444 | 0.041667 | 67.59999 | 14.083332 | 7.041666 | 4.694444 | 2.816666 |
208 | AK NormalStock Scattershot Scattershot | 0.000882 | 67.59999 | 1.0 | 0.208333 | 0.104167 | 0.069444 | 0.041667 | 67.59999 | 14.083332 | 7.041666 | 4.694444 | 2.816666 |
297 | AK ExtendedMag Scattershot Scattershot | 0.000118 | 67.59999 | 1.0 | 0.208333 | 0.104167 | 0.069444 | 0.041667 | 67.59999 | 14.083332 | 7.041666 | 4.694444 | 2.816666 |
Average Accuracy

NOTE: Box plots in this post don't take probabilities into account. However, the individual probability of each unique weapon is so similar that the line plot is almost visually indistinguishable even when probabilities are not considered.
Average DPS
Same plots for the DPS values.
Thanks for reading.
Feel free to check out the Python notebook for creating these figures. The game (as well as the notebook) is open-source, released under the MIT license.
Get Frogue
Frogue
3D FPS with Boss-Fights and Randomized Weapons
Status | Released |
Author | necrashter |
Genre | Action, Shooter |
Tags | 3D, Boss battle, FPS, libGDX, Low-poly, Procedural Generation, Weapons |
Leave a comment
Log in with itch.io to leave a comment.