About two weeks ago my main computer encounter number of blue screens, and it had to go to reparis. Some ppl will understand how I got mad :), its preatty new unit. Working on pretty old notebook that is not able to render nice things. I have decided to postpone a bit terrain development and work on other related to engine parts.
I cant use nice DirectX so I have "gone wild" on ASCII. Just kidding. What I have done is just developed simple ASCII appilcation to test randomization and seeding that function.
Function that I have choosen to generate random numbers so far is Mother of All Random Generators, with some tweaks.
First application that uses it is simple guess the number:
Here number is generated basing on processor time.
Second one application is simple shooter (which was developed long time ago, and is now my Area51 for functions):
Here number is generated for positioning of enemy ship (those on top of screen). I didnt notice visible pattern so it works nicely. Randomnes is used to decide where to go in Y axis. X axis has its own 'AI', basicly going on level with player.
Guessing number is the best choice to observe how Mother behaves (ofc we can just list numbers, but hey its game allready), and I did experiment with it a bit. If I choose approch from shooter, to seed it initialy with given number, and base next seeds on last number generated, we will notice that numbers are going with given pattern. Approach that takes time from our computers as Seed works well and doesnt give obvious pattern of number generation.
Jo.
No comments:
Post a Comment