Deterministic scripting

For AI and campaign script related discussions and questions
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Deterministic scripting

Post by aubergine »

Awesome, thanks for the info.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Deterministic scripting

Post by NoQ »

Per wrote:Each game frame is 100ms in game time. A game second has 10 frames, always. A game second may last shorter or longer than a real second, depending on lag and game speed setting.
Emm i've got a question. Does this mean that quite a lot of AI events can fall on a single game frame? So most of my attempts to +/- 100ms randomize AI timers (to reduce the amount of events triggered at the same time) were useless, since it's most likely still the same game frame?
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Deterministic scripting

Post by aubergine »

Heh, I was doing the same sort of thing, with like ± Random(0...100)ms

But yeah, sounds like in general randomisation would need to be >100ms and in chunks of 100ms.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Deterministic scripting

Post by Per »

Yes, randomization needs to be > 100ms to have any effect.

I'll get around to adding load balancing at the engine layer one day. I want to add some measurement code first to see where the problems are, though, since I do not like adding code blindly :)
Post Reply