Server Heartbeats and Modules

Gamer asks about multiple people working on the same module and ‘heartbeats for scripts’.

An overall question is whether two DMs can work on the same module? This is to build it. Not run it.

Underlining questions from this are based on the structure of the modules. Are they a single binary or a collection of areas and scripts? If an area map were made beforehand would the DMs be able to work on different parts by adding scripts or is it just one controller.

Another question that came up was server heartbeats for scripts. How much processing time is needed. Are trigger scripts checked every heartbeat? Do Wandering monsters run their entire script every heartbeat? Can you put scripts/threads to sleep?

    The end module is one compiled file, however you can create in in as many pieces with as many designers as you wish. So, you could have 10 people making the same module at once,(one for each “job like one for NPCs one for items one for AI scripts, etc) then import all 10 pieces into one module with the toolkit. In fact that’s the way BioWare is making the game themselves, except they’ve got like 40 people now on the project ;-).

    Heartbeats-

    Quotes(Mark Brockington, NWN Lead Research Scientist):

    Think of entering and leaving a trigger as “active” events (i.e. a script is run when that happens). If you want any other event (such as “Is there anyone standing within me?”), we currently have “heartbeat” scripts that run on the module, area and all game objects. It’s a script that gets run (in our current build) every ten seconds, and you can put all of your other trigger checks in there. We will probably have commands that change the rate of the heartbeat script on a per-object basis … and ten seconds definitely isn’t set in stone, but it’s what we are using right now.

    :AND:

    All passive events are computed on a need-to-know basis. Thus, if your heartbeat script for a trigger doesn’t actually refer to a function to determine who is standing within it, it doesn’t actually compute it. In its current form, a trigger needs to do a computation to determine if a given object is within its boundaries. Within the server, when a creature moves from point A to point B in its tiny AI steps, it computes whether the triggers it is standing within has changed. If they have, the creature informs the appropriate triggers of the status change.

    If you up the rate of a very complex heartbeat script … yes, it will slow the AI down for everything else.

    :End Quotes

    Hope that’s helpful,

    Cord Grimwinder-8d

Share this article:
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments