Showdown in Red Rock is a western-themed gunfight simulation. This pen & paper version of the game can be played solo or with another player. It works effectively like a first-person shooter video game but with the game time slowed down so each millisecond of the action can be recorded, reviewed, and analyzed after the game is completed. The game can be incorporated into other table top games where ranged combat must be resolved. Modifications (mods) are also suggested to make the game either more or less detailed, as well how to play multiple combatant scenarios, or with different weapons of the period or even with modern and futuristic weapons as well. It might feel overwhelming to play these games at first but if you give them a chance you may find many hidden benefits and we'll start out slowly with simplified versions of the game at first and as you play more you'll find yourself coming up with your own thoughts and ideas for mods. You are encouraged to share your mods on the Pen & Paper Game discussion forums so that others might benefit from your insights. If you are new to playing these types of physics-based pen & paper simulations, just be patient and set them aside if they ever stop being enjoyable because you can always pick them up again exactly where you left off any time you feel like playing again.
If you are on a budget, you will be happy to learn that it isn't necessary to spend alot of money on game materials, but you will want to have a few other things on hand to play this game. Also free templates, scenarios and other materials are available in the downloads section
Now strap on your iron and let's play Showdown!
Draw two rectangles on the page and add a title and datenext >>
Add the following properties for each gunfighter with a scalar value and horizontal scale for each property: Name, Height, Width, Speed, Accuracy. These are the properties needed for the basic version of the game. More advanced mods will add weapons, ammo, armor, etc.
To keep things generic we will assign letters A & B for the gunfighter names for now. The other properties will discussed in the next >> step
...
r=0.887453880 [RANGE: 0<=r<1]PHP Code:
<\?php
printf("r=0.%'09d\n
[RANGE: 0<=r<1]",rand(0,999999999));
\?>
There are too many ways to generate such a number computationally to cover them all here. But for scripting awk works well enough and is widely available so we'll use it in our examples. But even awk has different usages. Both of these seemed to work fine:
awk -v seed="$(date +%s%N)" 'BEGIN{srand(seed); print int(rand()*6+1)}'
or
awk -v seed="$(od -An -N4 -tu4 /dev/urandom)" 'BEGIN{srand(seed); print int(rand()*6+1)}'
Alot depends on how your particular system is setup.
Although computational methods generally work fine, they don't necessarily reflect standard distributions often found in natural systems. A standard distribution can be applied and combined with a computationally-flat RNG like the methods already discussed to result in a more natural distribution probability. Here is an example of such a distribution generated by simulation of Six (6) six-sided (hex) dice.
SIX (6) SIX-SIDED (aka HEX) DICE ARE LABELLED A-F AND ASSIGNED A RANDOM VALUE 1-6 A=2 B=2 C=5 D=4 E=6 F=6 SUM OF THE DICE=25 EXPECTED NUMBER OF COMBINATIONS (N)=46656 (six to the power of six) DECLARE AND INITIALIZE OUR ASSOCIATIVE ARRAY OF POSSIBILE SUMS... NOTE: THERE ARE EXACTLY 31 POSSIBLE SUMS FOR SIX DICE MAIN LOOP: BEGIN.... MAIN LOOP: END RESULTS: sum # r bar 6 1 0.0000214 * 7 6 0.0001500 * 8 21 0.0006001 * 9 56 0.0018004 * 10 126 0.0045010 * 11 252 0.0099023 ** 12 456 0.0196759 ** 13 756 0.0358796 **** 14 1161 0.0607639 ***** 15 1666 0.0964721 ******** 16 2247 0.1446330 ********** 17 2856 0.2058470 ************* 18 3431 0.2793850 *************** 19 3906 0.3631040 ***************** 20 4221 0.4535750 ******************* 21 4332 0.5464250 ******************* 22 4221 0.6368960 ******************* 23 3906 0.7206150 ***************** 24 3431 0.7941530 *************** 25 2856 0.8553670 ************* 26 2247 0.9035280 ********** 27 1666 0.9392360 ******** 28 1161 0.9641200 ***** 29 756 0.9803240 **** 30 456 0.9900980 ** 31 252 0.9954990 ** 32 126 0.9982000 * 33 56 0.9994000 * 34 21 0.9998500 * 35 6 0.9999790 * 36 1 1.0000000 * SANITY CHECK COUNTER n=46656NOTE: In the above example, the sum of 25 is normalized on the table to an r=0.8553670 which falls over 1 standard deviation of the mean score 21 (0.5464250). You are encouraged to adapt these tables and skew the results to fit your gaming purposes. And the following bash script is provided for reference and you should feel free to use it however you like.
#!/usr/bin/bash
roll()
{
echo |
awk -v seed="$(od -An -N4 -tu4 /dev/urandom)" 'BEGIN{srand(seed); print int(rand()*6+1)}'
#awk -v seed="$(date +%s%N)" 'BEGIN{srand(seed); print int(rand()*6+1)}'
}
echo "SIX (6) SIX-SIDED (aka HEX) DICE ARE LABELLED A-F AND ASSIGNED A RANDOM VALUE 1-6"
A=$(roll)
B=$(roll)
C=$(roll)
D=$(roll)
E=$(roll)
F=$(roll)
SUM=$(($A+$B+$C+$D+$E+$F))
echo "A=$A B=$B C=$C D=$D E=$E F=$F"
echo "SUM OF THE DICE=$SUM"
N=$(( 6**6 ))
echo "EXPECTED NUMBER OF COMBINATIONS (N)=$N"
echo "(six to the power of six)"
n=$((0))
echo "DECLARE AND INITIALIZE OUR ASSOCIATIVE ARRAY OF POSSIBILE SUMS..."
declare -A array_t=(
[6]=0
[7]=0
[8]=0
[9]=0
[10]=0
[11]=0
[12]=0
[13]=0
[14]=0
[15]=0
[16]=0
[17]=0
[18]=0
[19]=0
[20]=0
[21]=0
[22]=0
[23]=0
[24]=0
[25]=0
[26]=0
[27]=0
[28]=0
[29]=0
[30]=0
[31]=0
[32]=0
[33]=0
[34]=0
[35]=0
[36]=0
)
echo "NOTE: THERE ARE EXACTLY ${#array_t[@]} POSSIBLE SUMS FOR SIX DICE"
echo "MAIN LOOP: BEGIN...."
for a in {1..6}
do
for b in {1..6}
do
for c in {1..6}
do
for d in {1..6}
do
for e in {1..6}
do
for f in {1..6}
do
s=$(($a+$b+$c+$d+$e+$f))
# TODO: insert each combination into the array indexed by sum
# count the actual number of combinations to get the p values
# add a function where if you enter the sum and it shows all possible combinations
#echo "$a $b $c $d $e $f =$s"
n=$(($n+1))
array_t[$s]=$((array_t[$s]+1))
done
done
done
done
done
done
echo "MAIN LOOP: END"
echo "RESULTS:"
awk "BEGIN{printf(\"%s\t%s\t%s\t\t%s\n\",\"sum\",\"#\",\"r\",\"bar\")}"
#N2=$((0))
l=$((0))
#TODO: change to a foreach
for i in {6..36}
do
l=$(($l+1))
#N2=`awk "BEGIN{print (${array_t[$i]+$N2})}"`
p=`awk "BEGIN{print (${array_t[$i]}/$n)}"`
p_cum=$((0))
bar=
#p=`awk "BEGIN{print ${array_t[$i]}/$N}"`
for (( j=6; j<=$i; j++ ))
do
p_cum=`awk "BEGIN{print ((${array_t[$j]}/$n)+$p_cum)}"`
done
scale=200
kx=`awk "BEGIN{print int($p*$scale)}"`
for (( k=0; k<=$kx; k++))
do
bar+="*"
done
awk "BEGIN{printf(\"%d\t%d\t%6.7f\t%s\n\",$i,${array_t[$i]},$p_cum,\"$bar\")}"
#awk "BEGIN{printf(\"%d\t%d\t%d\t%6.7f\t%6.7f\t%s\n\",$l,$i,${array_t[$i]},$p,$p_cum,\"$bar\")}"
done
echo "SANITY CHECK COUNTER"
echo "n=$n"
exit 0