Menu

#10 Out-of-active region entities cannot interact

open-later
yzq
Logic (6)
1
2005-05-14
2005-04-30
yzq
No

Entities that are out of the active region currently
cannot interact with each other, since they are not
loaded in memory.

NOTES
NPCs are found in different locations depending on the
time of day. Yet the engine cannot be expected to
simulate this to a fine granularity (keep the sector in
memory, do pathfinding) due to memory & time
constraints. NPCs would be placed in the appropriate
location when their sector is loaded.
PC actions that restrict the NPC should be taken into
account. E.g. if the PC locks the door to the NPC's
house trapping the NPC inside, walks away such that the
NPC's sector is unloaded, and comes back later, the PC
should not see the NPC outside the house, even though
the NPC's routine dictates that he should.

POSSIBLE SOLUTION
Keep NPCs resident in memory. Certain objects that will
affect that idle actions (e.g. doors affect whether NPC
is able to walk about) will also be kept in memory.
Whether object is to be kept in memory is defined by
the sector file, or by category (all doors must be kept
in memory, all trees need not). Problem is in accessing
these object variables from within character scripts.

Discussion

  • yzq

    yzq - 2005-05-14
    • status: open --> open-later
     
  • yzq

    yzq - 2005-05-14

    Logged In: YES
    user_id=1220575

    Entity architecture (recently refactored; included in v0.1
    release) allows for global objects. Need to have entities
    store an ID so that identification of objects is possible.

    Potential problems with having too many entities in memory.

     

Log in to post a comment.