Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Recent content by unixknight
The masquerade of murder returns! A new game of Vampires Amongst Us has begun. Unmask the killers, trust no one, and try to survive the night. Find out more and sign up now!
If the randomizer is global, why would the seed need to be random? Or by that do you mean just using the system clock?
Did you still want to see the code?
That's the thing... as written now it IS crippling because it doesn't just roll the dice 1 time for each battle. It's a couple dozen... so if you consider 24 die rolls x 10,000 x 1ms you get serious delays for each simulation.
I've got code for a much better randomizer and I"m going to work it...
Ok so using the Battle Simulator I designed to compare performance for units in hand to hand, I get the following results:
Unit size 20, 5 columns wide
Skeletons with spears vs Bretonnian Men at arms (With nearby Knight) with Halberds 1000 battles:
Bretonnia charges:
Bretonnia wins 4%...
Alright so predictably, when I put in a fixed seed value it gave me 100% charger wins results. (When I tried that before I did it in the wrong function in my Dice class...)
So when I went back and set a Thread.Sleep(1) in the correct function (gawd)
I now have consistent 79% failure to charge...
Ok so I've done the following:
Seeded the random number generator with a fixed Int value and
Let it default seed form the system clock but added a 5ms sleep for the thread after each time.
I'm still getting pretty consistent results at 72% charge failure vs. 84% over 10,000 battles...
Hmmm good question about the Static... I think it's because when I originally designed the class, I was going to make it a static set of dice but that later became unnecessary and I forgot to remove it.
That function is overloaded and can take the number and sides as parameters. In this...
Sure. This is the function I'm calling in my Dice class from my program. (This is in VB.NET) The Dice object has already been initialized as 2d6 for rolling Leadership. (number is a Global variable set to the number of dice, sides is Global and set to the number of sides on the dice)...
So I wanted to be able to determine configurations and loadouts for my units and experiment with different enemies, so I wrote a program to simulate hand to hand fights between units in Warhammer.
Alright so my program is pretty much done, but there seems to be a problem with the random...
Hey there. I'm Chris from Washington DC.
I started playing Warhammer almost 20 years ago with Space Marines, and started playing WHFB just a couple years ago as Bretonnia. I also have a Dark Elf force and am just now starting with VC. My wife and I are sharing a Tomb Kings army just...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.