On 12/1/2010 9:59 AM, Xavier Antoviaque wrote:
I agree with you, the mission engine should contain the process of
serialization of missions and read/write the state on the database. That
includes the information about the actions that all missions are waiting
on: this should be stored in the database by the mission engine.
The way it would work would be:
1) A mission waits on an event by calling $this->wait_for_action()
2) $this->wait_for_action calls the mission engine and asks to have one
of its methods called back when the action is performed by the user
3) the mission engine adds a row in the database containing: the action
to wait for, the user id of the player who has to perform the action,
and the mission identifier
4) Right before the end of the request processing, the mission engine
serializes the mission object and stores it
Does it makes sense?
[vlad] I think it can work. I'll probably have to make the mission
engine a singleton so i can access the same instance of it anywhere.
But if i do it this way i don't think i need to serialize the mission at
all. The only information i actualy use from the mission is the action
queue. It tellm me what action should i listen for and what function
should i launch when the action is performed. If i store each action in
the database, then i don't think i'll need to serialize the mission, no?
Or do you think that on later mission the editors would want to be able
to set some additional vars and be able to remember what the value for
those vars are?
I've had a look at the bugs today - if there are still some pending
questions, give me the link of the bugs and I'll have a look.
[vlad] from what i can tell, right now the bugs still outstanding are
the IE8 bug form which i need more info from David and the ie6 bug which
i am still not able to test yet. Other than that, i don't think there
are other bugs
_______________________________________________
Farsides mailing list - [email protected]
Wiki: http://farsides.com/
List: http://farsides.com/ml/
Forum: http://farsides.com/forum/
Ideas: http://farsides.com/ideas/
Chat: http://farsides.com/chat/