Map Database  •  FAQ  •  RSS  •  Login

How does randomnesss work in KaM Remake

<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 12 Sep 2013, 01:14

How does randomnesss work in KaM Remake

A few people have asked about this so I thought I'd make a topic about it.

We use a pseudo random number generator, which means it starts at a certain seed and then gives out a sequence of "random" numbers (the sequence is about 2 billion numbers long). The seed tells it where to start in the sequence, so with the same seed you'll get the same sequence.

Currently the random seed is always set to the same value at the start of the game, so under the same conditions you will always get exactly the same result. But a small change like adding an extra animal will cause the random numbers to be used differently (even though it's the same sequence) so you will get different results. In KaM there are a LOT of things using random numbers (animals use them every step, fighting/shooting uses them with every strike/shot, etc.) so even a simple change will make the results unpredictable.

In the next release we are going to change this so it starts randomised (which usually means you set it to something unpredictable like the current number of milliseconds on the clock), we originally didn't do this for debugging purposes (it's good to be able to reproduce the same events when debugging) but it's not so good for gameplay or balance testing.

Let me know if you have any questions :)
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 12 Sep 2013, 05:17

Re: How does randomnesss work in KaM Remake

I have a request: how about converting this into a new mini-article for our devblog? ;-)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 12 Sep 2013, 06:35

Re: How does randomnesss work in KaM Remake

thx, i would really appreciate a working random :)
when do you think we can use it ?
Greets Skypper (Totally Insane)

- Beginning map maker -
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 12 Sep 2013, 08:05

Re: How does randomnesss work in KaM Remake

this explains when i tested some SP missions and did not order any troops at the first fight the outcome was always the same :p thank you
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 12 Sep 2013, 09:21

Re: How does randomnesss work in KaM Remake

i had the same probem with my random spawn script, but do you know when we can use it
Greets Skypper (Totally Insane)

- Beginning map maker -

Return to “General / Questions”

Who is online

Users browsing this forum: No registered users and 7 guests